diff options
author | Julian T <julian@jtle.dk> | 2019-12-16 13:21:13 +0100 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2019-12-16 13:26:20 +0100 |
commit | ee811e9ff30845d58830f57e9c232328e51638d6 (patch) | |
tree | 3d6b7f150679f44b136b3ec5a31469d912641591 | |
parent | 61f9cec189ea19265ab4124aee116292477d0e79 (diff) |
Proper dmenu usage
-rwxr-xr-x | scripts/Scripts/lc | 5 | ||||
-rw-r--r-- | scripts/Scripts/passmenu | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/scripts/Scripts/lc b/scripts/Scripts/lc index a88f774..c44ce19 100755 --- a/scripts/Scripts/lc +++ b/scripts/Scripts/lc @@ -1,13 +1,14 @@ #!/usr/bin/env bash LOGFILE=.lc.log +DMENU="rofi -dmenu" Commands="common update poweroff suspend set-keyboard caps-lock battery cups-website vim emacs htop scrot overleaf-render overleaf win pass wall stat mic mail" statScripts="ram.sh status.sh net.sh mic.sh" handle_stuff() { if [ "$1" = "--dmenu" ]; then - $0 $(echo $Commands | tr " " "\n" | dmenu -i -p ":") + $0 $(echo $Commands | tr " " "\n" | $DMENU -i -p "lc") fi if [ "$1" = "edit" ] || [ "$1" = "e" ]; then @@ -83,7 +84,7 @@ handle_stuff() { fi if [ "$1" = "stat" ]; then - sh /home/julian/Scripts/$(echo $statScripts | tr " " "\n" | dmenu -i -p "stat") + sh /home/julian/Scripts/$(echo $statScripts | tr " " "\n" | $DMENU -i -p "stat") fi if [ "$1" = "common" ]; then python3 Scripts/commondocs.py ~/commondocs.json $(python3 Scripts/commondocs.py ~/commondocs.json | $DMENU) diff --git a/scripts/Scripts/passmenu b/scripts/Scripts/passmenu index e3cf4a8..be2d206 100644 --- a/scripts/Scripts/passmenu +++ b/scripts/Scripts/passmenu @@ -1,5 +1,7 @@ #!/usr/bin/env bash +DMENU="rofi -dmenu" + shopt -s nullglob globstar typeit=0 @@ -13,7 +15,7 @@ password_files=( "$prefix"/**/*.gpg ) password_files=( "${password_files[@]#"$prefix"/}" ) password_files=( "${password_files[@]%.gpg}" ) -password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@") +password=$(printf '%s\n' "${password_files[@]}" | $DMENU -i "$@") [[ -n $password ]] || exit |