16 lines
302 B
Bash
Executable File
16 lines
302 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# A dmenu binary prompt script.
|
|
# Gives a dmenu prompt labelled with $1 to perform command $2.
|
|
# For example:
|
|
# `./prompt "Do you want to shutdown?" "shutdown now"`
|
|
|
|
# Taken shamelessly from Luke Smith
|
|
|
|
choice=$(echo -e "No\nYes" | dmenu -i -p "$1")
|
|
|
|
if [ $choice = "Yes" ]
|
|
then
|
|
$2
|
|
fi
|