2

I found the One Dark Terminal color scheme and I'm in love with it, but it only provides a .terminal file. I know that.terminal files are what OSX uses to theme its Terminal, but so far I've been unable to find literature on how to use a .terminal file to change the scheme of an Ubuntu Gnome terminal.

I'd appreciate some instructions on how to do so.

Thanks much,

goldage5

  • 1
    Why would a settings file for a Mac work on Linux? – Rinzwind Jun 3 '15 at 19:30
  • I was hoping that there was some tool to parse it into a settings file that Ubuntu can use, or if there was some way to convert it myself. – adeora Jun 3 '15 at 19:43
  • Which version of Gnome Terminal are you using? – Wilf Jun 3 '15 at 20:11
2

The main problems with those themes is they are in Apple's (probably proprietary) format. So you have to decode bits and pieces to find what is used.

You can get the RGB value of each color in this itermcolors version of the theme, or perhaps the original Atom theme - you should then be able use the colour info from those to edit the profile colors:

enter image description here

To some extent, you can also decode some other sections of the theme using base64 - e.g. to find the font by decoding this bit:

$ echo "YnBsaXN0MDDUAQIDBAUGGBlYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QVk5TU2l6ZVhOU2ZGbGFnc1ZOU05hbWVWJGNs
YXNzI0AkAAAAAAAAEBCAAoADXxAVU291cmNlQ29kZVByby1SZWd1bGFy0hMUFRZaJGNs
YXNzbmFtZVgkY2xhc3Nlc1ZOU0ZvbnSiFRdYTlNPYmplY3RfEA9OU0tleWVkQXJjaGl2
ZXLRGhtUcm9vdIABCBEaIy0yNzxCS1JbYmlydHZ4kJWgqbCzvM7R1gAAAAAAAAEBAAAA
AAAAABwAAAAAAAAAAAAAAAAAAADY" | base64 -d ; echo
bplist00�X$versionX$objectsY$archiverT$top��U$null� 


VNSSizeXNSfFlagsVNSNameV$class#@$��_SourceCodePro-Regular�Z$classnameX$classesVNSFont�XNSObject_NSKeyedArchiver�Troot�#-27<BKR[birtvx�����������

From that we can guess the font is Source Code Pro (Regular).


I also found this which may be able to convert the theme to a json format, the issue is it needs libplist integrated with python to work:

$ python ./osxterminalthemer.py --convert json ./One\ Dark\ 0.7.0.terminal 
/bin/sh: plutil: command not found
Traceback (most recent call last):
  File "./osxterminalthemer.py", line 284, in <module>
    thm_data = unpackage_theme(thm_data)
  File "./osxterminalthemer.py", line 150, in unpackage_theme
    v_plist = plistlib.readPlistFromString(v_plist)
  File "/usr/lib64/python2.7/plistlib.py", line 103, in readPlistFromString
    return readPlist(StringIO(data))
  File "/usr/lib64/python2.7/plistlib.py", line 78, in readPlist
    rootObject = p.parse(pathOrFile)
  File "/usr/lib64/python2.7/plistlib.py", line 406, in parse
    parser.ParseFile(fileobj)
xml.parsers.expat.ExpatError: no element found: line 1, column 0

This script was probably made for Mac where the appropriate libraries are available, but I could not get it to work.

0

It seems the repository you link to, also provides an itermcolors file, which appears to have more easily readable data within it. You could parse the floating point values out, and convert them to appropriate hex values for use in the palette setting for a gnome-terminal profile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.