diff options
author | Trumeet <yuuta@yuuta.moe> | 2022-04-18 15:54:23 -0700 |
---|---|---|
committer | Trumeet <yuuta@yuuta.moe> | 2022-04-18 15:54:23 -0700 |
commit | e1e9d152de883a2ceecb67f28e442f39ba425e63 (patch) | |
tree | 38e62c6a14320ce60abecd5b26a812dfd945ee3b | |
parent | c9ac37893fd55b1b079f0d70420ac30673ead775 (diff) | |
download | gists-e1e9d152de883a2ceecb67f28e442f39ba425e63.tar gists-e1e9d152de883a2ceecb67f28e442f39ba425e63.tar.gz gists-e1e9d152de883a2ceecb67f28e442f39ba425e63.tar.bz2 gists-e1e9d152de883a2ceecb67f28e442f39ba425e63.zip |
Add Win + F12 to toggle compositor
-rwxr-xr-x | SystemdGraphicalSession/compmgrtoggle | 21 | ||||
-rw-r--r-- | SystemdGraphicalSession/xbindkeysrc | 4 |
2 files changed, 25 insertions, 0 deletions
diff --git a/SystemdGraphicalSession/compmgrtoggle b/SystemdGraphicalSession/compmgrtoggle new file mode 100755 index 0000000..1d68a29 --- /dev/null +++ b/SystemdGraphicalSession/compmgrtoggle @@ -0,0 +1,21 @@ +#!/bin/sh +set -e +case "$1" in + start) + systemctl --user start compositor + exec notify-send --icon=dialog-information 'Compositor' 'Compositor is started' + ;; + stop) + systemctl --user stop compositor + exec notify-send --icon=dialog-information 'Compositor' 'Compositor is stopped' + ;; + *) + if systemctl --user status compositor > /dev/null; then + systemctl --user stop compositor + exec notify-send --icon=dialog-information 'Compositor' 'Compositor is stopped' + else + systemctl --user start compositor + exec notify-send --icon=dialog-information 'Compositor' 'Compositor is started' + fi + ;; +esac diff --git a/SystemdGraphicalSession/xbindkeysrc b/SystemdGraphicalSession/xbindkeysrc index 2bed0fd..8acbcb3 100644 --- a/SystemdGraphicalSession/xbindkeysrc +++ b/SystemdGraphicalSession/xbindkeysrc @@ -82,5 +82,9 @@ "xterm -fullscreen ~/.local/pwrdialog" Control + Mod1 + Delete +# Compositor +"~/.local/compmgrtoggle" + Mod4 + F12 + # # End of xbindkeys configuration |