Skip to content

Instantly share code, notes, and snippets.

@erwin
erwin / turn-off-device.sh
Last active June 24, 2024 22:14
Shell Script to Disconnect / Reconnect USB device
#!/bin/bash
# In my case, I would like to turn off my HUGE TRACKBALL sometimes, because it
# gets disconnected from the USB bus... Not very often, but a few times per month
# I launch this script with a tool like `rofi` or `dmenu`.
#
# You can easily adjust this script to work for any USB device by changing the
# these variables for the hex code of vendor and product.
#
#