[nix] React to plug / unplug events from both keyboards

This commit is contained in:
Sebastian Schulze 2022-03-04 09:39:42 +01:00
parent c0afaba510
commit 30c10e28c4
Signed by: bascht
GPG Key ID: 5BCB1D3B4D38A35A
2 changed files with 4 additions and 3 deletions

View File

@ -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;

View File

@ -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;