prompt clarification

This commit is contained in:
Luke Smith
2018-04-06 20:47:29 -07:00
parent 4dc4e439a1
commit c69028fa0d
2 changed files with 11 additions and 6 deletions

View File

@@ -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