Just found a way! It wasn't documented anywhere but I looked at the rc.all.xml file and there were some special keys for volume control and so on, so I looked where these "XF86"-prefixed things were coming from, and what do you know? There was one for the power button!
Is there a way in labwc to rewire the powerkey to a script?
This is what I had in wayfire.ini:Code:
#command_power = pwrkeycommand_power=/home/pi/luca/shutdown_hdd.sh;sudo shutdown -P now
In ~/.config/labwc/rc.xml add something similar to this "keybind" tag inside the probably already existing "keyboard" tag:
Code:
...<keyboard> <keybind key="XF86PowerOff"> <action name="Execute" command="shutdown -P now" /> </keybind></keyboard>...
Statistics: Posted by 2bam — Tue Feb 04, 2025 6:43 pm