Created
August 15, 2018 03:50
-
-
Save henriquegogo/990849f1a573f4a4e49f7c87d2c1ea3a to your computer and use it in GitHub Desktop.
udev - Detect USB device and launch an action
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
SUBSYSTEM=="usb", ACTION=="add", ENV{ID_MODEL}=="nanoKEY2", TAG+="systemd", ENV{SYSTEMD_WANTS}="midi-keyboard-drums.service" | |
SUBSYSTEM=="usb", ACTION=="remove", ENV{ID_MODEL}=="nanoKEY2", RUN+="/usr/bin/killall fluidsynth" | |
SUBSYSTEM=="usb", ACTION=="add", ENV{ID_MODEL}=="UMX_61", TAG+="systemd", ENV{SYSTEMD_WANTS}="midi-keyboard-rhodes.service" | |
SUBSYSTEM=="usb", ACTION=="remove", ENV{ID_MODEL}=="UMX_61", RUN+="/usr/bin/killall fluidsynth" | |
SUBSYSTEM=="usb", ACTION=="add", ENV{ID_MODEL}=="nanoKEY2", RUN+="/usr/bin/killall emulationstation" | |
SUBSYSTEM=="usb", ACTION=="add", ENV{ID_MODEL}=="UMX_61", RUN+="/usr/bin/killall emulationstation" |
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
[Service] | |
Type=forking | |
ExecStart=/home/pi/Soundfonts/load "/home/pi/Soundfonts/files/Sonic Implants Blue Jay Drums.sf2" |
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
[Service] | |
Type=forking | |
ExecStart=/home/pi/Soundfonts/load /home/pi/Soundfonts/files/jRhodes3c-stereo.sf2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment