This small utility will convert iTerm2 *.itemcolors files to Gnome Terminal profiles. I first found this project and while it did the job, I found it to be lacking in some areas. I was originally going to fork it, but I ended up making it so different that I opted to create a new project.
- Python >= 3.7
The package includes two scripts:
iterm-color-to-gnome-terminal.py
- This script reads an iTerm2 *.itemcolors file, parses its color information, and outputs a *.dconf file.import-gnome-terminal-profile.py
- This script reads the *.dconf file generated by the previous script and does two things. First, it creates the profile in dconf under/org/gnome/terminal/legacy/profiles:/
. Next, it appends/org/gnome/terminal/legacy/profiles:/list
to make the new profile available.
iterm-color-to-gnome-terminal.py
has only two options:
--input
(required) - The path to the *.itemcolors file you want to use.--name
(optional) - A name for the profile. If this flag is not supplied, the input base filename, minus the extension, will be used as the Gnome Terminal profile name.
import-gnome-terminal-profile.py
has only one option.
--input
(required) - The path to the *.dconf file you want to use
Dumping an iTerm2 color scheme to a file that can be imported into Gnome Terminal
$ ./iterm-color-to-gnome-terminal.py -i ~/iTermSchemes/Novel.itermcolors
$ ./iterm-color-to-gnome-terminal.py -i ~/iTermSchemes/poorlynamedfile.itermcolors -n "Much Fancier Name"
Importing a dump file into Gnome Terminal
$ ./import-gnome-terminal-profile.py -i Novel.itermcolors
- Better error trapping
- The ability to copy and delete profiles
- Whatever other fun things I can think of