diff options
-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 |