Skip to content

Conversation

@PixelKhaos
Copy link

@PixelKhaos PixelKhaos commented Jan 31, 2026

Some new schemes:

  • Everforest (soft, medium, hard - dark)
  • Everblush (medium - dark)
  • Nord (medium - dark)
  • Tokyo Night (medium - dark)
  • Solarized (medium - dark)
  • Dracula (medium - dark)

Papirus icon matching

  • Color analysis to find the color variant that any of the available papirus-folders icons best matches.
    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.

- 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.
@PixelKhaos
Copy link
Author

The thunar.css that has been built with this system;
thunar.css

@PixelKhaos
Copy link
Author

PixelKhaos commented Jan 31, 2026

@soramanew thunar.css added to templates, with some adjustments to create the file and import if it doesn't exist.
And still using the same templating system for any manual changes as to still let people create new ones manually without being in the CLI.

If file is deleted, it would simply re-create from the template, so easy to restore

@soramanew
Copy link
Collaborator

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)

@PixelKhaos
Copy link
Author

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
@PixelKhaos
Copy link
Author

PixelKhaos commented Feb 1, 2026

@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.
The .template being present creates the .css and the import in custom.css.
Also made sure to just use alpha() instead of any rgba conversion.


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

@PixelKhaos
Copy link
Author

PixelKhaos commented Feb 5, 2026

Dropped the user theming approach entirely, better suited as a user override hook in the future.

Reported exit-hover issue with the path buttons sorted, added subtle hover state for the non-active buttons(tabs) in path, and added {{ $surfaceContainerLow }}; to the rest of the path buttons for a better "bar" color and tiny padding adjustment,

image

@soramanew
Copy link
Collaborator

Found some issues ‼️

The selection box when dragging to multi select (the thing below) is broken with the theme (it doesn't show up at all).
image

And the spacing above and below the tabs is inconsistent. Also, the address bar should preferably have more spacing at the top.
image

@PixelKhaos
Copy link
Author

And the spacing above and below the tabs is inconsistent. Also, the address bar should preferably have more spacing at the top.

Damnit, I forgot about the tabs

The selection box when dragging to multi select (the thing below) is broken with the theme (it doesn't show up at all).

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

@PixelKhaos
Copy link
Author

@soramanew Fixed the tab margins, adjusted their colors. Added :not() for the wildcard selector since the selection rectangle is tied to the .view, but does exist as a .rubberband class as well.

image

I did try adding rounding to the rubberband, but it causes rendering artifacting unfortunately.
But color for border and the background is the same, just stacking their opacity.

image

@soramanew
Copy link
Collaborator

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?

@PixelKhaos
Copy link
Author

PixelKhaos commented Feb 12, 2026

@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, .view:selected just end up affecting text/cell-renderer and fully ignores any geometry changes.
The only things that Thunar exposes as a layout hook for icons is these, which is just the spacing in the grid.
-ThunarAbstractIconView-row-spacing and -ThunarAbstractIconView-column-spacing

There is a GTK API call, gtk_icon_view_set_item_padding, but not sure if Thunar even uses it, set it correctly and definitively does not expose the value anywhere.

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.

@soramanew
Copy link
Collaborator

Nw, if it's too hard or not possible without a lot of hacking it's fine

@PixelKhaos
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants