switch: attempt to react to the hardware button

I don't know whether this works. On the v4 firmware, we can see files in
/etc/gl-switch.d but I don't know yet how the system determines which
file to choose. I assume it's dependend on the "page" of the display.
But I haven't figured out yet how or rather where those pages are
organised.
This commit is contained in:
Tobias Mueller 2023-10-16 12:14:00 +02:00
parent 1a17e06a12
commit 843ddf9e7d

View File

@ -0,0 +1,14 @@
#!/bin/sh
action=$1
if [ "$action" = "on" ];then
echo "on" > /tmp/sim_change_switch
elif [ "$action" = "off" ];then
echo "off" > /tmp/sim_change_switch
else
echo "off" > /tmp/sim_change_switch
fi
sleep 1