This commit is contained in:
2025-09-29 11:50:02 -07:00
parent fdb4242e9d
commit a657b75d7e
4 changed files with 20 additions and 4 deletions

View File

@@ -104,6 +104,22 @@ alias ncmpcpp='ncmpcpp -b ~/.config/ncmpcpp/bindings'
alias ll='ls -l --color=auto'
alias la='ls -la --color=auto'
#######################################################
# FUNCTIONS
#######################################################
# Reset all USB devices after suspend/hibernate if they vanish
usbreset() {
echo "Re-authorizing all USB devices..."
for d in /sys/bus/usb/devices/*/authorized; do
if [[ -w $d ]]; then
echo 0 | sudo tee "$d" >/dev/null
echo 1 | sudo tee "$d" >/dev/null
fi
done
echo "Done. Check with lsusb."
}
#######################################################
# KEYBINDS
#######################################################