Created
May 6, 2021 10:36
-
-
Save mibli/89c02bf6fcd4283e6369fb0124ad7a1b to your computer and use it in GitHub Desktop.
XBox Controller notifications on connect/disconnect
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
[Unit] | |
Description=Mopidy | |
[Service] | |
ExecStart=sh -c 'journalctl -ft xow | sed -nue "s/.*\s-\s//" -e "/Controller .* \(dis\)\?connected/p;/Battery level:/p" | xargs -I{} notify-send "{}"' | |
Restart=on-failure | |
RestartPreventExitStatus=1 | |
SuccessExitStatus=2 | |
RestartForceExitStatus=3 4 | |
[Install] | |
WantedBy=default.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment