iTerm theme switching from console
This commit is contained in:
parent
9dd3d223ba
commit
71aa681d36
|
@ -1647,6 +1647,8 @@
|
||||||
<true/>
|
<true/>
|
||||||
<key>MaxVertically</key>
|
<key>MaxVertically</key>
|
||||||
<false/>
|
<false/>
|
||||||
|
<key>NSColorPanelMode</key>
|
||||||
|
<string>6</string>
|
||||||
<key>NSNavLastRootDirectory</key>
|
<key>NSNavLastRootDirectory</key>
|
||||||
<string>~/.dotfiles/iterm2/themes</string>
|
<string>~/.dotfiles/iterm2/themes</string>
|
||||||
<key>NSQuotedKeystrokeBinding</key>
|
<key>NSQuotedKeystrokeBinding</key>
|
||||||
|
@ -1683,10 +1685,12 @@
|
||||||
<key>TB Size Mode</key>
|
<key>TB Size Mode</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>NSWindow Frame NSColorPanel</key>
|
||||||
|
<string>307 274 214 309 0 0 1440 878 </string>
|
||||||
<key>NSWindow Frame Preferences</key>
|
<key>NSWindow Frame Preferences</key>
|
||||||
<string>304 393 924 485 0 0 1440 878 </string>
|
<string>304 393 924 485 0 0 1440 878 </string>
|
||||||
<key>NSWindow Frame iTerm Window 0</key>
|
<key>NSWindow Frame iTerm Window 0</key>
|
||||||
<string>0 4 1431 874 0 0 1440 878 </string>
|
<string>419 240 570 426 0 0 1440 878 </string>
|
||||||
<key>NSWindow Frame iTerm Window 1</key>
|
<key>NSWindow Frame iTerm Window 1</key>
|
||||||
<string>0 452 570 426 0 0 1440 878 </string>
|
<string>0 452 570 426 0 0 1440 878 </string>
|
||||||
<key>NSWindow Frame iTerm Window 2</key>
|
<key>NSWindow Frame iTerm Window 2</key>
|
||||||
|
@ -2411,6 +2415,8 @@
|
||||||
<string>/Users/chez/Code</string>
|
<string>/Users/chez/Code</string>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
|
<key>NoSyncNeverRemindPrefsChangesCopy</key>
|
||||||
|
<true/>
|
||||||
<key>OnlyWhenMoreTabs</key>
|
<key>OnlyWhenMoreTabs</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>OpenArrangementAtStartup</key>
|
<key>OpenArrangementAtStartup</key>
|
||||||
|
@ -2507,7 +2513,7 @@
|
||||||
<key>UseCompactLabel</key>
|
<key>UseCompactLabel</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>UseLionStyleFullscreen</key>
|
<key>UseLionStyleFullscreen</key>
|
||||||
<false/>
|
<true/>
|
||||||
<key>WebKitDefaultFontSize</key>
|
<key>WebKitDefaultFontSize</key>
|
||||||
<integer>11</integer>
|
<integer>11</integer>
|
||||||
<key>WebKitStandardFont</key>
|
<key>WebKitStandardFont</key>
|
||||||
|
|
|
@ -1,12 +1,50 @@
|
||||||
local sublime_conf_location=~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/Preferences.sublime-settings
|
local sublime_conf_location=~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/Preferences.sublime-settings
|
||||||
local theme="$1"
|
local theme="$1"
|
||||||
|
|
||||||
case $theme in
|
case $theme in
|
||||||
light|dark)
|
|
||||||
local sublime_conf_file="$ZSH/sublime/config-$theme" ;;
|
|
||||||
*)
|
|
||||||
local sublime_conf_file="$ZSH/sublime/config-dark" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
rm $sublime_conf_location
|
light)
|
||||||
cp $sublime_conf_file $sublime_conf_location
|
|
||||||
|
cp $ZSH/sublime/config-light $sublime_conf_location
|
||||||
|
osascript <<-END
|
||||||
|
tell application "iTerm"
|
||||||
|
repeat with myTerminal in terminals
|
||||||
|
repeat with mySession in sessions in myTerminal
|
||||||
|
tell mySession
|
||||||
|
set background color to {64842, 62778, 56626}
|
||||||
|
set bold color to {18134, 23373, 25098}
|
||||||
|
set cursor color to {21257, 26684, 28737}
|
||||||
|
set cursor_text color to {60037, 58326, 52284}
|
||||||
|
set foreground color to {21257, 26684, 28737}
|
||||||
|
set selection color to {60037, 58326, 52284}
|
||||||
|
set selected text color to {18134, 23373, 25098}
|
||||||
|
end tell
|
||||||
|
end repeat
|
||||||
|
end repeat
|
||||||
|
end tell
|
||||||
|
END
|
||||||
|
;;
|
||||||
|
|
||||||
|
dark)
|
||||||
|
|
||||||
|
cp $ZSH/sublime/config-dark $sublime_conf_location
|
||||||
|
osascript <<-END
|
||||||
|
tell application "iTerm"
|
||||||
|
repeat with myTerminal in terminals
|
||||||
|
repeat with mySession in sessions in myTerminal
|
||||||
|
tell mySession
|
||||||
|
set background color to {0, 7722, 9941}
|
||||||
|
set bold color to {33160, 37017, 36937}
|
||||||
|
set cursor color to {28873, 33398, 33872}
|
||||||
|
set cursor_text color to {0, 10207, 12694}
|
||||||
|
set foreground color to {28873, 33398, 33872}
|
||||||
|
set selection color to {0, 10207, 12694}
|
||||||
|
set selected text color to {33160, 37017, 36937}
|
||||||
|
end tell
|
||||||
|
end repeat
|
||||||
|
end repeat
|
||||||
|
end tell
|
||||||
|
END
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
Loading…
Reference in New Issue