How can I get a list of the available themes for Terminal on OSX?

94 Views Asked by At

I would like to get the list of available Terminal themes, i.e. Basic, Grass, Ocean etc., using a bash script.

1

There are 1 best solutions below

1
Santanu Karar On

So far, the only option I found with following command run:

defaults read com.apple.Terminal "Window Settings"

This will returns all the available Terminal theme with their respective details in NeXTSTEP format. Example,

Basic =     {
        Font = {length = 266, bytes = 0x62706c69 73743030 d4010203 04050607 ... 00000000 000000ce };
        FontAntialias = 1;
        FontWidthSpacing = "1.004032258064516";
        ProfileCurrentVersion = "2.07";
        name = Basic;
        type = "Window Settings";
    };

However, I didn't found a way to convert the format in JSON easily except using "plutil". Unfortunately, "plutil" seems not available pre-installed in macOS.