You are not logged in.
Pages: 1
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
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
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
Pages: 1