Skip to content

[Feature]: Auto generate theme colorse based on users #926

@EatedPantsu

Description

@EatedPantsu

Description

A python script that detects users colors from kdeglobals or gtk colors.css and generates a theme based on provided template. It also tries to see what font user is using and copies that so you can manually place it in prefix.

How should we implement this?

Once you run kde_gen.py or gtk_gen.py or both, they make a theme(s) file(s) based on template.qss and copy user font next to created themes so user cna place the fileto their prefix if they wish.
It fallback to arial if not.

This works for KDE using kdeglobals and with GTK colors from ~/.config/gtk-3.0/colors.css

I've change template.qss to template.txt as github does not allow qss files to be uplaoded, so rename it

kde_gen.py
gtk_gen.py
template.txt

Examples

got inspiration from this project https://github.com/shy1132/gtk2wine but is different and can be used to import GTK theme into wine prefix registry.

Alternatives

No response

Is this feature related to an issue?

  • Yes
  • No

Additional Notes

Probably works best with KDE.
Even this is not perfect (generally in my experience trying to make apps look the same across wine, GTK, QT, KDE...is THE pain) and has flaws but it helps with consistent look for me and might be useful to others and someone who knows what they're doing might fix and improve this and hopefully it gets integrate with Linux installer script for MO2.

I have made this myself but faced many issues and used AI to fix them and edit files.

some examples of imported/generated colors (I forgot to change the accent color so it's the same):

Image Image Image Image

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions