Last active
January 7, 2018 23:08
-
-
Save umpirsky/68a0055f10c4e502d4b31f20c5eb1d11 to your computer and use it in GitHub Desktop.
Turn keyboard backlight on/off using https://github.com/MatMoul/g810-led
This file contains hidden or 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 | |
# Turn keyboard backlight on/off using https://github.com/MatMoul/g810-led | |
g413-led -a FFFFFF # always turn on on startup (it turns off for some reason on reboot) | |
dbus-monitor --session "type=signal,interface=org.gnome.SessionManager.Presence,member=StatusChanged" | | |
while read x; do | |
case "$x" in | |
*"uint32 3"*) g413-led -a 000000;; | |
*"uint32 0"*) g413-led -a FFFFFF;; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment