Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-04-02 20:46:33

theOtherCharles
Member
Registered: 2018-01-05
Posts: 30
LinuxChrome 134.0

Toggling presentation mode from the keyboard

This might make a useful addition to the documentation.

Presentation mode turns off the screen saver and automatic locking. It is nice while you are watching a movie or giving a presentation.

Ordinarily you can access it from the upper panel, power manager plugin. You may have to enable it: right click on the power manager plugin, go to properties, and enable "Show 'Presentation mode' indicator:".

However you may want to toggle it on or off in a script. If so:

xfconf-query -c xfce4-power-manager -n -p /xfce4-power-manager/presentation-mode -T

That works fine in a terminal window as well.

Now, suppose you want to assign that to a keystroke, say <Alt>p? Do this:

xfconf-query -v -c xfce4-keyboard-shortcuts -n -p "/commands/custom/<Alt>p" -t string -s "xfconf-query -c xfce4-power-manager -n -p /xfce4-power-manager/presentation-mode -T"

I welcome suggestions for improvement.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.010 seconds, 9 queries executed - Memory usage: 512.76 KiB (Peak: 513.38 KiB) ]