diff options
| author | Robert Günzler <r@gnzler.io> | 2020-12-03 12:50:32 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2020-12-07 19:28:05 +0100 |
| commit | 350871c9a2ff125fb6b7093d1cb2915d64173e87 (patch) | |
| tree | c2d46b59f084febdf24d54fae96128fb81d27cbc | |
| parent | 01d7525db223e303d14d1ab42b97ba584ad7cea8 (diff) | |
bin/menu: add --password support
| -rwxr-xr-x | bin/menu | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/bin/menu b/bin/menu index 0b6bc70..f6e82a4 100755 --- a/bin/menu +++ b/bin/menu @@ -6,23 +6,45 @@ arg0=bemenu prompt=${MENU_PROMPT:-">"} main_color="#0B346F" -while test $# -gt 0; do +idx=0 +while test $# -gt $idx; do case "$1" in -run) - arg0=bemenu-run; prompt=bin ;; + arg0=bemenu-run; prompt=bin + prompt="run" + shift + ;; + -drun) + # arg0=$HOME/devel/upstream/github.com/Cloudef/bemenu/bemenu-drun; prompt=bin + arg0=bemenu-drun; prompt=bin + prompt="drun" + main_color="#DB4D60" + shift + ;; -p) - shift; prompt="$1" ;; + shift + prompt="$1" + shift + ;; esac - shift + idx=$((idx+1)) done +# HACK: https://github.com/Cloudef/bemenu/issues/5 +# fb='#221E1D' +# ff='#fffefe' +# [ -n "${MENU_PASSWORD}" ] && ff=$fb +# TODO submit https://github.com/robertgzr/bemenu/tree/passwd +passwd_arg= +[ -n "${MENU_PASSWORD}" ] && passwd_arg=--password + exec "${arg0}" \ + --monitor=1 \ --no-overlap \ - --monitor=all \ --ignorecase \ --list=10 \ --prompt="${prompt}" \ - --fn 'Iosevka SS05 Extended 11' \ + --fn 'Iosevka SS14 Extended 11' \ --nb '#221E1D' --nf '#fffefe' \ --tb "$main_color" --tf '#fffefe' \ --fb '#221E1D' --ff '#fffefe' \ @@ -31,4 +53,5 @@ exec "${arg0}" \ --hb "$main_color" \ --hf '#FCFAF2' \ --scb '#221E1D' --scf '#fffefe' \ + ${passwd_arg} \ "$@" |