Sunday, April 28, 2024
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 21172  / 3 Years ago, sun, august 22, 2021, 2:53:37

GNOME Terminal has a few built-in color schemes:



Built-in color schemes in GNOME Terminal



How can I add more to this list?


More From » customization

 Answers
4

Although there is a similar question at Unix&LInux, I can perhaps add some new information and expand some of the points made there in order to give you a few useful pointers. However, it is true to say that you cannot add another 'built in' scheme to the menu as those existing ones are defined in the source code, as you can see if you examine the latest code release.



You could of course patch the source to include your scheme in the choices and then compile the program, but there are some other alternatives which centre around scripting and which I discuss further below.



If you created a color scheme by experimenting with the menus (as in the screenshot below),



enter image description here



you could back it up by noting the instructions in this answer:





Or you could run gconftool-2 -R /apps/gnome-terminal >> file.txt and then use those values in the resulting text file as the basis for a script. A script would be best, as it would be tedious to manually reapply those values by using gconftool-2 or even by editing the .xml file from the correct profile in /home/mike/.gconf/apps/gnome-terminal.



So it seems that scripting is the easiest way to apply or reapply your color scheme settings to any gnome-terminal profile of your choice.



A good model could be provided by the solarised color scheme, which is itself based on the work here. As noted at the github page,




In Gnome terminal, you can add or edit profiles from the menu bar. However,
this functionality is not easliy available from command line. Here, you'll
find a script that will set the palette colors, foreground, background and
highlight colors to a light or dark color scheme, overwriting a color profile
you choose.




It would seem to be possible to adapt the method used for scripting the solarised color scheme, and substitute your own color palettes, etc. After running in terminal



git clone git://github.com/sigurdga/gnome-terminal-colors-solarized.git


and then using cd to get to the resulting folder, you could examine the scripts and files. In the gnome-terminal-colors-solarized folder, there is a script called install.sh in which gconftool-2 is used to apply the values which are specified in the files in the color sub-folder.



It should be possible to create your own custom profile and then change the values of the files in the colors folder, and tweak the scripts if necessary, and then you should be able to apply and reapply your own color scheme, just like you can with the solarised scheme.



If you want to produce a really interesting and original color scheme you might need to do some reading and research from here and other sources on terminal color schemes, and which are best for long periods of terminal usage.


[#34205] Sunday, August 22, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
istmasted

Total Points: 287
Total Questions: 130
Total Answers: 153

Location: Burkina Faso
Member since Thu, Dec 23, 2021
2 Years ago
istmasted questions
;