20 lines
634 B
Bash
Executable File
20 lines
634 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# small power menu using rofi, i3, systemd and pm-utils
|
|
# (last 3 dependencies are adjustable below)
|
|
# tostiheld, 2016
|
|
|
|
poweroff_command="systemctl poweroff"
|
|
reboot_command="systemctl reboot"
|
|
logout_command="i3-msg exit"
|
|
hibernate_command="systemctl hibernate"
|
|
suspend_command="systemctl suspend"
|
|
|
|
# you can customise the rofi command all you want ...
|
|
rofi_command="rofi -width 10 -lines 5 -hide-scrollbar -opacity 100 -padding 5"
|
|
|
|
options=$'poweroff\nreboot\nlogout\nhibernate\nsuspend'
|
|
|
|
# ... because the essential options (-dmenu and -p) are added here
|
|
eval \$"$(echo "$options" | $rofi_command -dmenu -p "")_command"
|