summaryrefslogtreecommitdiff
path: root/.local/bin/dmenu/dm-power
blob: fefe30f9d80ce7914ea22e7905ea5992a573bdb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

DMENU_CMD="dmenu -p 'Power:' -b -i -fn 'JetBrainsMono Nerd Font:size=11'"

case "$(printf "Shutdown\nRestart\nLogout\nSuspend\nLock" | eval "$DMENU_CMD")" in         
    Shutdown) exec systemctl poweroff;;         
    Restart) exec systemctl reboot;;         
    Logout) kill -HUP "$XDG_SESSION_PID";;         
    Suspend) exec systemctl suspend;;         
    Lock) exec systemctl --user start lock.target;; 
esac