From b29ed0b265683702646eb209eafcc9a92b317b3b Mon Sep 17 00:00:00 2001 From: Joe Date: Fri, 27 Dec 2024 14:41:35 +0100 Subject: up --- .local/bin/dmotp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to '.local/bin/dmotp') 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 -- cgit v1.2.3