0

Task / Problem:

I have a self-created gtk3-theme in ~/.local/share/themes/mytheme/gtk-3.0/gtk.css. I would like to apply that style systemwide. How would I do that?

System:

  • XUbuntu 19.04
  • GTK version: 3.24

What I did / have:

  • Prepare ~/.local/share/themes/mytheme/gtk-3.0/gtk.css
  • Created ~/.local/share/themes/mytheme/index.theme with the following content:
Type=X-GNOME-Metatheme
Name=mytheme
Comment=mytheme
Encoding=UTF-8

[X-GNOME-Metatheme]
GtkTheme=mytheme
MetacityTheme=mytheme
ButtonLayout=:minimize,maximize,close
  • Created ~/.local/share/themes/mytheme/gtk-3.0/gtk.gresource.xml with the following content:
<?xml version='1.0' encoding='UTF-8'?>
<gresources>
    <gresource prefix='/usr/darktrick/gtk-3.0'>
        <file preprocess='to-pixdata'>images/icon_close.png</file>
        <file preprocess='to-pixdata'>images/icon_close_active.png</file>
        <file preprocess='to-pixdata'>images/icon_maximize.png</file>               
        <file preprocess='to-pixdata'>images/icon_minimize.png</file>       
        <file>gtk.css</file>
    </gresource>
</gresources>
  • Tested css with GtkInspector (under CSS): worked fine
  • Theme is available in GtkInspector under Visual to be applied manually.
  • edit: I have chosen mytheme through the WindowManager dialog.
DarkTrick
  • 2,447
  • 1
  • 21
  • 39

1 Answers1

0

I stumbled across the answer.

Open "Settings Editor" -> channel "xsettings" -> Net -> ThemeName -> Type the folder name of the theme you'd like to have applied

DarkTrick
  • 2,447
  • 1
  • 21
  • 39