1234567891011121314151617181920212223 |
- #!/bin/sh
- powermenu() {
- options=" Poweroff\n Reboot\n Suspend\n Hibernate\n Logout\n Lock"
- selected=$(echo "$options" | dmenu -i -p "Session:" )
- if [ "$selected" = " Poweroff" ]; then
- loginctl poweroff
- elif [ "$selected" = " Reboot" ]; then
- loginctl reboot
- elif [ "$selected" = " Suspend" ]; then
- loginctl suspend
- elif [ "$selected" = " Hibernate" ]; then
- loginctl hibernate
- elif [ "$selected" = " Logout" ]; then
- pkill dwm
- elif [ "$selected" = " Lock" ]; then
- slock
- return
- fi
- }
- powermenu
|