Skip to content

Xfce – Set a keyboard shortcut for compositing toggle

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.

One Comment Post a comment
  1. Kymin KIM #

    THX! This is exactly what I was looking for. Gotta try it, but cudos first.

    April 7, 2021

Leave a comment to Kymin KIM Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.