mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 03:06:40 +00:00
When waking macOS from sleep with multiple external monitors, it does not correctly display the wallpaper on all screens, and can sometimes get confused about window placement boundaries. The fix is to simply restart the Dock process which handles these things. This simply adds a cmd+ctrl+alt+k keybinding to trigger this via Hammerspoon. This is particularly useful in the rare occasion you wake a laptop without external displays which were disconnected when it was asleep, as it sometimes gets confused to the point it thinks there are external displays, and does not consider the internal display as part of the usable desktop space, meaning there's no way to open a terminal window to execute `killall Dock`. While this VERY rare, it does still happen, which more than justifies the few lines of lua here.