Last active
January 28, 2022 12:17
-
-
Save gdamjan/1434504 to your computer and use it in GitHub Desktop.
Udev rules etc...
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
# set the microphone mute led to glow when capture is enabled | |
ACTION=="add",SUBSYSTEM=="sound",KERNEL=="ctl-led",ATTR{mic/mode}="follow-route" |
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
# /etc/udev/rules.d/50-my-local.rules | |
# use `udevadm info -a /dev/...` to find out the attributes of your device | |
ACTION!="add", GOTO="rules_end" | |
# yubikey-4 | |
SUBSYSTEM=="usb", ATTR{idVendor}=="1050", ATTR{idProduct}=="0406", TAG+="uaccess" | |
# Oneplus 3 adb | |
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee7", ATTR{serial}=="6780d2a3", TAG+="uaccess", SYMLINK+="oneplus3" | |
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d00d", ATTR{serial}=="6780d2a3", TAG+="uaccess", SYMLINK+="fastboot" | |
# setup custom keys on some of my input devices | |
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="Logitech G500", ENV{ID_INPUT_KEYBOARD}=="1", RUN+="keymap $name /etc/udev/keymaps/logitech-g500" | |
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="Targus Bluetooth Presenter for Mac (AMP11)", RUN+="keymap $name /etc/udev/keymaps/targus-presenter-amp11" | |
# symlink for the Bus Pirate | |
SUBSYSTEM=="tty", ENV{ID_MODEL}=="Bus_Pirate_V4", TAG+="uaccess", SYMLINK+="bus-pirate", ENV{ID_MM_DEVICE_IGNORE}="1" | |
# irtoy | |
SUBSYSTEM=="tty", ATTRS{idProduct}=="fd08", ATTRS{idVendor}=="04d8", TAG+="uaccess", SYMLINK+="irtoy" | |
# symlinks for Arduinos | |
SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", TAG+="uaccess", SYMLINK+="arduino arduino_$attr{serial}" | |
SUBSYSTEMS=="usb", ATTRS{product}=="ARDUINO NANO", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", TAG+="uaccess", SYMLINK+="arduino arduino_nano_$attr{serial}" | |
# arduino nano | |
SUBSYSTEM=="tty", ATTRS{idProduct}=="7523", ATTRS{idVendor}=="1a86", TAG+="uaccess" | |
# u2f zero | |
SUBSYSTEM=="usb", ATTR{manufacturer}=="Silicon Labs", ATTR{product}=="U2F Zero", TAG+="uaccess" | |
# segger j-link | |
SUBSYSTEM=="usb", ATTR{idVendor}=="1366", ATTR{idProduct}=="0101", TAG+="uaccess" | |
# st-link | |
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="374b", TAG+="uaccess" | |
# Texas Instruments In-Circuit Debug Interface / stellaris launchpad | |
SUBSYSTEM=="usb", ATTR{idVendor}=="1cbe", ATTR{idProduct}=="00fd", TAG+="uaccess" | |
# DFU on BluePill | |
SUBSYSTEM=="usb", ATTR{idVendor}=="1d50", ATTR{idProduct}=="6017", TAG+="uaccess" | |
LABEL="rules_end" |
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
# /etc/udev/hwdb.d/99-mouse.hwdb | |
# a4tech n-708x | |
evdev:input:b0003v093Ap2521* | |
KEYBOARD_KEY_90005=back | |
KEYBOARD_KEY_90004=forward | |
# Logitech G500 | |
keyboard:usb:v046DpC068d* | |
KEYBOARD_KEY_07004b=back | |
KEYBOARD_KEY_07004e=forward | |
KEYBOARD_KEY_0700e2=reserved | |
KEYBOARD_KEY_07002b=cyclewindows |
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
# /etc/udev/keymaps/targus-presenter-amp11 | |
0x7002F pageup # mouse mode - 1st app button | |
0x70030 pagedown # mouse mode - 2nd app button | |
0x70005 left # presenter mode - 1st app button | |
0x70013 right # presenter mode - 2nd app button | |
0x700E1 reserved # ignore | |
0x700E2 reserved # ignore | |
0x700E3 reserved # ignore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment