diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2018-04-06 20:47:29 -0700 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2018-04-06 20:47:29 -0700 |
| commit | c69028fa0db2b95b298a4c483c877f362a914a95 (patch) | |
| tree | 80efb8b82d16aafb8d42fc14cb938dc5579c6200 /.scripts/prompt | |
| parent | 4dc4e439a1961cc2b682775babf72830914c7770 (diff) | |
| download | eibhear-c69028fa0db2b95b298a4c483c877f362a914a95.tar.gz eibhear-c69028fa0db2b95b298a4c483c877f362a914a95.tar.zst eibhear-c69028fa0db2b95b298a4c483c877f362a914a95.zip | |
prompt clarification
Diffstat (limited to '.scripts/prompt')
| -rwxr-xr-x | .scripts/prompt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/.scripts/prompt b/.scripts/prompt index f210986..0a2aba9 100755 --- a/.scripts/prompt +++ b/.scripts/prompt @@ -1,3 +1,8 @@ #!/bin/sh +# A dmenu binary prompt script. +# Gives a dmenu prompt labeled with $1 to perform command $2. +# For example: +# `./prompt "Do you want to shutdown?" "shutdown -h now"` + [ $(echo -e "No\nYes" | dmenu -i -p "$1" -nb darkred -sb red -sf white -nf gray -fn mono) \ -== "Yes" ] && "$@:2" +== "Yes" ] && $2 |
