From 98bbe7bd7fcec209e2408ff0b086858715ca89e0 Mon Sep 17 00:00:00 2001 From: justsaumit Date: Tue, 1 Mar 2022 19:54:04 +0530 Subject: updated --- scripts/dprompt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 scripts/dprompt (limited to 'scripts/dprompt') diff --git a/scripts/dprompt b/scripts/dprompt new file mode 100755 index 0000000..9549658 --- /dev/null +++ b/scripts/dprompt @@ -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 + -- cgit v1.2.3