diff options
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 |