3 ms·
This is actually very neat, I haven't though about pausing desktop applications to save battery/CPU before. Tried it out real quick with Safari on my work lapto
by hultner 8y ago
This is actually very neat, I haven't though about pausing desktop applications to save battery/CPU before. Tried it out real quick with Safari on my work laptop (macOS), worked like a charm with
killall -STOP "Safari"
Safari is paused/suspended
killall -CONT "Safari"
Responding again.
Shouldn't be to hard to hook it up to a keyboard shortcut which grabs the active window and sends stop/continue signals to that window.
- vermaden 8y agoThe `xdotool` is available in the https://brew.sh https://brew.sh so you can just use the provided `desktop-pause.sh` script with a shortcut which does exactly that - "grabs the active window and sends stop/continue signals to that window".
- hultner 8y agoDoes this work for Aqua applications as well? I'm thinking we'd like to use something like Hammerspoon or AppleScript to fetch the PID of the currently focused window. https://www.hammerspoon.org https://www.hammerspoon.org