Automatically load newly imported color preset
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: 3.0.7
- OS version: OSX 10.11.6
My underlying goal with this request is to be able to script setting up my preferences for a new iTerm2 install.
I've figured out how to set most of the options I want to i.e.
defaults write com.googlecode.iterm2 PromptOnQuit -bool false
/usr/libexec/PlistBuddy -c 'Set :"New Bookmarks":0:"Normal Font" Inconsolata 14' ~/Library/Preferences/com.googlecode.iterm2.plist
/usr/libexec/PlistBuddy -c 'Set :"New Bookmarks":0:"Non Ascii Font" Inconsolata 14' ~/Library/Preferences/com.googlecode.iterm2.plist
And I can import my color preset:
open "solarized/iterm2-colors-solarized/Solarized Dark.itermcolors"
But I can't get it to load the preset without having to set a whole load of color options in com.googlecode.iterm2.
So the ideal would be able to just have one setting to tell iterm to use a specific preset for a profile, but maybe the simplest solution is to automatically load the preset on import (and have a setting to toggle automatic loading defaulted to false if you don't want to change the current default behaviour)
Have you looked at Dynamic Profiles? I think it would solve the problem much more nicely. You'd need to include the colors in your json file. Details here: https://www.iterm2.com/documentation-dynamic-profiles.html
Thanks. That goes most of the way to solving the problem. The only thing I am now missing is how to make the new Dynamic profile the default profile (from the command line)?
Forget my previous comment - I've figured it out. Dynamic profiles and defaults write com.googlecode.iterm2 has got it all working how I want it now.
Status changed to closedToggle commit list