-
-
Save kimmoli/69f15b7fc387152eca4e to your computer and use it in GitHub Desktop.
onyx tristate-switch ambience switcher p.o.c.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
evdev_trace -t 0 | while read -r line; | |
do | |
if echo $line | grep "0x258.*1" > /dev/null | |
then | |
dbus-send --type=method_call --dest=com.jolla.ambienced /com/jolla/ambienced com.jolla.ambienced.setAmbience string:"file:///usr/share/ambience/silent/silent.ambience" | |
fi | |
if echo $line | grep "0x259.*1" > /dev/null | |
then | |
dbus-send --type=method_call --dest=com.jolla.ambienced /com/jolla/ambienced com.jolla.ambienced.setAmbience string:"file:///usr/share/ambience/sailing/sailing.ambience" | |
fi | |
if echo $line | grep "0x25a.*1" > /dev/null | |
then | |
dbus-send --type=method_call --dest=com.jolla.ambienced /com/jolla/ambienced com.jolla.ambienced.setAmbience string:"file:///usr/share/ambience/origami/origami.ambience" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment