2023-11-24 17:04:03 +01:00
|
|
|
#!/usr/bin/env sh
|
2020-03-04 13:28:42 +01:00
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
lock)
|
2023-11-24 17:04:03 +01:00
|
|
|
swaylock -f -e -i "$HOME/.cache/backgrounds/lockscreen"
|
2020-03-04 13:28:42 +01:00
|
|
|
;;
|
|
|
|
logout)
|
2023-11-24 17:04:03 +01:00
|
|
|
swaymsg exit
|
2020-03-04 13:28:42 +01:00
|
|
|
;;
|
|
|
|
suspend)
|
2021-03-09 08:57:41 +01:00
|
|
|
systemctl suspend
|
2020-03-04 13:28:42 +01:00
|
|
|
;;
|
|
|
|
hibernate)
|
2023-11-24 17:04:03 +01:00
|
|
|
exit 1
|
2020-03-04 13:28:42 +01:00
|
|
|
;;
|
|
|
|
reboot)
|
|
|
|
systemctl reboot
|
|
|
|
;;
|
|
|
|
shutdown)
|
|
|
|
systemctl poweroff
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
|
|
|
|
exit 2
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|