[nix] React to plug / unplug events from both keyboards
This commit is contained in:
parent
c0afaba510
commit
30c10e28c4
|
@ -2,7 +2,8 @@
|
|||
|
||||
# Watch for the Keyboard instead of the Thinkpad dock since this keeps us from tripping
|
||||
# into weird race conditions as the docks usb hub takes a few seconds to settle.
|
||||
if [[ "${NAME}" != '"ZSA Technology Labs Inc ErgoDox EZ Shine Keyboard"' ]]; then
|
||||
if [[ "${NAME}" != '"ZSA Technology Labs Inc ErgoDox EZ Shine Keyboard"' ]] &&
|
||||
[[ "${NAME}" != '"ZSA Technology Labs Planck EZ Glow Keyboard"' ]]; then
|
||||
echo "Skipping superfluous events for ${NAME}" >> /tmp/thinkpad.log
|
||||
exit 0
|
||||
fi;
|
||||
|
|
|
@ -148,8 +148,8 @@
|
|||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="remove", ATTRS{idVendor}=="3297", ATTRS{idProduct}=="4975", RUN+="${pkgs.su}/bin/su bascht --shell ${pkgs.bash}/bin/bash /home/bascht/bin/thinkpad-dock", OWNER="bascht"
|
||||
ACTION=="add", ATTRS{idVendor}=="3297", ATTRS{idProduct}=="4975", RUN+="${pkgs.su}/bin/su bascht --shell ${pkgs.bash}/bin/bash /home/bascht/bin/thinkpad-dock", OWNER="bascht"
|
||||
ACTION=="remove", ATTRS{idVendor}=="3297", RUN+="${pkgs.su}/bin/su bascht --shell ${pkgs.bash}/bin/bash /home/bascht/bin/thinkpad-dock", OWNER="bascht"
|
||||
ACTION=="add", ATTRS{idVendor}=="3297", RUN+="${pkgs.su}/bin/su bascht --shell ${pkgs.bash}/bin/bash /home/bascht/bin/thinkpad-dock", OWNER="bascht"
|
||||
'';
|
||||
|
||||
nixpkgs.config.joypixels.acceptLicense = true;
|
||||
|
|
Loading…
Reference in New Issue