0

I have Gnome Tweaks installed on Ubuntu, and I was curious if it is possible to assign font colors and styles to Gedit and Terminal through the system theme to create a more unified look.

As I workaround, I was able to select Solarized in both apps, but the backgrounds didn't match the Arc-Dark theme. So in Gnome Terminal I had to customize the background and manually enter the hex code used for the Arc-Dark background. In Gedit I was able to save a copy of the Gedit Solarized .xml file in /.local/share/gedit/styles and slightly adjust the hex code to match Terminal.

The downside of the workaround is that if I change my system theme, I also have to go into each app and change the font colors. It would be nice if there was an option in both apps to use the system theme, but I was curious if anyone knew if that was even possible.

References:

guttermonk
  • 1,004
  • 14
  • 29
  • GNOME Terminal's Preferences -> Colors tab has an option "Use colros from system there", is this what you're looking for? – egmont Mar 03 '22 at 21:06
  • That does help with setting the background to match the system theme, but it doesn't help with using a custom theme that isn't already preloaded in Gnome Terminal and having it match Gedit. I'm pretty sure that what I'm wanting to do can't be done out of the box, but I'm not sure if there's a way of doing it by hacking on something. – guttermonk Mar 03 '22 at 21:47
  • 1
    I'm not familiar with gedit's syntax highlighting and similar definitions, but I'd guess it can work from an unlimited number of colors. The terminal, due to the legacy of all terminals, primarily uses a set of 2 (default fg + bg) + 16 (palette) colors. GNOME Terminals allows you to take the 2 values from global GTK settings, but the 16 palette colors are the terminal's own business, not shared by or taken from any other GNOME setting. You can programatically query and set them using dconf or gsettings under /org/gnome/terminal/legacy, see e.g. https://askubuntu.com/q/803230/398785. – egmont Mar 04 '22 at 15:14
  • It might be a fun project to make a script that parses one of the gedit themes posted at gnome-look.org and automatically pull 16 hex codes along with the theme name and feed them to terminal using dconf or gsettings (depending on your version of Ubuntu) to make a matching profile. That's still kind of kludgy - Ideally a font color palette could be chosen in the system appearance settings, and it could be an option in any app whether to apply it. – guttermonk Mar 04 '22 at 17:47

0 Answers0