Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is this possible to apply Adwaita Dark theme only to some applications?

I want to enable it for the Terminal and maybe Nautilus but not other applications, because Opera and Software Center and possibly other non GTK applications look ugly/unreadable with Adwaita Dark theme.

share|improve this question
add comment

2 Answers 2

up vote 5 down vote accepted
+25

For GTK2 apps, the way to do this was relatively simple. You can launch a gtk2 app with a custom theme like this:

GTK2_RC_FILES=(path-to-theme) (command)

So for example, this worked:

GTK2_RC_FILES=/usr/share/themes/Redmond/gtk-2.0/gtkrc catfish

(Catfish is an app I know to be gtk2 -- you may not have it installed.)

Unfortunately, this feature broke entirely in GTK3. I can't gaurantee this will work perfectly, but you could try making simple shell scripts that configure a theme, launch the app, then unconfigure the theme. If you launch two apps at the same time, that my result in a race condition with unpredictable results.

So for example, you could launch gedit like this:

#!/bin/sh
if [ -h ~/.config/gtk-3.0 ]
  then
    rm ~/.config/gtk-3.0
fi
ln -s /usr/share/themes/HighContrast/gtk-3.0 ~/.config
gedit "$@" &
sleep 1
if [ -h ~/.config/gtk-3.0 ]
  then
    rm ~/.config/gtk-3.0
fi

Besides the race condition, doing this has some other undesirable side-effects. For one, you'll use more memory for each application that has its own theme. For another, you'll have to write custom shell scripts and launchers for each app. Finally, in my opinion, your desktop will look weird.

But there. That's how you can do it, sort of.

share|improve this answer
add comment

No, theme is for entire applications but some applications like monodevelop allows to chose specific theme for it(it applies for some java apps too)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.