4 ms·
I would love to have it to automate sudo killall -STOP -c usbd Let's see if it works - Automator didn't work too well
by dep_b 7y ago
I would love to have it to automate
sudo killall -STOP -c usbd
Let's see if it works - Automator didn't work too well
- saagarjha 7y agoJust curious, why do you need to do this?
- the_other 7y agoPossibly for the bug/feature that causes an iPhone connected by USB to connect and disconnect repeatedly on a ~2sec cycle, The bug leads to endless modals appearing on the iPhone, and sometimes iTunes opening with each reconnection.
- firloop 7y agoDon't use Hammerspoon, but I've managed to create `sudo killall` keybindings with skhd by wrapping AppleScript. cmd + shift - 9 : /usr/bin/osascript -e 'do shell script "killall coreaudiod 2>&1" with administrator privileges' Here's the relevant line from my skhd configuration. This does pop a password prompt, but it works. I imagine you could adapt this to fit Hammerspoon.