summaryrefslogtreecommitdiffstats
path: root/.local/bin/dmpass
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/dmpass')
-rwxr-xr-x.local/bin/dmpass9
1 files changed, 6 insertions, 3 deletions
diff --git a/.local/bin/dmpass b/.local/bin/dmpass
index c0a10ba..d5b0494 100755
--- a/.local/bin/dmpass
+++ b/.local/bin/dmpass
@@ -1,11 +1,14 @@
#!/bin/sh
full=0
+color='#cc241d';
if [ "$1" = "--full" ]; then
full=1
- if [ "$2" ]; then
+ if echo "$2" | grep '^#' 2>&1; then
+ color="$2"
fi
-elif [ "$1"]; then
+elif echo "$1" | grep '^#' 2>&1; then
+ color="$1"
fi
@@ -23,7 +26,7 @@ fi
prefix=${PASSWORD_STORE_DIR-~/.local/share/pass}
rprefix=$(printf "%s" $prefix | sed 's/\//\\\//g')
password_files=$(ls "$prefix"/*.gpg "$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