20 lines
304 B
Bash
Executable File
20 lines
304 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
options=(
|
|
"lock"
|
|
"logout"
|
|
"suspend"
|
|
"hibernate"
|
|
"reboot"
|
|
"shutdown"
|
|
"screen-off")
|
|
|
|
i=1
|
|
output=$(
|
|
for option in "${options[@]}"; do
|
|
echo "($i) $option"
|
|
(( i++ ))
|
|
done | rofi -dmenu -p "action" -u "2,4" -no-custom)
|
|
|
|
[[ "$output" ]] && "$(dirname "$0")"/i3exit "${output#(*) }"
|