Tell specific apps to use dark theme

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
User avatar
Niisse
Level 1
Level 1
Posts: 5
Joined: Wed Jan 10, 2024 7:20 am

Tell specific apps to use dark theme

Post by Niisse »

Hi peeps, first post here.

I'm looking for a way to force an application to use the dark variant of a theme on startup.Is this possible, for example by setting an environment variable? I have been looking around for a bit but I can't seem to find anything about it. Any help is greatly appreciated!
User avatar
spamegg
Level 14
Level 14
Posts: 5117
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Tell specific apps to use dark theme

Post by spamegg »

Some apps have this option "prefer variant", many Gnome apps like gnome-terminal:
Screenshot from 2024-01-10 20-07-17.png
I'm not sure, there might be some GTK setting or variable that controls this. But still, there are many apps which don't have this option or don't respect the setting.
User avatar
Niisse
Level 1
Level 1
Posts: 5
Joined: Wed Jan 10, 2024 7:20 am

Re: Tell specific apps to use dark theme

Post by Niisse »

Thank you for your reply. I'm aware of some apps having those settings. However, the ones I'd like to change are the ones that don't have such a setting :)

Specifically, I'd like dark-themed Electron apps such as Spotify and Discord to have a dark titlebar.
I'm not sure, there might be some GTK setting or variable that controls this. But still, there are many apps which don't have this option or don't respect the setting.
I have tried to use the environment variable

Code: Select all

GTK_THEME=Mint-Y-Dark-Aqua
and while this does theme GTK apps accordingly, the titlebar remains light.
User avatar
hund
Level 1
Level 1
Posts: 10
Joined: Mon Feb 05, 2024 7:29 am
Location: Sweden

Re: Tell specific apps to use dark theme

Post by hund »

This works for me:

Code: Select all

GTK_CSD=1 GTK_THEME=Mint-Y-Dark-Aqua:dark xfce4-terminal --disable-server
:)
An old Gentoo user, trying out Linux Mint.
User avatar
Niisse
Level 1
Level 1
Posts: 5
Joined: Wed Jan 10, 2024 7:20 am

Re: Tell specific apps to use dark theme

Post by Niisse »

hund wrote: Tue Feb 13, 2024 4:30 pm This works for me:

Code: Select all

GTK_CSD=1 GTK_THEME=Mint-Y-Dark-Aqua:dark xfce4-terminal --disable-server
:)
Thank you. That does work for something like Xed, but it doesn't seem to affect Spotify or Discord. Still, a step in the right direction :)
Post Reply

Return to “Cinnamon”