Last active
August 14, 2017 11:34
-
-
Save dartov/c19d6d5ae5ac33d18373720bd4cbd2af to your computer and use it in GitHub Desktop.
Scripts to switch dark mode / light mode for my main apps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- turn on Dark Mode on macOS | |
tell application "System Events" | |
tell appearance preferences | |
set dark mode to true | |
end tell | |
end tell | |
-- turn on Dark Palette on OmniFocus | |
tell application "OmniFocus" | |
set value of preference id "OFIColorPaletteIdentifier" to "builtin:OmniFocus Dark" | |
end tell | |
-- copy settings file to Sublime Text 3 | |
do shell script "cp ~/etc/ST3_pref_dark.json ~/Library/Application\\ Support/Sublime\\ Text\\ 3/Packages/User/Preferences.sublime-settings" | |
-- iTerm | |
-- Ideally I would change profile or default profile, but it's not exposed to AppleScript | |
tell application "iTerm" | |
repeat with theWindow in windows | |
repeat with theTab in tabs of theWindow | |
repeat with theSession in sessions of theTab | |
tell theSession | |
set color preset to "Solarized Dark" | |
end tell | |
end repeat | |
end repeat | |
end repeat | |
end tell | |
-- Alfred | |
tell application "Alfred 3" | |
set theme "Alfred macOS Dark" | |
end tell | |
-- Bear Notes | |
open location "bear://x-callback-url/change-theme?theme=Solarized%20Dark" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- turn on Dark Mode on macOS | |
tell application "System Events" | |
tell appearance preferences | |
set dark mode to false | |
end tell | |
end tell | |
-- turn on Dark Palette on OmniFocus | |
tell application "OmniFocus" | |
set value of preference id "OFIColorPaletteIdentifier" to "default" | |
end tell | |
-- copy settings file to Sublime Text 3 | |
do shell script "cp ~/etc/ST3_pref_light.json ~/Library/Application\\ Support/Sublime\\ Text\\ 3/Packages/User/Preferences.sublime-settings" | |
-- iTerm | |
-- Ideally I would change profile or default profile, but it's not exposed to AppleScript | |
tell application "iTerm" | |
repeat with theWindow in windows | |
repeat with theTab in tabs of theWindow | |
repeat with theSession in sessions of theTab | |
tell theSession | |
set color preset to "Solarized Light" | |
end tell | |
end repeat | |
end repeat | |
end repeat | |
end tell | |
-- Alfred | |
tell application "Alfred 3" | |
set theme "Alfred macOS" | |
end tell | |
-- Bear Notes | |
open location "bear://x-callback-url/change-theme?theme=Solarized%20Light" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment