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

case "$(printf "Shutdown\nRestart\nLogout\nSuspend\nLock" | dmenu \
    -fn 'JetBrainsMono NerdFont:size=11' -i \
    -b -p 'Power:')" 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