Bug 436066 - Per-app color schemes
Summary: Per-app color schemes
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: decorations (show other bugs)
Version: 5.21.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-22 23:11 UTC by leftcrane
Modified: 2021-05-08 22:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description leftcrane 2021-04-22 23:11:12 UTC
Not sure where else to put this, but some KDE apps are able to pass a color scheme property to the window manager. This is how Kate restyles the entire window for example.

I wonder if this behavior could be generalized to all apps, or at least qt. Given that gtk apps use kde color schemes with breeze gtk, it might even be possible to do it for gtk.

Use cases:

- You have several browser profiles and want to assign different colors to each to tell them apart.

- If KDE develops an overview like Gnome, Per app color schemes could help a lot in telling windows apart there.

- Per app dark mode. This is possible with different Kvantum themes but not Breeze, since breeze is just a single theme with light and dark variants.

etc.

Related issue of making it easier to change the color of the titlebar for certain apps can be found here: https://bugs.kde.org/show_bug.cgi?id=401576
Comment 1 David Redondo 2021-04-23 09:39:48 UTC
You can change window decoration color with window rules

Kwin cannot change the color scheme of apps themselves
Comment 2 Nate Graham 2021-04-23 15:30:46 UTC
This needs to be implemented on a per-app basis, but adopting KColorSchemeMenu. Kate and Krita and Elisa have done this. Other apps simply need to follow suit. Unfortunately it cannot be done automatically in such a way that all apps get it for free.

Please file bug reports for the individual KDE apps you want to see implement this.
Comment 3 leftcrane 2021-04-23 20:02:39 UTC
I am talking about qt apps in general. Isn't it feasible to launch them with a particular color scheme that applies to both the app and window?
Comment 4 Nate Graham 2021-04-23 20:19:47 UTC
Possible? Theoretically yes. Feasible with a decent UX? Not really, no. Sorry. :(
Comment 5 leftcrane 2021-05-08 22:38:08 UTC
It's not a UI issue. It's about the ability to launch qt applications with a custom color scheme (just as you can launch them with a custom theme), via an environment variable. GTK has this functionality, via variants.

It could look like this "QT_QPA_PLATFORMTHEME=Breeze:ColorScheme [application]"

As for the UI, there is a perfectly logical place for stuff like titlebar color or app "theme:color" - the much neglected kde menu editor.

(Currently, the titlebar color can be set via a combination of color scheme editor and window rule, which is a prohibitively convoluted UI solution.)
Comment 6 leftcrane 2021-05-08 22:47:07 UTC
I think it's actually more logical than cluttering up the application interface with dozens of color schemes. If you could specify the color scheme at launch in the environment variable, you could manage it via kmenueditor for all applications.

Still think this is a bad idea? I think it'd be a major UI improvement - the only question is the difficulty of implementation.