From fee0f43de499250f0b9b74a81eaa11e116107ff1 Mon Sep 17 00:00:00 2001 From: Tharre Date: Mon, 22 Jan 2018 18:08:35 +0100 Subject: zsh: add reset_usb() --- .zshrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.zshrc b/.zshrc index 14a35a9..6d84bf8 100644 --- a/.zshrc +++ b/.zshrc @@ -168,6 +168,12 @@ function suspend_after() { systemctl suspend } +function reset_usb() { + for i in /sys/bus/pci/drivers/[uoex]hci_hcd/*:*; do + echo "${i##*/}" | sudo tee "${i%/*}/"{unbind,bind} + done +} + ## PATH export PATH=$PATH:$HOME/bin -- cgit v1.2.3-70-g09d2