From bbcb898aee83eaacf8a462b041295dac3a312061 Mon Sep 17 00:00:00 2001 From: appeasementPolitik <108810900+appeasementPolitik@users.noreply.github.com> Date: Mon, 15 Aug 2022 14:50:23 +0000 Subject: [PATCH] Make prompt suitable for existing scripts --- .local/bin/prompt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.local/bin/prompt b/.local/bin/prompt index 666434fb..2f4be4e6 100755 --- a/.local/bin/prompt +++ b/.local/bin/prompt @@ -1,8 +1,8 @@ #!/bin/sh # A dmenu binary prompt script. -# Gives a dmenu prompt labeled with $1 to perform command $2. +# Gives a dmenu prompt labeled with $1. # For example: -# `./prompt "Do you want to shutdown?" "shutdown -h now"` +# `./prompt "Do you want to shutdown?" && shutdown -h now -[ "$(printf "No\\nYes" | dmenu -i -p "$1" -nb darkred -sb red -sf white -nf gray )" = "Yes" ] && $2 +[ "$(printf "No\\nYes" | dmenu -i -p "$1")" = "Yes" ]