keep a dark background when toggling between light/dark modes in OSX
(Use something other than control-shift-option-8 to trigger, I'm using control-command-8)
If background stays light, toggle state of c-s-o-8 once to get background in sync first.
save as an applescript service that receives no input:
tell application "System Events"
tell current desktop
get properties
set desktop_pic to picture as Unicode text
end tell
end tell
if "Light" is not in desktop_pic then
set desktop_pic to POSIX file "/Library/Desktop Pictures/Solid Colors/Solid Gray Light.png"
else
set desktop_pic to POSIX file "/Library/Desktop Pictures/Solid Colors/Solid Gray Dark.png"
end if
tell application "Finder"
set desktop picture to file desktop_pic
end tell
tell application "System Events"
tell application processes
key code 28 using {command down, option down, control down}
end tell
end tell
inspired by: http://kinderman.net/articles/2007/11/11/reversing-screen-colors-on-a-mac-and-keeping-a-black-background-on-terminal