diff options
author | Joe <rbo@gmx.us> | 2024-12-27 14:41:35 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-12-27 14:41:35 +0100 |
commit | b29ed0b265683702646eb209eafcc9a92b317b3b (patch) | |
tree | 6c2fe54fab038febcd506e93e3c8e6d085124910 /.local/bin/dmotp | |
parent | good (diff) | |
download | dotfiles-bsd-b29ed0b265683702646eb209eafcc9a92b317b3b.tar.gz dotfiles-bsd-b29ed0b265683702646eb209eafcc9a92b317b3b.tar.bz2 dotfiles-bsd-b29ed0b265683702646eb209eafcc9a92b317b3b.tar.xz dotfiles-bsd-b29ed0b265683702646eb209eafcc9a92b317b3b.tar.zst dotfiles-bsd-b29ed0b265683702646eb209eafcc9a92b317b3b.zip |
up
Diffstat (limited to '.local/bin/dmotp')
-rwxr-xr-x | .local/bin/dmotp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/.local/bin/dmotp b/.local/bin/dmotp index b5a36f6..97f015f 100755 --- a/.local/bin/dmotp +++ b/.local/bin/dmotp @@ -1,5 +1,10 @@ #!/bin/sh +color='#cc241d'; +if echo "$1" | grep '^#' 2>&1; then + color="$1" +fi + if [ -n "$WAYLAND_DISPLAY" ]; then dmenu=dmenu-wl xdotool="ydotool type --file -" @@ -14,7 +19,7 @@ fi prefix=${PASSWORD_STORE_DIR-~/.local/share/pass}/otp rprefix=$(printf "%s" $prefix | sed 's/\//\\\//g') password_files=$(ls "$prefix"/*.gpg | sed 's/^'${rprefix}'\///g' | sed 's/\.gpg//g') -password=$(printf "%s\n" "${password_files}" | "$dmenu" -i -l 15) +password=$(printf "%s\n" "${password_files}" | "$dmenu" -i -l 15 -sb "$color" -shb "$color") [ -n "$password" ] || exit |