diff options
author | Aoi Koizumi <novaburst@kalli.st> | 2022-04-02 16:40:29 -0300 |
---|---|---|
committer | Aoi Koizumi <novaburst@kalli.st> | 2022-04-02 16:41:11 -0300 |
commit | 2d528b69bd4bef811f667619a726a8d035d2d149 (patch) | |
tree | b00fd1d29c18b20c9c151977492448d8a500ee14 | |
parent | aa5ae0c8e5eb613662e0c4e7f9bae2686cbc18dc (diff) | |
download | ayu-2d528b69bd4bef811f667619a726a8d035d2d149.tar.gz |
Add experimental add-ons
Signed-off-by: Aoi Koizumi <novaburst@kalli.st>
-rwxr-xr-x | contrib/ayu-bemenu | 4 | ||||
-rwxr-xr-x | contrib/ayu-dmenu | 4 | ||||
-rwxr-xr-x | contrib/ayu-totp | 13 |
3 files changed, 21 insertions, 0 deletions
diff --git a/contrib/ayu-bemenu b/contrib/ayu-bemenu new file mode 100755 index 0000000..8edceef --- /dev/null +++ b/contrib/ayu-bemenu @@ -0,0 +1,4 @@ +#!/bin/sh +ayu_store="$HOME/.ayu-store" +cd $ayu_store +find . -name '*.age' | sort | sed 's,^\./,,;s,\.age$,,' | bemenu -n -b | xargs $(which ayu) -c diff --git a/contrib/ayu-dmenu b/contrib/ayu-dmenu new file mode 100755 index 0000000..6dfaf3e --- /dev/null +++ b/contrib/ayu-dmenu @@ -0,0 +1,4 @@ +#!/bin/sh +ayu_store="$HOME/.ayu-store" +cd $ayu_store +find . -name '*.age' | sort | sed 's,^\./,,;s,\.age$,,' | dmenu | xargs $(which ayu) -c diff --git a/contrib/ayu-totp b/contrib/ayu-totp new file mode 100755 index 0000000..085f4a8 --- /dev/null +++ b/contrib/ayu-totp @@ -0,0 +1,13 @@ +#!/bin/sh +# extracted from https://rgz.ee/bin/pass +set -e + +totp_seed="$(ayu -v "$@" | grep 'totp: ' | head -n1 | cut -d' ' -f2)" +if ! [ -z "$totp_seed" ]; then + if command -v oathtool >/dev/null 2>&1; then + oathtool --totp -b "$totp_seed" + else + echo 'oathtool(1) should be installed' + exit 1 + fi +fi |