mate-desktop / marco

MATE default window manager
https://mate-desktop.org
GNU General Public License v2.0
195 stars 86 forks source link

How can I set theme per-application? #653

Open luigifab opened 3 years ago

luigifab commented 3 years ago

Hi, is there a way to set marco theme for a specific application?

Like this: gsettings set org.mate.Marco.general theme Menta But for a specific application.

I can set GTK theme with: g_object_set (gtk_settings_get_default (), "gtk-theme-name", new_theme, NULL); How can I set MARCO theme?

(Marco 1.24, GTK 3.24)

rogerdahl commented 3 years ago

I haven't tried this, but the default location for the file holding the settings you change with gsettings is at ~/.config/dconf/user. You can change the location with the DCONF_PROFILE environment variable. So you should be able to copy your existing file, point to the copy with DCONF_PROFILE and edit it with gsettings to set another theme. Then you can specify this alternate theme by starting the app with DCONF_PROFILE=$HOME/.config/dconf/my-other-theme some-app. Some more info: https://help.gnome.org/admin//system-admin-guide/3.8/dconf-profiles.html.en

Correction: DCONF_PROFILE points to an intermediate file with a list of database names, but not the paths to where the system should look for them. You'll need to investigate a bit more if you want to pursue this sort of solution.