2019-06-18 01:07:14 +00:00
|
|
|
#!/usr/bin/env bash
|
2019-12-11 05:52:23 +00:00
|
|
|
# -*- sh -*-
|
2019-06-18 01:07:14 +00:00
|
|
|
|
|
|
|
OPTIONS=" Lock
|
|
|
|
鈴 Sleep
|
|
|
|
Logout
|
|
|
|
Poweroff
|
|
|
|
淚 Restart"
|
|
|
|
|
|
|
|
SELECTED="$(
|
|
|
|
rofi -dmenu \
|
|
|
|
-theme applet \
|
|
|
|
-p "System" \
|
|
|
|
-i \
|
2020-06-27 04:57:32 +00:00
|
|
|
-line-padding 4 <<< "$OPTIONS"
|
2019-06-18 01:07:14 +00:00
|
|
|
)"
|
|
|
|
|
2020-06-27 04:57:32 +00:00
|
|
|
echo "$SELECTED"
|
2019-06-18 01:07:14 +00:00
|
|
|
|
|
|
|
case $SELECTED in
|
|
|
|
*Lock)
|
2020-06-27 04:57:32 +00:00
|
|
|
swaylock \
|
|
|
|
--screenshots \
|
|
|
|
--clock \
|
|
|
|
--indicator \
|
|
|
|
--indicator-radius 200 \
|
|
|
|
--indicator-thickness 5 \
|
|
|
|
--effect-greyscale \
|
|
|
|
--effect-blur 7x5 \
|
|
|
|
--grace 2 \
|
|
|
|
--fade-in 1 ;;
|
2019-06-18 01:07:14 +00:00
|
|
|
*Sleep)
|
|
|
|
systemctl hibernate ;;
|
|
|
|
*Logout)
|
|
|
|
swaymsg exit ;;
|
|
|
|
*Poweroff)
|
|
|
|
systemctl poweroff ;;
|
|
|
|
*Restart)
|
|
|
|
systemctl reboot ;;
|
|
|
|
*)
|
2020-06-27 04:57:32 +00:00
|
|
|
echo "$SELCTED" ;;
|
2019-06-18 01:07:14 +00:00
|
|
|
esac
|
|
|
|
|