From b8d544dd5ff7b2d769c23723c24a2b33ad4e550f Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 27 May 2024 21:13:17 -0400 Subject: updating tasks, better comments, minor fix, wip: touchpad script fix: - google-chrome-stable package is now google-chrome script: - looking at writing a script that identifies when the Logitech device is attached/detatched so I could turn the touchpad off/on --- scripts/touchpad.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 scripts/touchpad.sh (limited to 'scripts') diff --git a/scripts/touchpad.sh b/scripts/touchpad.sh new file mode 100644 index 0000000..9726abd --- /dev/null +++ b/scripts/touchpad.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +# Craig Jennings + +# https://wiki.archlinux.org/title/udev#Waking_from_suspend_with_USB_device + +# lsusb | grep Logitech +# Bus 007 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver + +# grep c52b /sys/bus/usb/devices/*/idProduct +# /sys/bus/usb/devices/1-1.1.1.4/idProduct:c52b + +# udevadm monitor +# (plug / unplug device) +# pick highest path, as +# sudo udevadm info --attribute-walk --path=/devices/pci... +# will show all attributes for the parents + +# https://www.reactivated.net/writing_udev_rules.html#basic +# udevinfo -a -p /sys/bus/usb/devices/1-1.1.1.4/idProduct:c52b + +echo "THIS SCRIPT ISN'T MEANT TO BE RUN YET." +exit 1 + + +echo -e 'SUBSYSTEMS=="usb", DRIVERS=="usb", ATTRS{manufacturer}=="Logitech", ATTRS{product}=="USB Receiver", ACTION=="add", RUN+="/usr/bin/xinput set-prop \"PIXA3854:00 093A:0274 Touchpad\" \"Device Enabled\" 0"' > /etc/udev/rules.d/01-touchpad.rules + +echo -e 'SUBSYSTEMS=="usb", DRIVERS=="usb", ATTRS{manufacturer}=="Logitech", ATTRS{product}=="USB Receiver", ACTION=="remove", RUN+="/usr/bin/xinput set-prop \"PIXA3854:00 093A:0274 Touchpad\" \"Device Enabled\" 1"' >> /etc/udev/rules.d/01-touchpad.rules + + +# ---------------------------------- Testing ---------------------------------- + +echo -e 'SUBSYSTEMS=="usb", DRIVERS=="usb", ATTRS{manufacturer}=="Logitech", ATTRS{product}=="USB Receiver", ACTION=="add", RUN+="/usr/bin/notify-send "Logitech Receiver Added to USB."' > /etc/udev/rules.d/01-touchpad.rules + + +echo -e 'SUBSYSTEMS=="usb", DRIVERS=="usb", ATTRS{manufacturer}=="Logitech", ATTRS{product}=="USB Receiver", ACTION=="remove", RUN+="/usr/bin/notify-send "Logitech Receiver Removed From USB."' >> /etc/udev/rules.d/01-touchpad.rules -- cgit v1.2.3