From af8cda7385fcd761ceff5fef09401377ed2fbb86 Mon Sep 17 00:00:00 2001 From: Saumit Dinesan <79687674+Saumit-D@users.noreply.github.com> Date: Wed, 10 Nov 2021 16:01:17 +0530 Subject: Add files via upload --- scripts/promptquit | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 scripts/promptquit (limited to 'scripts/promptquit') diff --git a/scripts/promptquit b/scripts/promptquit new file mode 100644 index 0000000..cb06659 --- /dev/null +++ b/scripts/promptquit @@ -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