Files
dotfiles/i3/scripts/shutdown-menu

20 lines
372 B
Plaintext
Raw Normal View History

2014-08-17 23:34:02 +02:00
#!/usr/bin/env bash
options=(
"lock"
"logout"
"suspend"
"hibernate"
"reboot"
2014-08-19 13:49:19 +02:00
"shutdown"
"screen-off")
2014-08-17 23:34:02 +02:00
i=1
output=$(
for option in "${options[@]}"; do
echo "($i) $option"
(( i++ ))
2017-01-23 17:08:58 +01:00
done | dmenu -fn 'DejaVu Sans Mono:size=11' -b -i -l 10 -p '>' -nb '#222222' -nf '#ffffff' -sb '#e16b40' -sf '#000000')
2014-08-17 23:34:02 +02:00
2015-11-10 01:09:16 +01:00
[[ "$output" ]] && "$(dirname "$0")"/i3exit "${output#(*) }"