Theme qt6ct too - that's what actually colors Dolphin, not kdeglobals

kdeglobals's [Colors:*] sections (added last commit) turned out not to be
what colors a plain Qt6 widget like Dolphin: hyprland.lua sets
QT_QPA_PLATFORMTHEME=qt6ct, which makes Qt load its whole QPalette from
qt6ct's own color scheme file instead of asking KDE Frameworks for one.
kdeglobals still matters for KDE/Plasma-integration bits, just not this.

New theme/templates/qt6ct/ renders that file (a serialized QPalette, one
color per Qt::ColorRole - mapped against qpalette.h, not guessed) to
~/.config/qt6ct/colors/aether-rice.conf, the path qt6ct.conf already pointed
at. A few roles (Light/Midlight/Dark/Mid/Shadow/AlternateBase/NoRole/
ToolTipBase/HighlightedText) have no equivalent in colors.toml and reuse the
same static shades already left unmapped in kdeglobals.

Confirmed by restarting Dolphin: an already-open window keeps its old colors,
a fresh one immediately reflects the live palette. README now says plainly
which of the two files actually drives Dolphin's colors, and that a restart
is needed either way.

Also committing the current rendered outputs (colors.toml has been edited
live via the widget/presets since the last commit).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dujsk9jYfxUVLtb5B8eC94
This commit is contained in:
nico
2026-09-28 23:15:02 +02:00
parent cc37bcfe18
commit 1ca9812608
10 changed files with 93 additions and 62 deletions

View File

@@ -29,7 +29,7 @@ bash /tmp/install.sh --deps # same, plus installs dependencies via pacman (Arc
| Notifications | [mako](mako/) — themed from the palette, same as the rest |
| Theming | [`theme/`](theme/) — homegrown palette-driven theme generator (`render.py`), controlled from the Quickshell desktop widget or the CLI |
| Qt/GTK theming | qt5ct, qt6ct, nwg-look |
| File manager | Dolphin (`dolphinrc`; `kdeglobals`'s colors are generated, same theming pipeline as everything else — see Theming below) |
| File manager | Dolphin (`dolphinrc`; its actual colors come from `qt6ct`, generated by the same theming pipeline as everything else — see Theming below) |
## The bar
@@ -69,8 +69,9 @@ The artwork is drawn procedurally in [`hypr/cursor/shapes.py`](hypr/cursor/shape
Theming used to go through a third-party app called aether; it's gone now (it didn't work reliably), replaced with a small homegrown system in [`theme/`](theme/):
- [`theme/colors.toml`](theme/colors.toml) is the single source of truth for the palette: accent, cursor, foreground/background, 16 ANSI colors, three extra `*_color` fields (`bar_color`, `pill_color`, `popup_color` — the terminal reuses `background`, already shared with mako), and four matching `*_opacity` floats (`bar_opacity`, `pill_opacity`, `popup_opacity`, `terminal_opacity`, each 0-1)
- [`theme/templates/<app>/`](theme/templates/) holds one `{config.json, template}` pair per themed app (Hyprland, Kitty, Rofi, mako, and `kde` → `~/.config/kdeglobals`, which themes every KDE/Qt app that reads it — Dolphin, but also Kate, systemsettings, etc.). `config.json` names the destination file; the template uses `{key}` placeholders (`{color4}`, `{background}`, `{accent}`, …), `{key.strip}` for the hex without `#`, `{key.rgb}` for `r,g,b` decimal with no alpha (what kdeglobals uses), or `{key.rgba:ALPHA}` for a `rgba(r, g, b, ALPHA)` string. Adding a new themed app is just adding one more folder here — no code changes
- [`theme/render.py`](theme/render.py) renders every template to its destination and reloads the affected apps (`hyprctl reload`, `makoctl reload`, kitty via `SIGUSR1`, a best-effort `dbus-send` KGlobalSettings ping for KDE apps — not every KDE app actually listens for that, so an already-open Dolphin window may still need a restart to fully pick up a `kdeglobals` change, same as most apps here that aren't explicitly listed as reloading live). It also pings the running shell over Quickshell's two IPC targets (`theme` for the bar, `theme-widget` for the widget itself — two separate top-level QML components) so the bar's own accent/border/pill colors and all four opacities, which live in QML rather than a config file another app reads, pick up changes immediately too — no restart. Run it after editing a template by hand, or use `--set KEY VALUE` to change one color (`#rrggbb`) or opacity (`0`-`1`) from a terminal, `--get KEY` / `--dump` to read the palette back out
- [`theme/templates/<app>/`](theme/templates/) holds one `{config.json, template}` pair per themed app (Hyprland, Kitty, Rofi, mako, `kde`, `qt6ct`). `config.json` names the destination file; the template uses `{key}` placeholders (`{color4}`, `{background}`, `{accent}`, …), `{key.strip}` for the hex without `#`, `{key.rgb}` for `r,g,b` decimal with no alpha (what `kdeglobals` uses), or `{key.rgba:ALPHA}` for a `rgba(r, g, b, ALPHA)` string. Adding a new themed app is just adding one more folder here — no code changes
- **Dolphin specifically** (and every other plain Qt6 app) is actually colored by **`qt6ct`**, not `kdeglobals` — `hyprland.lua` sets `QT_QPA_PLATFORMTHEME=qt6ct`, which makes Qt load its whole palette from `qt6ct`'s `color_scheme_path` (`theme/templates/qt6ct/` → `~/.config/qt6ct/colors/aether-rice.conf`, a serialized `QPalette` — see the comment at the top of that template for the role-by-role mapping) instead of asking KDE Frameworks for one. `kdeglobals`'s `[Colors:*]` sections (`theme/templates/kde/`) still matter for KDE/Plasma-integration bits, but for a plain Qt widget's own background/text/highlight colors, `qt6ct` wins. If a KDE/Qt app's colors seem stuck, this is the first thing to check
- [`theme/render.py`](theme/render.py) renders every template to its destination and reloads the affected apps (`hyprctl reload`, `makoctl reload`, kitty via `SIGUSR1`, a best-effort `dbus-send` KGlobalSettings ping for KDE apps). Qt only reads its palette from `qt6ct` at startup, and not every KDE app listens for the `dbus-send` ping either — confirmed by testing: an already-open Dolphin window keeps its old colors until it's restarted, a fresh one picks up a palette change immediately. It also pings the running shell over Quickshell's two IPC targets (`theme` for the bar, `theme-widget` for the widget itself — two separate top-level QML components) so the bar's own accent/border/pill colors and all four opacities, which live in QML rather than a config file another app reads, pick up changes immediately too — no restart. Run it after editing a template by hand, or use `--set KEY VALUE` to change one color (`#rrggbb`) or opacity (`0`-`1`) from a terminal, `--get KEY` / `--dump` to read the palette back out
- [`theme/wallpaper.py`](theme/wallpaper.py) swaps the wallpaper: `apply <path>` archives the current one (deduped by hash) into `~/.local/share/quickshell/wallpapers/` and copies the new one to [`hypr/wallpaper.png`](hypr/wallpaper.png) (loaded via `swaybg` in `hyprland.lua`), `pick` does the same via a native file picker, `list` feeds the widget's gallery of past wallpapers
- [`theme/presets.py`](theme/presets.py) saves/loads/deletes named snapshots of the *entire* palette (every color and opacity value) as JSON files in `~/.local/share/quickshell/theme-presets/` — per-machine user data, not project config, so it's never tracked by this repo, same reasoning as the wallpaper history above. A built-in `Default` entry (the palette below) is always available, can't be saved over or deleted, and doesn't live in that folder — it's hardcoded in both `presets.py` and the widget

View File

@@ -1,8 +1,8 @@
# Generated by theme/render.py from the active palette.
# Edit the template at ~/.config/theme/templates/hyprland/theme.conf, not the output.
$activeBorderColor1 = rgba(1793d1ff)
$activeBorderColor2 = rgba(7aa2f7ff)
$activeBorderColor1 = rgba(f7768eff)
$activeBorderColor2 = rgba(f7768eff)
$inactiveBorderColor = rgba(565f89cc)
general {

View File

@@ -16,50 +16,50 @@ widgetStyle=Fusion
# (a lighter tint in View/Button, a darker one in Window/Tooltip/Complementary) - left as a
# static literal rather than mapped to something that wouldn't mean the same thing.
[Colors:View]
BackgroundNormal=26,27,38
BackgroundNormal=42,27,38
BackgroundAlternate=32,33,44
ForegroundNormal=192,202,245
ForegroundNormal=255,255,255
ForegroundInactive=86,95,137
ForegroundActive=192,202,245
ForegroundLink=122,162,247
ForegroundActive=255,255,255
ForegroundLink=247,118,142
ForegroundVisited=203,166,247
ForegroundNegative=247,118,142
ForegroundNeutral=249,226,175
ForegroundPositive=166,227,161
DecorationFocus=23,147,209
DecorationHover=122,162,247
DecorationFocus=247,118,142
DecorationHover=247,118,142
[Colors:Window]
BackgroundNormal=26,27,38
BackgroundNormal=42,27,38
BackgroundAlternate=15,17,26
ForegroundNormal=192,202,245
ForegroundNormal=255,255,255
ForegroundInactive=86,95,137
ForegroundActive=192,202,245
ForegroundLink=122,162,247
ForegroundActive=255,255,255
ForegroundLink=247,118,142
ForegroundVisited=203,166,247
ForegroundNegative=247,118,142
ForegroundNeutral=249,226,175
ForegroundPositive=166,227,161
DecorationFocus=23,147,209
DecorationHover=122,162,247
DecorationFocus=247,118,142
DecorationHover=247,118,142
[Colors:Button]
BackgroundNormal=26,27,38
BackgroundNormal=42,27,38
BackgroundAlternate=32,33,44
ForegroundNormal=192,202,245
ForegroundNormal=255,255,255
ForegroundInactive=86,95,137
ForegroundActive=192,202,245
ForegroundLink=122,162,247
ForegroundActive=255,255,255
ForegroundLink=247,118,142
ForegroundVisited=203,166,247
ForegroundNegative=247,118,142
ForegroundNeutral=249,226,175
ForegroundPositive=166,227,161
DecorationFocus=23,147,209
DecorationHover=122,162,247
DecorationFocus=247,118,142
DecorationHover=247,118,142
[Colors:Selection]
BackgroundNormal=23,147,209
BackgroundAlternate=122,162,247
BackgroundNormal=247,118,142
BackgroundAlternate=247,118,142
ForegroundNormal=15,17,26
ForegroundInactive=15,17,26
ForegroundActive=15,17,26
@@ -68,39 +68,39 @@ ForegroundVisited=15,17,26
ForegroundNegative=247,118,142
ForegroundNeutral=249,226,175
ForegroundPositive=166,227,161
DecorationFocus=23,147,209
DecorationHover=122,162,247
DecorationFocus=247,118,142
DecorationHover=247,118,142
[Colors:Tooltip]
BackgroundNormal=15,17,26
BackgroundAlternate=26,27,38
ForegroundNormal=192,202,245
BackgroundAlternate=42,27,38
ForegroundNormal=255,255,255
ForegroundInactive=86,95,137
ForegroundActive=192,202,245
ForegroundLink=122,162,247
ForegroundActive=255,255,255
ForegroundLink=247,118,142
ForegroundVisited=203,166,247
ForegroundNegative=247,118,142
ForegroundNeutral=249,226,175
ForegroundPositive=166,227,161
DecorationFocus=23,147,209
DecorationHover=122,162,247
DecorationFocus=247,118,142
DecorationHover=247,118,142
[Colors:Complementary]
BackgroundNormal=15,17,26
BackgroundAlternate=26,27,38
ForegroundNormal=192,202,245
BackgroundAlternate=42,27,38
ForegroundNormal=255,255,255
ForegroundInactive=86,95,137
ForegroundActive=192,202,245
ForegroundLink=122,162,247
ForegroundActive=255,255,255
ForegroundLink=247,118,142
ForegroundVisited=203,166,247
ForegroundNegative=247,118,142
ForegroundNeutral=249,226,175
ForegroundPositive=166,227,161
DecorationFocus=23,147,209
DecorationHover=122,162,247
DecorationFocus=247,118,142
DecorationHover=247,118,142
[WM]
activeBackground=26,27,38
activeForeground=192,202,245
activeBackground=42,27,38
activeForeground=255,255,255
inactiveBackground=15,17,26
inactiveForeground=86,95,137

View File

@@ -1,6 +1,6 @@
# Generated by theme/render.py from the active palette.
# Edit the template at ~/.config/theme/templates/kitty/theme.conf, not the output.
background #1a1b26
foreground #c0caf5
cursor #c0caf5
background #2a1b26
foreground #ffffff
cursor #f7768e
background_opacity 0.85

View File

@@ -2,14 +2,14 @@
# Edit the template at ~/.config/theme/templates/mako/colors.ini, not the output.
# Included from ~/.config/mako/config.
text-color=#c0caf5
background-color=#1a1b26
text-color=#ffffff
background-color=#2a1b26
[urgency=low]
border-color=#565f89
[urgency=normal]
border-color=#1793d1
border-color=#f7768e
[urgency=critical]
border-color=#f7768e

View File

@@ -1,4 +1,15 @@
# Generated by theme/render.py from the active palette.
# Edit the template at ~/.config/theme/templates/qt6ct/aether-rice.conf, not the output.
#
# This is a serialized QPalette (Qt::ColorRole order - see qpalette.h), one entry per role,
# read by every Qt6 app via QT_QPA_PLATFORMTHEME=qt6ct (set in hyprland.lua). It's what
# *actually* colors Dolphin - kdeglobals' [Colors:*] sections (theme/templates/kde/) matter
# for KDE/Plasma integration, but qt6ct overrides them for plain Qt widget rendering.
# A few roles (Light/Midlight/Dark/Mid/Shadow/AlternateBase/NoRole/ToolTipBase/
# HighlightedText) don't correspond to anything in colors.toml and are left as the static
# shades already used consistently elsewhere (kdeglobals' unmapped BackgroundAlternate
# values are these same two colors, #20212c and #0f111a).
[ColorScheme]
active_colors=#ffc0caf5, #ff1a1b26, #ff333446, #ff282a38, #ff101018, #ff1f2029, #ffc0caf5, #ffffffff, #ffc0caf5, #ff1a1b26, #ff1a1b26, #ff000000, #ff1793d1, #ff0f111a, #ff7aa2f7, #ffcba6f7, #ff20212c, #ffffffff, #ff0f111a, #ffc0caf5, #80565f89
disabled_colors=#ff565f89, #ff1a1b26, #ff333446, #ff282a38, #ff101018, #ff1f2029, #ff565f89, #ffffffff, #ff565f89, #ff1a1b26, #ff1a1b26, #ff000000, #ff1793d1, #ff565f89, #ff7aa2f7, #ffcba6f7, #ff20212c, #ffffffff, #ff0f111a, #ffc0caf5, #80565f89
inactive_colors=#ffc0caf5, #ff1a1b26, #ff333446, #ff282a38, #ff101018, #ff1f2029, #ffc0caf5, #ffffffff, #ffc0caf5, #ff1a1b26, #ff1a1b26, #ff000000, #ff1793d1, #ff0f111a, #ff7aa2f7, #ffcba6f7, #ff20212c, #ffffffff, #ff0f111a, #ffc0caf5, #80565f89
active_colors=#ffffffff, #ff2a1b26, #ff333446, #ff282a38, #ff101018, #ff1f2029, #ffffffff, #ffffffff, #ffffffff, #ff2a1b26, #ff2a1b26, #ff000000, #fff7768e, #ff0f111a, #fff7768e, #ffcba6f7, #ff20212c, #ffffffff, #ff0f111a, #ffffffff, #80565f89
disabled_colors=#ff565f89, #ff2a1b26, #ff333446, #ff282a38, #ff101018, #ff1f2029, #ff565f89, #ffffffff, #ff565f89, #ff2a1b26, #ff2a1b26, #ff000000, #fff7768e, #ff565f89, #fff7768e, #ffcba6f7, #ff20212c, #ffffffff, #ff0f111a, #ffffffff, #80565f89
inactive_colors=#ffffffff, #ff2a1b26, #ff333446, #ff282a38, #ff101018, #ff1f2029, #ffffffff, #ffffffff, #ffffffff, #ff2a1b26, #ff2a1b26, #ff000000, #fff7768e, #ff0f111a, #fff7768e, #ffcba6f7, #ff20212c, #ffffffff, #ff0f111a, #ffffffff, #80565f89

View File

@@ -2,10 +2,10 @@
Edit the template at ~/.config/theme/templates/rofi/theme.rasi, not the output. */
* {
bg: rgba(15, 17, 26, 0.92);
bg-alt: rgba(26, 27, 38, 0.92);
fg: #c0caf5;
bg-alt: rgba(42, 27, 38, 0.92);
fg: #ffffff;
muted: #565f89;
accent: #1793d1;
accent-alt: #7aa2f7;
accent: #f7768e;
accent-alt: #f7768e;
urgent: #f7768e;
}

View File

@@ -1,10 +1,10 @@
# UI Colors (extended)
accent = "#1793d1"
cursor = "#c0caf5"
accent = "#f7768e"
cursor = "#f7768e"
# Primary colors
foreground = "#c0caf5"
background = "#1a1b26"
foreground = "#ffffff"
background = "#2a1b26"
# Selection colors
selection_foreground = "#1a1b26"
@@ -15,7 +15,7 @@ color0 = "#1a1b26"
color1 = "#f7768e"
color2 = "#a6e3a1"
color3 = "#f9e2af"
color4 = "#1793d1"
color4 = "#f7768e"
color5 = "#cba6f7"
color6 = "#89dceb"
color7 = "#c0caf5"
@@ -25,7 +25,7 @@ color8 = "#565f89"
color9 = "#f7768e"
color10 = "#a6e3a1"
color11 = "#f9e2af"
color12 = "#7aa2f7"
color12 = "#f7768e"
color13 = "#cba6f7"
color14 = "#89dceb"
color15 = "#ffffff"
@@ -33,8 +33,8 @@ color15 = "#ffffff"
# Bar/pill/popup background colors (the terminal's is "background" above, already shared
# with mako) - each paired with the matching *_opacity float below for its transparency
bar_color = "#12131b"
pill_color = "#1a1b26"
popup_color = "#1a1b26"
pill_color = "#2a1b26"
popup_color = "#2a1b26"
# Opacity (0-1) for the bar itself, its pills, its popups, and the terminal background
bar_opacity = 0.18

View File

@@ -0,0 +1,15 @@
# Generated by theme/render.py from the active palette.
# Edit the template at ~/.config/theme/templates/qt6ct/aether-rice.conf, not the output.
#
# This is a serialized QPalette (Qt::ColorRole order - see qpalette.h), one entry per role,
# read by every Qt6 app via QT_QPA_PLATFORMTHEME=qt6ct (set in hyprland.lua). It's what
# *actually* colors Dolphin - kdeglobals' [Colors:*] sections (theme/templates/kde/) matter
# for KDE/Plasma integration, but qt6ct overrides them for plain Qt widget rendering.
# A few roles (Light/Midlight/Dark/Mid/Shadow/AlternateBase/NoRole/ToolTipBase/
# HighlightedText) don't correspond to anything in colors.toml and are left as the static
# shades already used consistently elsewhere (kdeglobals' unmapped BackgroundAlternate
# values are these same two colors, #20212c and #0f111a).
[ColorScheme]
active_colors=#ff{foreground.strip}, #ff{background.strip}, #ff333446, #ff282a38, #ff101018, #ff1f2029, #ff{foreground.strip}, #ff{color15.strip}, #ff{foreground.strip}, #ff{background.strip}, #ff{background.strip}, #ff000000, #ff{accent.strip}, #ff0f111a, #ff{color12.strip}, #ff{color5.strip}, #ff20212c, #ffffffff, #ff0f111a, #ff{foreground.strip}, #80{color8.strip}
disabled_colors=#ff{color8.strip}, #ff{background.strip}, #ff333446, #ff282a38, #ff101018, #ff1f2029, #ff{color8.strip}, #ff{color15.strip}, #ff{color8.strip}, #ff{background.strip}, #ff{background.strip}, #ff000000, #ff{accent.strip}, #ff{color8.strip}, #ff{color12.strip}, #ff{color5.strip}, #ff20212c, #ffffffff, #ff0f111a, #ff{foreground.strip}, #80{color8.strip}
inactive_colors=#ff{foreground.strip}, #ff{background.strip}, #ff333446, #ff282a38, #ff101018, #ff1f2029, #ff{foreground.strip}, #ff{color15.strip}, #ff{foreground.strip}, #ff{background.strip}, #ff{background.strip}, #ff000000, #ff{accent.strip}, #ff0f111a, #ff{color12.strip}, #ff{color5.strip}, #ff20212c, #ffffffff, #ff0f111a, #ff{foreground.strip}, #80{color8.strip}

View File

@@ -0,0 +1,4 @@
{
"template": "aether-rice.conf",
"destination": "~/.config/qt6ct/colors/aether-rice.conf"
}