View Single Post
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#1
so many years later, finally implemented a hardware button monitor for sailfish!

functionality is similar to n9-button-monitor.

you can use sf-button-monitor to run arbitrary commands while the phone is locked, or unlocked.

tested and working on Xperia X and Xperia X Compact, YMMV

NOTE: core functionality provided by simply reading from:
Code:
/dev/input/by-path/platform-gpio_keys.105-event
dependencies:
perl
dbus-send (for all CONDITIONS, and for all ACTIONS except cmd(SHELL_CMD))

the following unrelated hacks make this script more useful:
-dont unlock the screen when pressing volume/camera
-dont control media volume when screen is locked
-write window title to a file so window() condition can tell which program is running


https://github.com/teleshoes/sf-button-monitor
__________________
~ teleshoes ~

Last edited by wolke; 2020-09-05 at 15:40.
 

The Following 16 Users Say Thank You to wolke For This Useful Post: