Add prompt.sh

This commit is contained in:
Riyyi
2018-10-21 16:58:37 +02:00
parent a63df8967e
commit 448141122c
2 changed files with 22 additions and 9 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
# Binary prompt script.
# Prompt rofi with label $1 to perform command $2.
#
# Example:
# $ ./prompt.sh "Are you sure you want to shutdown?" "poweroff"
[ "$(printf 'No\nYes' | rofi -dmenu -i -p "$1" -lines 2 \
-color-window "#524040, #dc7a43, #fff" \
-color-normal "#524040, #fff, #524040, #fff, #707880")" = "Yes" ] && $2