summaryrefslogtreecommitdiffstats
path: root/.zshrc
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2018-01-22 18:08:35 +0100
committerTharre <tharre3@gmail.com>2018-01-22 18:08:35 +0100
commitfee0f43de499250f0b9b74a81eaa11e116107ff1 (patch)
tree975f99a5a15c6a6a6f0635b6a9f23022d2f4b289 /.zshrc
parent5ecd45707e76c371a36ad6b066504682ecdafc9f (diff)
downloaddotfiles-fee0f43de499250f0b9b74a81eaa11e116107ff1.tar.gz
dotfiles-fee0f43de499250f0b9b74a81eaa11e116107ff1.tar.xz
dotfiles-fee0f43de499250f0b9b74a81eaa11e116107ff1.zip
zsh: add reset_usb()
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc6
1 files changed, 6 insertions, 0 deletions
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