You are not logged in.

#1 2025-03-29 10:07:34

SimonJ
Member
Registered: 2021-05-11
Posts: 193

[SOLVED] XFCE4 presentation mode

Hello, I am wondering if anyone has experience in testing if XFCE4 is in presentation mode, a while ago I started adding

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

to my scripts to disable the machine power settings and running the same command at the end to switch it off.
My issue is if I run two scripts it turns it off while they are active, I cannot find the command to tell me if it is already in presentation mode.
Is this an option? Thank you for any help or pointers :-)

Last edited by SimonJ (2025-03-29 12:44:13)


Rlu: 222126

Offline

#2 2025-03-29 10:41:43

toz
Member
Registered: 2011-10-28
Posts: 507

Re: [SOLVED] XFCE4 presentation mode

If you run the command without the "-T", it will return the current state of the setting:

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

Then you can add conditionals to your script to react on the output. Something like:

#!/usr/bin/env bash

STATE=$(xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode)

if [ $STATE == "true" ]; then
	echo yes
else
	echo no
fi

Offline

#3 2025-03-29 12:43:57

SimonJ
Member
Registered: 2021-05-11
Posts: 193

Re: [SOLVED] XFCE4 presentation mode

toz wrote:

If you run the command without the "-T", it will return the current state of the setting:

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

Then you can add conditionals to your script to react on the output. Something like:

#!/usr/bin/env bash

STATE=$(xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode)

if [ $STATE == "true" ]; then
	echo yes
else
	echo no
fi

Perfect thank you :-)


Rlu: 222126

Offline

Board footer

Powered by FluxBB