diff options
| author | Baitinq <[email protected]> | 2022-06-17 19:09:27 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2022-06-17 19:09:27 +0200 |
| commit | 07fc1999fc9963b7d31ce3a0f7e65112767ead23 (patch) | |
| tree | 0b3e5b274f24d189fa8ca7bfa8d833f05252b4e0 /dotfiles/scripts/exit | |
| download | nixos-config-07fc1999fc9963b7d31ce3a0f7e65112767ead23.tar.gz nixos-config-07fc1999fc9963b7d31ce3a0f7e65112767ead23.tar.bz2 nixos-config-07fc1999fc9963b7d31ce3a0f7e65112767ead23.zip | |
Initial commit
Diffstat (limited to 'dotfiles/scripts/exit')
| -rwxr-xr-x | dotfiles/scripts/exit | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dotfiles/scripts/exit b/dotfiles/scripts/exit new file mode 100755 index 0000000..9fca18a --- /dev/null +++ b/dotfiles/scripts/exit @@ -0,0 +1,15 @@ +#!/bin/bash +# +# a simple dmenu session script +# +### + +DMENU='dmenu' +choice=$(echo -e "logout\nsuspend\nshutdown\nreboot" | $DMENU) + +case "$choice" in + logout) kill -9 -1 & ;; + suspend) systemctl suspend & ;; + shutdown) systemctl poweroff & ;; + reboot) systemctl reboot & ;; +esac |