Switch to GNU stow
This commit is contained in:
parent
a2605c4254
commit
d34cecb27e
137 changed files with 39244 additions and 141 deletions
15
scripts/.local/bin/dmenuprompt
Executable file
15
scripts/.local/bin/dmenuprompt
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
# A dmenu binary prompt script.
|
||||
# Gives a dmenu prompt labeled with $1 to perform command $2.
|
||||
# For example:
|
||||
# `./prompt "Do you want to shutdown?" "shutdown -h now"`
|
||||
|
||||
if [[ -z $3 ]] || [[ $3 == "normal" ]]; then
|
||||
[ "$(printf "No\\nYes" | dmenu -i -p "$1")" = "Yes" ] && $2
|
||||
elif [[ $3 == "success" ]]; then
|
||||
[ "$(printf "No\\nYes" | dmenu -i -p "$1" -nb webgreen -sb greenyellow -sf black -nf white )" = "Yes" ] && $2
|
||||
elif [[ $3 == "warn" ]] || [[ $3 == "warning" ]]; then
|
||||
[ "$(printf "No\\nYes" | dmenu -i -p "$1" -nb goldenrod -sb gold -sf black -nf white )" = "Yes" ] && $2
|
||||
elif [[ $3 == "danger" ]]; then
|
||||
[ "$(printf "No\\nYes" | dmenu -i -p "$1" -nb darkred -sb red -sf white -nf gray )" = "Yes" ] && $2
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue