I use Xfce as my primary desktop environment, and recently, I found the need to disable and enable compositing on a regular basis. This led to my search for a way to do this via keyboard shortcuts, as it was quite inconvenient to have to open the Window Manager Tweaks GUI each time to simply toggle a check box.
So, I discovered xfconf-query, and upon some further reading, came to this as the quickest possible way of doing it via the command line:
xfconf-query -Tc xfwm4 -p /general/use_compositing
Create file compositing.sh using the editor of your choice, with the following content:
#!/bin/sh xfconf-query -Tc xfwm4 -p /general/use_compositing
Make the file executable:
chmod u+x compositing.sh
Now open Menu > Settings > Keyboard > Application shortcuts > Add
Voila! Enjoy switching compositing on and off as and when you need to.
Leave a Reply