[kwlug-disc] Mouse waking up laptop from sleep
Khalid Baheyeldin
kb at 2bits.com
Wed Jun 24 12:11:42 EDT 2020
On Wed, Jun 24, 2020 at 11:48 AM Andrew Kohlsmith (mailing lists account) <
aklists at mixdown.ca> wrote:
> I wonder if it could be done automatically when the USB device is
> “connected” rather than through cron.
In my case, the small dongle for the mouse remains in the laptop all the
time, so not an issue.
But what you want can definitely be done.
For that, you use udev with a vendor id and product id, and the same script
as an action.
Something like the following saved to /etc/udev/rules.d/99-mouse.rules
ACTION=="add", ATTRS{vendor}=="abcd", ATTRS{model}=="1234",
"SUBSYSTEM=="usb", RUN+="/usr/local/bin/something.sh"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20200624/4fba5c2a/attachment.htm>
More information about the kwlug-disc
mailing list