Compare commits
2 Commits
42f33547a4
...
08d5de8ada
Author | SHA1 | Date | |
---|---|---|---|
08d5de8ada | |||
7a8a14bb1c |
@ -75,7 +75,7 @@ export GLFW_IM_MODULE=ibus
|
||||
#export XDG_SESSION_DESKTOP=river
|
||||
#export XDG_CURRENT_SESSION_TYPE=wayland
|
||||
#export GDK_BACKEND="wayland,x11"
|
||||
#export MOZ_ENABLE_WAYLAND=1
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
|
||||
|
||||
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && setsid shortcuts >/dev/null 2>&1
|
||||
|
@ -7,24 +7,25 @@ case "$(readlink -f /sbin/init)" in
|
||||
*) ctl='loginctl' ;;
|
||||
esac
|
||||
|
||||
case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew\n🐻 hibernate\n🔃 reboot\n🖥️ shutdown\n💤 sleep\n📺 display off\n set background\n start idle\n kill swayidle\n fcitx5\n kill fcitx5\n start emacs daemon\n kill emacs daemon" | dmenu -i -l 15 -p 'Action: ')" in
|
||||
case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥️ shutdown\n💤 sleep\n📺 display off\n set background\n start idle\n kill swayidle\n fcitx5\n kill fcitx5\n start emacs daemon\n kill emacs daemon\n restart emacs daemon" | dmenu -i -l 16 -p 'Action: ')" in
|
||||
'🔒 lock')
|
||||
setsid -f swaylock
|
||||
setsid -f sleep 2 && swayidle -w timeout 1 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on" && kill $#'
|
||||
;;
|
||||
"🚪 leave $WM") swaymsg exit ;;
|
||||
"♻️ renew") swaymsg reload ;;
|
||||
"♻️ renew $WM") swaymsg reload ;;
|
||||
'🐻 hibernate') $ctl hibernate -i ;;
|
||||
'💤 sleep') $ctl suspend -i ;;
|
||||
'🔃 reboot') $ctl reboot -i ;;
|
||||
'🖥️ shutdown') $ctl poweroff -i ;;
|
||||
'📺 display off') swayidle -w timeout 1 'wlopm --off "*"' resume 'wlopm --on "*" && kill $#' ;;
|
||||
'📺 display off') swayidle -w timeout 1 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on" && kill $#' ;;
|
||||
' set background') change-background ;;
|
||||
' start idle') idle ;;
|
||||
' kill swayidle') killall swayidle ;;
|
||||
' start idle') killall swayidle && sleep 1; setsid -f idle && notify-send 'idle started.';;
|
||||
' kill swayidle') killall swayidle && notify-send 'idle killed.';;
|
||||
' fcitx5') fcitx5 ;;
|
||||
' kill fcitx5') killall fcitx5 ;;
|
||||
' start emacs daemon') emacs --daemon && notify-send 'emacs daemon started' ;;
|
||||
' kill emacs daemon') killall emacs && notify-send 'emacs daemon killed' ;;
|
||||
' restart emacs daemon') killall emacs && notify-send 'emacs daemon killed' ; emacs --daemon && notify-send 'emacs daemon started' ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
|
Reference in New Issue
Block a user