diff options
author | Teddy Wing | 2019-10-31 21:31:10 +0100 |
---|---|---|
committer | Teddy Wing | 2019-10-31 21:34:42 +0100 |
commit | ab8d4c637552a1aa9db480fd4f7f60c8a47b80c3 (patch) | |
tree | 3e9cb89ae236df617a479d7211f83429b64af1be /init.lua | |
parent | 7662961f51819d6db27ec09cb0845b7060ab4206 (diff) | |
download | dothammerspoon-ab8d4c637552a1aa9db480fd4f7f60c8a47b80c3.tar.bz2 |
init: Reset brightness in F8 invert screen colours binding
Mac OS X 10.15 Catalina sometimes (but not always) causes the internal
display's brightness to change to the maximum when connected to an
external monitor after inverting screen colours. In our F8 shortcut
which inverts screen colours, reset the screen brightness to correct
this idiocy.
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -32,4 +32,11 @@ spoon.WindowMode:bindHotkeys({ mode = {{'ctrl', 'option'}, 'w'} }) -- Shortcut to invert screen colours hs.hotkey.bind({}, 'f8', function() hs.eventtap.keyStroke({'cmd', 'option', 'ctrl'}, '8') + + -- Counteract a Catalina bug where sometimes inverting screen colours with + -- an external monitor connected makes the internal monitor's brightness + -- change to 100%. + if hs.screen.primaryScreen():name() ~= 'G247HL' then + cbb_brightness_restore() + end end) |