Files
dotfiles/i3/scripts/shutdown-menu

20 lines
295 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++ ))
2020-12-11 20:06:59 +01:00
done | rofi -dmenu -p "action" -no-custom)
2014-08-17 23:34:02 +02:00
2015-11-10 01:09:16 +01:00
[[ "$output" ]] && "$(dirname "$0")"/i3exit "${output#(*) }"