-
-
Notifications
You must be signed in to change notification settings - Fork 74
GTK & papirus-folders theming, schemes #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
GTK & papirus-folders theming, schemes #80
Conversation
- Implemented custom.css import for user-managed app themes
- process_app_themes() to dynamically update colors in imported CSS files
- Inline comment markers for color replacement (e.g, /* accent-color */)
- Papirus icon color syncing with weighted hue/saturation algorithm
This allows users to create modular app themes that automatically update when the scheme/wallpaper changes
Example usage:
.app .element { color: #24BD5C; /* accent-color */ }
.app .element:hover { background: rgba(36, 189, 92, 0.15); /* accent-color with 15% opacity */ }
- Implemented locking to prevent concurrent theme changes - Added mode-light/mode-dark CSS markers for dynamic property reordering - Made terminal writes and Papirus sync non-blocking to prevent hangs - Only save scheme.json after successful theme application Fixes race conditions during rapid theme switching and ensures Shell and GTK apps scheme stay in sync.
|
The thunar.css that has been built with this system; |
|
@soramanew thunar.css added to templates, with some adjustments to create the file and import if it doesn't exist. If file is deleted, it would simply re-create from the template, so easy to restore |
|
You should use the same style of variable replacement for the thunar theme template as the gtk template instead of a new one (yes ik it breaks LSP but gtk css doesn't exactly work with LSP anyways) |
Yeah, the original idea was that the file wouldn't be included in the CLI, and writing directly to the new custom css would replace said variables so this was just a workaround intended for easy addition, customization and so. Would a "thunar.css.template" file be something to still allow custom additions without needing it added to the CLI, and just have that generate the final file used? Or do you have any other ideas for how to open up for theming that makes sense? |
- Dropped comment targeted theming in favor for existing {{ }} replacement
- [app].css.template file created for customization, bypassing built in default if present
- Handling *.template for added templates to be parsed and added to import
|
@soramanew removed that comment targeting replacement and just use the {{ $variable }} replacement, and added creation of .template file so any changes could be made without risk of overwriting them. I did figure that the .template method could be used later for a theming hook in the cli.json with an input and output on scheme change, as it's much like the built in CLI approach, just with added grouping perhaps, i.e for GTK to share import css |
Damnit, I forgot about the tabs
This I know I was seeing at some point before, I'm guessing one of the wildcard selectors broke that and I didn't realize |
|
@soramanew Fixed the tab margins, adjusted their colors. Added
I did try adding rounding to the rubberband, but it causes rendering artifacting unfortunately.
|
|
Imo the tabs should have slightly less spacing above and below them. Rn it looks too chunky. Also did you not manage to fix the grid item padding? |
|
@soramanew A bit more adjustment to spacing fixed. And no, there is currently no way to adjust the grid items at all, it inherits color from generic GTK variables fine, but the only sub-targetable things is the actual text GtkIconView is a single node, with rubberband as a subnode, There is a GTK API call, I can look into if there's any feasible way of like, calling the API or patching it live easily without anything like rebuilding, but not expecting anything. |
|
Nw, if it's too hard or not possible without a lot of hacking it's fine |
Yeah, not finding anything reliable, patching seems to be the only way, so that's a bust |





Some new schemes:
Papirus icon matching
Using hue, saturation and brightness, seems to pick pale options appropriately fairly consistently.
In addition, added a lock to prevent concurrent theme changes, as the CLI would entirely lock up with spamming of scheme changes or wallpaper changes, or just start to partially apply changes, i.e to shell only.