summaryrefslogtreecommitdiff
path: root/scripts/prompt
diff options
context:
space:
mode:
authorjustsaumit <justsaumit@draconyan.xyz>2022-02-27 07:00:19 +0530
committerjustsaumit <justsaumit@draconyan.xyz>2022-02-27 07:00:19 +0530
commitb7c8da835bb251862a3b2b23458bd2f4c5f58f5f (patch)
tree5b934e387371202fb2bf9fb689b254bacfe354ac /scripts/prompt
parent7eb981e3ac9742ed1fefe49e7ef058f783e63f76 (diff)
Pushing old local updates
Diffstat (limited to 'scripts/prompt')
-rwxr-xr-xscripts/prompt9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/prompt b/scripts/prompt
new file mode 100755
index 0000000..9549658
--- /dev/null
+++ b/scripts/prompt
@@ -0,0 +1,9 @@
+#!/bin/sh
+# A dmenu binary prompt script
+# Gives dmenu prompt labeled with $1 to perform command $2
+# For example:
+# './promptquit "Do you really want to quit?" "shutdown -h now"'
+
+[ $(echo -e "No\nYes" | dmenu -i -p "$1") \
+ == "Yes" ] && $2
+