3

Is there a way to specify dark themes for the window decorator (Mutter) for just a single application? (Like Sublime Text).

For example, on the screenshot below one window is customized to have a dark decorator, others follow the system adwaita theme.

enter image description here

I'm successfully able to customize whole GTK3 applications. From window borders (Mutter) to the GTK3 theme itself. However, even when enforcing dark theme in all GNOME apps, GTK2 applications still appear with the classic white border. Is there a way to enforce a dark window border for non GTK3 apps?

  • 1
    I searched on this for a bit and did not find any way to do this using GNOME3. I also looked for extensions thinking there might be some way to accomplish it using an addon but came up empty there as well. – slm Jul 29 '13 at 18:27

2 Answers2

3

You can run this command, and then click on the window you want to have a dark window title:

xprop  -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT dark

If you have some mechanism to find the X window id, you can pass that into xprop -id.

0

It's funny how your question exactly duplicates GTK - Enable/set dark theme on a per-application basis, even your love to the dark theme is there. :)

To summarize, in gtk3 you use settings.ini file to change the default theme of a single application (this is per-user setting), while in gtk2 you used GTK2_RC_FILES environment variable pointing to appropriate gtkrc file.

Boris Burkov
  • 3,980
  • http://unix.stackexchange.com/questions/14129/set-gtk-application-prefer-dark-theme-as-a-user-setting is incorrect. I haven't been able to apply a dark theme to Sublime Text yet. All I have been able to do is change the GTK2 theme (and thus, window borders, Mutter, remains white, making a huge contrast with the content on the window, which is dark). – dfhsfhdsfdhsdfgjsfgjdsdfgjsfgj Jul 30 '13 at 11:21
  • Window decorators with window titles, borders, etc. are created by your window manager, not your application. So to change the window decorator etc., change settings of Mutter. Application itself has nothing to do with them. This separation of window manager style and application style is ugly, but I don't know, if it's possible to do something about that. :( – Boris Burkov Jul 30 '13 at 11:42
  • 1
    Well GNOME 3 has a property that allows you to set entire windows in a dark colour. Yes, including window borders, just like this http://2.bp.blogspot.com/-zpAcxfFhT0s/UGhh6N-380I/AAAAAAAADH8/Vp5DYCOCcFU/s400/GNOME3.6TotemDictionaryTerminalGedit.jpg (it's small but you get the idea). – dfhsfhdsfdhsdfgjsfgjdsdfgjsfgj Jul 30 '13 at 11:46
  • I got the idea. But after an hour of extensive googling I got no results. I suggest that you rename this question to "How to customize window decorator on a per-application basis for a consistent look with per-application gtk theme in Gnome3?" and make your image appear in the question. There are some words about extended window manager hints, so that application could hint the WM geometry and some settings of decorator, but this seems to be a false trace. – Boris Burkov Jul 30 '13 at 12:44
  • Edited, I rephrased it because your suggested title is way too vague and generic for the length of it. Thanks! – dfhsfhdsfdhsdfgjsfgjdsdfgjsfgj Jul 31 '13 at 04:01
  • @Pyrobisqit besides, in the question edit you said, that you know, how to customize window decorator for gtk3 applications. Do you mean, you know, how to change the system-wide Mutter decorator and gtk3 theme? Or do you mean that you know, how to change Mutter decorator for a single gtk3 application? – Boris Burkov Jul 31 '13 at 10:18
  • I know how to change system wide settings, yes. I also know how to change GTK2 and GTK3 themes for single applications. But not Mutter, window decorations for single applications, that's what I need. Specifically GTK2, which don't have a trigger for dark interfaces. – dfhsfhdsfdhsdfgjsfgjdsdfgjsfgj Jul 31 '13 at 13:33