Switch file manager to Thunar, fix GTK3 theming from the ground up

Dolphin's selection color is stuck on stock Breeze blue outside a full
Plasma session (unfixed upstream regression, see README) - dropped it
for Thunar. Getting Thunar themed exposed a chain of GTK3-specific
issues fixed along the way: !important is silently rejected by GTK3's
CSS parser (not just deprioritized), the widget and icon themes resolve
via completely different mechanisms under Hyprland (no XSETTINGS
daemon), and Thunar's ExoIconView grid reads its selection color from a
named @define-color instead of normal :selected matching. Folder icon
colors are now generated to match the accent exactly (theme/icon_theme.py,
no sudo) instead of snapping to a papirus-folders preset.

Also adds the kde-colorscheme template (the missing piece
KColorSchemeManager actually resolves ColorScheme= against) and new
gtk_selection_color/gtk_selection_opacity palette keys with widget
controls, following the existing bar/pill/popup color+opacity pattern.

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-29 01:19:42 +02:00
parent 1ca9812608
commit 823277f535
22 changed files with 573 additions and 99 deletions

1
.gitignore vendored
View File

@@ -16,6 +16,7 @@
!/gtk-3.0
!/mimeapps.list
!/dolphinrc
!/Thunar
!/kdeglobals
!/.gitignore
!/README.md

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`; its actual colors come from `qt6ct`, generated by the same theming pipeline as everything else — see Theming below) |
| File manager | Thunar (GTK3; themed via the same pipeline — see Theming below). Was Dolphin, dropped over an [unfixed upstream bug](https://discuss.kde.org/t/dolphin-how-can-i-override-the-new-highlight-color/38640) forcing Breeze's stock blue for selection outside a full Plasma session |
## The bar
@@ -68,10 +68,19 @@ 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, `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/colors.toml`](theme/colors.toml) is the single source of truth for the palette: accent, cursor, foreground/background, 16 ANSI colors, four extra `*_color` fields (`bar_color`, `pill_color`, `popup_color`, `gtk_selection_color` — the terminal reuses `background`, already shared with mako), and five matching `*_opacity` floats (`bar_opacity`, `pill_opacity`, `popup_opacity`, `terminal_opacity`, `gtk_selection_opacity`, each 0-1)
- [`theme/templates/<app>/`](theme/templates/) holds one `{config.json, template}` pair per themed app (Hyprland, Kitty, Rofi, mako, `gtk3`, `kde`, `kde-colorscheme`, `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
- **`qt6ct` vs. `kdeglobals` vs. `kde-colorscheme`** — three templates that sound redundant but each theme a different layer, found the hard way while chasing why Dolphin's colors wouldn't take:
- `qt6ct` (`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) is what a plain Qt6 app's own background/text/highlight colors actually come from, since `hyprland.lua` sets `QT_QPA_PLATFORMTHEME=qt6ct`
- `kde` (`~/.config/kdeglobals`) matters for KDE/Plasma-integration bits, and for apps that read their own palette straight from it
- `kde-colorscheme` (`~/.local/share/color-schemes/AetherRice.colors`) is the scheme `kdeglobals`'s `ColorScheme=AetherRice` line names — without an actual file there, KColorSchemeManager silently falls back to a stock scheme, and if the app's style happens to be Breeze (it loads alongside whatever `qt6ct.conf` says the style is; you can't assume it's off), some of *its* colors (e.g. item-view selection) come from here instead of `qt6ct`
- Even with all three right, a real, currently-unresolved Dolphin regression ([KDE Discuss thread](https://discuss.kde.org/t/dolphin-how-can-i-override-the-new-highlight-color/38640)) hardcodes its selection color outside a full Plasma session no matter what — confirmed with `strace`, a known-good bundled qt6ct scheme, `QT_STYLE_OVERRIDE=Fusion`, and a `kbuildsycoca6` rebuild, none of which changed it. That's the actual reason Thunar replaced Dolphin here, not just a styling preference
- **GTK3 (Thunar) has its own set of gotchas**, also found the hard way:
- `!important` isn't just lower-priority in GTK3's CSS parser, it's rejected outright — every declaration using it gets dropped entirely ("Junk at end of value" under `GTK_DEBUG=interactive`). [`theme/templates/gtk3/gtk.css`](theme/templates/gtk3/gtk.css) has none; it doesn't need any, since `~/.config/gtk-3.0/gtk.css` already loads at `GTK_STYLE_PROVIDER_PRIORITY_USER`, above any theme's own CSS
- The GTK3 *widget* theme (`gtk-theme-name`) and *icon* theme (`icon-theme`) resolve completely differently under Hyprland (no XSETTINGS daemon here). The widget theme needs [`gtk-3.0/settings.ini`](gtk-3.0/settings.ini) set directly; the icon theme is read straight from `gsettings`/dconf regardless (set in `hyprland.lua`'s `config.reloaded` hook) — putting it in `settings.ini` too does nothing, confirmed with `strace` showing which `folder.svg` actually got opened
- Thunar's grid is `ExoIconView`, an old widget that fetches its selection color as a named symbolic color (`gtk_style_context_lookup_color("theme_selected_bg_color")`) instead of through normal `:selected` CSS matching — `.view:selected` and even a blanket `*:selected` do nothing for it. The fix is redefining `@define-color theme_selected_bg_color`/`theme_selected_fg_color` (+ the `unfocused_` pair) in `gtk.css`, which is what `gtk_selection_color`/`gtk_selection_opacity` actually drive
- Folder icon *colors* aren't CSS at all — they're baked into the icon theme's SVGs. [`theme/icon_theme.py`](theme/icon_theme.py) generates a small icon theme at `~/.local/share/icons/AetherRice` (inheriting Papirus-Dark for everything else) by taking Papirus-Dark's own "blue" folder SVGs and substituting their two fixed colors for the accent and a darkened variant — no sudo needed, and it matches the accent exactly rather than snapping to one of `papirus-folders`' fixed presets
- [`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/GTK apps only read their palette/CSS at startup, and not every app listens for the `dbus-send` ping either — an already-open window generally keeps its old colors until it's restarted, a freshly launched 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
@@ -93,7 +102,7 @@ It's a blue theme (`#1793d1` accent on a dark `#1a1b26` background) built around
|---|---|
| `Mod + Return` | Terminal (Kitty) |
| `Mod + W` | Browser (Zen) |
| `Mod + N` | File manager (Dolphin) |
| `Mod + N` | File manager (Thunar) |
| `Mod + Space` | App launcher (Rofi) |
| `Mod + Shift + P` | Spotify |
| `Mod + Shift + C` | Discord |
@@ -164,7 +173,7 @@ This is an Arch + Hyprland rice through and through, so the list below is Arch-a
| `kitty` | Terminal | `kitty` | `kitty` | `kitty` |
| `rofi` | Launcher | `rofi` | `rofi` | `rofi` |
| `mako` | Notifications | `mako` | `mako-notifier` | `mako` |
| `dolphin` | File manager | `dolphin` | `dolphin` | `dolphin` |
| `thunar` (+ `thunar-volman`, `thunar-archive-plugin`, `tumbler`, `gvfs`) | File manager, mounting, archives, thumbnails | `thunar thunar-volman thunar-archive-plugin tumbler gvfs` | `thunar thunar-volman thunar-archive-plugin tumbler gvfs` | `thunar thunar-volman thunar-archive-plugin tumbler gvfs` |
| `swaybg` | Wallpaper | `swaybg` | `swaybg` | `swaybg` |
| `hyprcursor` (`hyprcursor-util`) | Cursor theme build | `hyprcursor` | — | `hyprcursor` (COPR) |
| `librsvg` (`rsvg-convert`) | Cursor theme build | `librsvg` | `librsvg2-bin` | `librsvg2-tools` |
@@ -192,14 +201,16 @@ This is an Arch + Hyprland rice through and through, so the list below is Arch-a
# Arch (pacman - every package below is in the extra/multilib repos already
# enabled by default, no AUR helper needed)
sudo pacman -S --needed hyprland sddm xdg-desktop-portal-hyprland quickshell kitty rofi \
mako dolphin swaybg hyprcursor librsvg grim slurp wl-clipboard cliphist zenity \
mako thunar thunar-volman thunar-archive-plugin tumbler gvfs gvfs-mtp gvfs-smb \
xarchiver swaybg hyprcursor librsvg grim slurp wl-clipboard cliphist zenity \
networkmanager network-manager-applet wireplumber pavucontrol blueman brightnessctl \
playerctl lm_sensors nvidia-utils curl python qt5ct qt6ct nwg-look materia-gtk-theme \
papirus-icon-theme ttf-jetbrains-mono-nerd
# Debian/Ubuntu (apt) - covers everything except Hyprland/quickshell/hyprcursor/
# cliphist, which need a third-party repo or a source build on this base
sudo apt install kitty rofi mako-notifier dolphin swaybg librsvg2-bin grim slurp \
sudo apt install kitty rofi mako-notifier thunar thunar-volman thunar-archive-plugin \
tumbler gvfs xarchiver swaybg librsvg2-bin grim slurp \
wl-clipboard zenity network-manager network-manager-gnome wireplumber pavucontrol \
blueman brightnessctl playerctl lm-sensors nvidia-utils-535 curl python3 \
qt5ct qt6ct materia-gtk-theme papirus-icon-theme sddm
@@ -207,7 +218,8 @@ sudo apt install kitty rofi mako-notifier dolphin swaybg librsvg2-bin grim slurp
# Fedora (dnf) - add the solopasha/hyprland COPR first for Hyprland/hyprcursor/
# xdg-desktop-portal-hyprland; quickshell/cliphist/nwg-look/materia-gtk-theme still need a build
sudo dnf copr enable solopasha/hyprland
sudo dnf install hyprland xdg-desktop-portal-hyprland hyprcursor kitty rofi mako dolphin \
sudo dnf install hyprland xdg-desktop-portal-hyprland hyprcursor kitty rofi mako thunar \
thunar-volman thunar-archive-plugin tumbler gvfs gvfs-mtp gvfs-smb xarchiver \
swaybg librsvg2-tools grim slurp wl-clipboard zenity NetworkManager \
network-manager-applet wireplumber pavucontrol blueman brightnessctl playerctl \
lm_sensors xorg-x11-drv-nvidia-cuda curl python3 qt5ct qt6ct papirus-icon-theme sddm
@@ -239,7 +251,7 @@ quickshell/ The bar (Bar.qml + helper QML components + scripts/) + ThemeWidget.
rofi/ Launcher config + theme
kitty/ Terminal config + theme
mako/ Notification daemon config (colors.ini generated by theme/render.py)
theme/ Palette source (colors.toml), per-app templates, render.py + wallpaper.py
theme/ Palette source (colors.toml), per-app templates, render.py + wallpaper.py + presets.py
btop/ System monitor config
qt5ct/ qt6ct/ nwg-look/ gtk-3.0/ Qt/GTK theming
```

125
Thunar/accels.scm Normal file
View File

@@ -0,0 +1,125 @@
; thunar GtkAccelMap rc-file -*- scheme -*-
; this file is an automated accelerator map dump
;
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-type" "")
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-last-modified" "")
; (gtk_accel_path "<Actions>/Thunarwindow/menu" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/cut" "<Primary>x")
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-size" "")
; (gtk_accel_path "<Actions>/ThunarWindow/file-menu" "")
; (gtk_accel_path "<Actions>/ThunarWindow/close-tab" "<Primary>w")
; (gtk_accel_path "<Actions>/ThunarWindow/switch-previous-tab-alt" "<Primary><Shift>ISO_Left_Tab")
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-size" "")
; (gtk_accel_path "<Actions>/ThunarWindow/new-window" "<Primary>n")
; (gtk_accel_path "<Actions>/ThunarWindow/clear-directory-specific-settings" "")
; (gtk_accel_path "<Actions>/ThunarWindow/close-window" "<Primary>q")
; (gtk_accel_path "<Actions>/ThunarWindow/open-parent" "<Alt>Up")
; (gtk_accel_path "<Actions>/ThunarWindow/view-side-pane-menu" "")
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-size-in-bytes" "")
; (gtk_accel_path "<Actions>/ThunarWindow/switch-previous-tab" "<Primary>Page_Up")
; (gtk_accel_path "<Actions>/ThunarActionManager/open" "<Primary>o")
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-ascending" "")
; (gtk_accel_path "<Actions>/ThunarWindow/toggle-split-view" "F3")
; (gtk_accel_path "<Actions>/ThunarActionManager/copy-2" "<Primary>Insert")
; (gtk_accel_path "<Actions>/ThunarActionManager/trash-delete" "Delete")
; (gtk_accel_path "<Actions>/ThunarWindow/open-recent" "")
; (gtk_accel_path "<Actions>/ThunarWindow/view-configure-toolbar" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/forward" "<Alt>Right")
; (gtk_accel_path "<Actions>/ThunarActionManager/restore" "")
; (gtk_accel_path "<Actions>/ThunarWindow/open-location-alt" "<Alt>d")
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-out-alt" "<Primary>KP_Subtract")
; (gtk_accel_path "<Actions>/ThunarStandardView/select-by-pattern" "<Primary>s")
; (gtk_accel_path "<Actions>/ThunarWindow/open-file-menu" "F10")
; (gtk_accel_path "<Actions>/ThunarWindow/contents" "F1")
; (gtk_accel_path "<Actions>/ThunarWindow/show-highlight" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-descending" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-name" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/select-all-files" "<Primary>a")
; (gtk_accel_path "<Actions>/ThunarActionManager/execute" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/properties" "<Alt>Return")
; (gtk_accel_path "<Actions>/ThunarActionManager/cut-2" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-dtime" "")
; (gtk_accel_path "<Actions>/ThunarWindow/switch-next-tab" "<Primary>Page_Down")
; (gtk_accel_path "<Actions>/ThunarWindow/open-templates" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/paste-2" "<Shift>Insert")
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-filetype" "")
; (gtk_accel_path "<Actions>/ThunarWindow/close-all-windows" "<Primary><Shift>w")
; (gtk_accel_path "<Actions>/ThunarStandardView/create-document" "")
; (gtk_accel_path "<Actions>/ThunarWindow/detach-tab" "")
; (gtk_accel_path "<Actions>/ThunarWindow/cancel-search" "Escape")
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-in-alt2" "<Primary>equal")
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-hidden-count" "")
; (gtk_accel_path "<Actions>/ThunarShortcutsPane/sendto-shortcuts" "<Primary>d")
; (gtk_accel_path "<Actions>/ThunarActionManager/undo" "<Primary>z")
; (gtk_accel_path "<Actions>/ThunarStandardView/toggle-sort-order" "")
; (gtk_accel_path "<Actions>/ThunarWindow/view-location-selector-entry" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/paste" "<Primary>v")
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-in-alt1" "<Primary>KP_Add")
; (gtk_accel_path "<Actions>/ThunarWindow/view-menubar" "<Primary>m")
; (gtk_accel_path "<Actions>/ThunarStandardView/back" "<Alt>Left")
; (gtk_accel_path "<Actions>/ThunarWindow/open-desktop" "")
; (gtk_accel_path "<Actions>/ThunarWindow/view-as-detailed-list" "<Primary>2")
; (gtk_accel_path "<Actions>/ThunarActionManager/restore-show" "")
; (gtk_accel_path "<Actions>/ThunarWindow/sendto-menu" "")
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-display-name" "")
; (gtk_accel_path "<Actions>/ThunarWindow/go-menu" "")
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-out" "<Primary>minus")
; (gtk_accel_path "<Actions>/ThunarWindow/remove-from-recent" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/open-with-other" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/invert-selection" "<Primary><Shift>i")
; (gtk_accel_path "<Actions>/ThunarWindow/view-side-pane-shortcuts" "<Primary>b")
; (gtk_accel_path "<Actions>/ThunarWindow/reload-alt-2" "Reload")
; (gtk_accel_path "<Actions>/ThunarWindow/view-location-selector-menu" "")
; (gtk_accel_path "<Actions>/ThunarWindow/reload" "<Primary>r")
; (gtk_accel_path "<Actions>/ThunarWindow/edit-menu" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/copy" "<Primary>c")
; (gtk_accel_path "<Actions>/ThunarWindow/bookmarks-menu" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/forward-alt" "Forward")
; (gtk_accel_path "<Actions>/ThunarActionManager/move-to-trash" "")
; (gtk_accel_path "<Actions>/ThunarWindow/reload-alt-1" "F5")
; (gtk_accel_path "<Actions>/ThunarActionManager/delete-3" "<Shift>KP_Delete")
; (gtk_accel_path "<Actions>/ThunarStandardView/unselect-all-files" "Escape")
; (gtk_accel_path "<Actions>/ThunarWindow/contents/help-menu" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/arrange-items-menu" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-mtime" "")
; (gtk_accel_path "<Actions>/ThunarWindow/open-computer" "")
; (gtk_accel_path "<Actions>/ThunarWindow/toggle-image-preview" "")
; (gtk_accel_path "<Actions>/ThunarWindow/toggle-side-pane" "F9")
; (gtk_accel_path "<Actions>/ThunarWindow/view-as-icons" "<Primary>1")
; (gtk_accel_path "<Actions>/ThunarActionManager/delete-2" "<Shift>Delete")
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-in" "<Primary>plus")
; (gtk_accel_path "<Actions>/ThunarStandardView/rename" "F2")
; (gtk_accel_path "<Actions>/ThunarWindow/open-location" "<Primary>l")
; (gtk_accel_path "<Actions>/ThunarWindow/view-as-compact-list" "<Primary>3")
; (gtk_accel_path "<Actions>/ThunarWindow/view-menu" "")
; (gtk_accel_path "<Actions>/ThunarWindow/search" "<Primary>f")
; (gtk_accel_path "<Actions>/ThunarWindow/new-tab" "<Primary>t")
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-reset" "<Primary>0")
; (gtk_accel_path "<Actions>/ThunarStandardView/back-alt2" "Back")
; (gtk_accel_path "<Actions>/ThunarActionManager/open-in-new-tab" "<Primary><Shift>p")
; (gtk_accel_path "<Actions>/ThunarWindow/view-location-selector-buttons" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/redo" "<Primary><Shift>z")
; (gtk_accel_path "<Actions>/ThunarWindow/open-trash" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/open-in-new-window" "<Primary><Shift>o")
; (gtk_accel_path "<Actions>/ThunarWindow/view-statusbar" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/open-location" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/duplicate" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/trash-delete-2" "KP_Delete")
; (gtk_accel_path "<Actions>/ThunarStandardView/back-alt1" "BackSpace")
; (gtk_accel_path "<Actions>/ThunarStandardView/create-folder" "<Primary><Shift>n")
; (gtk_accel_path "<Actions>/ThunarWindow/open-home" "<Alt>Home")
; (gtk_accel_path "<Actions>/ThunarWindow/switch-focused-split-view-pane" "")
; (gtk_accel_path "<Actions>/ThunarWindow/show-hidden" "<Primary>h")
; (gtk_accel_path "<Actions>/ThunarStandardView/set-default-app" "")
; (gtk_accel_path "<Actions>/ThunarWindow/empty-trash" "")
; (gtk_accel_path "<Actions>/ThunarWindow/preferences" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/delete" "")
; (gtk_accel_path "<Actions>/ThunarWindow/open-network" "")
; (gtk_accel_path "<Actions>/ThunarWindow/view-side-pane-tree" "<Primary>e")
; (gtk_accel_path "<Actions>/ThunarWindow/open-file-system" "")
; (gtk_accel_path "<Actions>/ThunarWindow/search-alt" "Search")
; (gtk_accel_path "<Actions>/ThunarWindow/switch-next-tab-alt" "<Primary>Tab")
; (gtk_accel_path "<Actions>/ThunarActionManager/sendto-desktop" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/make-link" "")
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-reset-alt" "<Primary>KP_0")
; (gtk_accel_path "<Actions>/ThunarWindow/about" "")

15
Thunar/uca.xml Normal file
View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<icon>utilities-terminal</icon>
<name>Open Terminal Here</name>
<submenu></submenu>
<unique-id>1784897450718909-1</unique-id>
<command>exo-open --working-directory %f --launch TerminalEmulator</command>
<description>Example for a custom action</description>
<range></range>
<patterns>*</patterns>
<startup-notify/>
<directories/>
</action>
</actions>

View File

@@ -1,43 +1,73 @@
/* FORCE ALL BACKGROUNDS AND TEXT FIELDS TO BLUE ACCENTS */
/* Generated by theme/render.py from the active palette.
Edit the template at ~/.config/theme/templates/gtk3/gtk.css, not the output.
Blanket GTK3 override (applies to every GTK3 app: Thunar, Qalculate-gtk, etc.) - GSettings
(set in hyprland.lua's config.reloaded hook) picks the base Materia-dark theme, this then
forces the actual colors on top of it to match the palette.
No !important: GTK3's CSS parser doesn't support it at all (not "lower priority" -
it drops the whole declaration, "Junk at end of value" in GTK_DEBUG output). This file
is loaded at GTK_STYLE_PROVIDER_PRIORITY_USER, already above the theme's own CSS, so
plain declarations here win without it. */
* {
/* Base text color */
color: #e2e8f0 !important;
color: #c0caf5;
}
/* Main Application Window Backgrounds */
window, dialog, grid {
background-color: #1e222a !important;
background-image: none !important;
background-color: #1a1b26;
background-image: none;
}
/* The Calculator Input Field and History Readout */
entry, textview, textview text, text {
background-color: #16191f !important;
color: #61afef !important; /* Soft Blue text output */
border: 1px solid #00a3ff !important; /* Electric Blue Frame */
border-radius: 6px !important;
box-shadow: none !important;
background-color: #1a1b26;
color: #1793d1;
border: 1px solid #1793d1;
border-radius: 6px;
box-shadow: none;
}
/* Calculator Grid Buttons */
button {
background-color: #282c34 !important;
background-image: none !important;
border: 1px solid #3e4452 !important;
border-radius: 6px !important;
box-shadow: none !important;
background-color: #1a1b26;
background-image: none;
border: 1px solid #565f89;
border-radius: 6px;
box-shadow: none;
}
/* Mouse Hover Actions */
button:hover {
background-color: #3e4452 !important;
border-color: #00a3ff !important;
background-color: #565f89;
border-color: #1793d1;
}
/* Button Labels inside the buttons */
button label {
color: #e2e8f0 !important;
color: #c0caf5;
}
button:hover label {
color: #00a3ff !important; /* Text inside turns electric blue on hover */
color: #1793d1;
}
/* Thunar's grid is ExoIconView, an old custom widget that doesn't ask the style
context "what's my background for :selected" through normal CSS matching - it
looks up these named colors directly instead (gtk_style_context_lookup_color).
Redefining them is what actually recolors the selection there; .view:selected/
*:selected below do nothing for it, only for widgets that DO use normal matching. */
@define-color theme_selected_bg_color alpha(#7aa2f7, 0.5);
@define-color theme_selected_fg_color #c0caf5;
@define-color theme_unfocused_selected_bg_color alpha(#7aa2f7, 0.5);
@define-color theme_unfocused_selected_fg_color #c0caf5;
/* File-manager icon/list view (Thunar's grid, Materia's rounded selection pill) */
.view {
background-color: transparent;
color: #c0caf5;
}
.view:hover {
background-color: alpha(#1793d1, 0.18);
}
*:selected {
background-color: alpha(#7aa2f7, 0.5);
color: #c0caf5;
}

13
gtk-3.0/settings.ini Normal file
View File

@@ -0,0 +1,13 @@
[Settings]
# Static, not palette-templated - gsettings alone doesn't reach the GTK3 *widget theme*
# here because no XSETTINGS daemon (xsettingsd/gnome-settings-daemon/xfsettingsd) runs
# under Hyprland, so GtkSettings never picks up the dconf value hyprland.lua's
# config.reloaded hook sets for gtk-theme. This file is the direct, daemon-independent
# way to force it; gtk.css (see theme/templates/gtk3/) layers the actual palette colors
# on top of it. The *icon* theme is different: GTK resolves that straight from gsettings
# regardless of any XSETTINGS daemon, so it's set via `gsettings set ... icon-theme` in
# hyprland.lua instead - listing it here too would just be redundant, not more reliable.
gtk-theme-name=Materia-dark
gtk-application-prefer-dark-theme=1
gtk-cursor-theme-name=ArchLogo
gtk-cursor-theme-size=24

View File

@@ -86,7 +86,7 @@ hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia")
local terminal = "kitty"
local fileManager = "dolphin"
local fileManager = "thunar"
local menu = "rofi -show drun -theme ~/.config/rofi/arch-blue.rasi"
@@ -314,7 +314,7 @@ hl.bind(mainMod .. " + " .. "RETURN", hl.dsp.exec_cmd("kitty"))
hl.bind(mainMod .. " + " .. "W", hl.dsp.exec_cmd("zen-browser"))
hl.bind(mainMod .. " + " .. "N", hl.dsp.exec_cmd("dolphin"))
hl.bind(mainMod .. " + " .. "N", hl.dsp.exec_cmd("thunar"))
hl.bind(mainMod .. " + " .. "SPACE", hl.dsp.exec_cmd("rofi -show drun -theme ~/.config/rofi/arch-blue.rasi"))
@@ -627,4 +627,5 @@ hl.on("config.reloaded", function()
hl.exec_cmd("gsettings set org.gnome.desktop.interface color-scheme \"prefer-dark\"")
hl.exec_cmd("gsettings set org.gnome.desktop.interface cursor-theme \"ArchLogo\"")
hl.exec_cmd("gsettings set org.gnome.desktop.interface cursor-size 24")
hl.exec_cmd("gsettings set org.gnome.desktop.interface icon-theme \"AetherRice\"")
end)

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(f7768eff)
$activeBorderColor2 = rgba(f7768eff)
$activeBorderColor1 = rgba(1793d1ff)
$activeBorderColor2 = rgba(7aa2f7ff)
$inactiveBorderColor = rgba(565f89cc)
general {

View File

@@ -81,7 +81,8 @@ if [ "$INSTALL_DEPS" = 1 ]; then
if command -v pacman >/dev/null; then
echo "Installing dependencies via pacman (see README.md for apt/dnf equivalents)..."
sudo pacman -S --needed hyprland sddm xdg-desktop-portal-hyprland quickshell kitty rofi \
mako dolphin swaybg hyprcursor librsvg grim slurp wl-clipboard cliphist zenity \
mako thunar thunar-volman thunar-archive-plugin tumbler gvfs gvfs-mtp gvfs-smb \
xarchiver swaybg hyprcursor librsvg grim slurp wl-clipboard cliphist zenity \
networkmanager network-manager-applet wireplumber pavucontrol blueman brightnessctl \
playerctl lm_sensors nvidia-utils curl python qt5ct qt6ct nwg-look materia-gtk-theme \
papirus-icon-theme ttf-jetbrains-mono-nerd

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=42,27,38
BackgroundNormal=26,27,38
BackgroundAlternate=32,33,44
ForegroundNormal=255,255,255
ForegroundNormal=192,202,245
ForegroundInactive=86,95,137
ForegroundActive=255,255,255
ForegroundLink=247,118,142
ForegroundActive=192,202,245
ForegroundLink=122,162,247
ForegroundVisited=203,166,247
ForegroundNegative=247,118,142
ForegroundNeutral=249,226,175
ForegroundPositive=166,227,161
DecorationFocus=247,118,142
DecorationHover=247,118,142
DecorationFocus=23,147,209
DecorationHover=122,162,247
[Colors:Window]
BackgroundNormal=42,27,38
BackgroundNormal=26,27,38
BackgroundAlternate=15,17,26
ForegroundNormal=255,255,255
ForegroundNormal=192,202,245
ForegroundInactive=86,95,137
ForegroundActive=255,255,255
ForegroundLink=247,118,142
ForegroundActive=192,202,245
ForegroundLink=122,162,247
ForegroundVisited=203,166,247
ForegroundNegative=247,118,142
ForegroundNeutral=249,226,175
ForegroundPositive=166,227,161
DecorationFocus=247,118,142
DecorationHover=247,118,142
DecorationFocus=23,147,209
DecorationHover=122,162,247
[Colors:Button]
BackgroundNormal=42,27,38
BackgroundNormal=26,27,38
BackgroundAlternate=32,33,44
ForegroundNormal=255,255,255
ForegroundNormal=192,202,245
ForegroundInactive=86,95,137
ForegroundActive=255,255,255
ForegroundLink=247,118,142
ForegroundActive=192,202,245
ForegroundLink=122,162,247
ForegroundVisited=203,166,247
ForegroundNegative=247,118,142
ForegroundNeutral=249,226,175
ForegroundPositive=166,227,161
DecorationFocus=247,118,142
DecorationHover=247,118,142
DecorationFocus=23,147,209
DecorationHover=122,162,247
[Colors:Selection]
BackgroundNormal=247,118,142
BackgroundAlternate=247,118,142
BackgroundNormal=23,147,209
BackgroundAlternate=122,162,247
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=247,118,142
DecorationHover=247,118,142
DecorationFocus=23,147,209
DecorationHover=122,162,247
[Colors:Tooltip]
BackgroundNormal=15,17,26
BackgroundAlternate=42,27,38
ForegroundNormal=255,255,255
BackgroundAlternate=26,27,38
ForegroundNormal=192,202,245
ForegroundInactive=86,95,137
ForegroundActive=255,255,255
ForegroundLink=247,118,142
ForegroundActive=192,202,245
ForegroundLink=122,162,247
ForegroundVisited=203,166,247
ForegroundNegative=247,118,142
ForegroundNeutral=249,226,175
ForegroundPositive=166,227,161
DecorationFocus=247,118,142
DecorationHover=247,118,142
DecorationFocus=23,147,209
DecorationHover=122,162,247
[Colors:Complementary]
BackgroundNormal=15,17,26
BackgroundAlternate=42,27,38
ForegroundNormal=255,255,255
BackgroundAlternate=26,27,38
ForegroundNormal=192,202,245
ForegroundInactive=86,95,137
ForegroundActive=255,255,255
ForegroundLink=247,118,142
ForegroundActive=192,202,245
ForegroundLink=122,162,247
ForegroundVisited=203,166,247
ForegroundNegative=247,118,142
ForegroundNeutral=249,226,175
ForegroundPositive=166,227,161
DecorationFocus=247,118,142
DecorationHover=247,118,142
DecorationFocus=23,147,209
DecorationHover=122,162,247
[WM]
activeBackground=42,27,38
activeForeground=255,255,255
activeBackground=26,27,38
activeForeground=192,202,245
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 #2a1b26
foreground #ffffff
cursor #f7768e
background #1a1b26
foreground #c0caf5
cursor #c0caf5
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=#ffffff
background-color=#2a1b26
text-color=#c0caf5
background-color=#1a1b26
[urgency=low]
border-color=#565f89
[urgency=normal]
border-color=#f7768e
border-color=#1793d1
[urgency=critical]
border-color=#f7768e

View File

@@ -10,6 +10,6 @@
# shades already used consistently elsewhere (kdeglobals' unmapped BackgroundAlternate
# values are these same two colors, #20212c and #0f111a).
[ColorScheme]
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
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

View File

@@ -85,6 +85,7 @@ PanelWindow {
bar_color: isGerman ? "Bar-Hintergrund" : "Bar background",
pill_color: isGerman ? "Pill-Hintergrund" : "Pill background",
popup_color: isGerman ? "Popup-Hintergrund" : "Popup background",
gtk_selection_color: isGerman ? "Dateiauswahl (Thunar)" : "File selection (Thunar)",
})
// colorKey pairs each opacity with the color it fades - clicking its swatch jumps into
@@ -94,6 +95,7 @@ PanelWindow {
{ key: "pill_opacity", colorKey: "pill_color", label: isGerman ? "Pills" : "Pills" },
{ key: "popup_opacity", colorKey: "popup_color", label: isGerman ? "Popups" : "Popups" },
{ key: "terminal_opacity", colorKey: "background", label: isGerman ? "Terminal" : "Terminal" },
{ key: "gtk_selection_opacity", colorKey: "gtk_selection_color", label: isGerman ? "Auswahl" : "Selection" },
]
// A curated set of preset swatches for the color picker - independent of the current
@@ -572,8 +574,9 @@ PanelWindow {
readonly property real shownValue: track.pressed ? dragValue : liveValue
Text {
Layout.preferredWidth: 52
Layout.preferredWidth: 70
text: modelData.label
elide: Text.ElideRight
font.family: "JetBrainsMono Nerd Font"
font.pixelSize: 11
color: "#c0caf5"

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(42, 27, 38, 0.92);
fg: #ffffff;
bg-alt: rgba(26, 27, 38, 0.92);
fg: #c0caf5;
muted: #565f89;
accent: #f7768e;
accent-alt: #f7768e;
accent: #1793d1;
accent-alt: #7aa2f7;
urgent: #f7768e;
}

View File

@@ -1,10 +1,10 @@
# UI Colors (extended)
accent = "#f7768e"
cursor = "#f7768e"
accent = "#1793d1"
cursor = "#c0caf5"
# Primary colors
foreground = "#ffffff"
background = "#2a1b26"
foreground = "#c0caf5"
background = "#1a1b26"
# Selection colors
selection_foreground = "#1a1b26"
@@ -15,7 +15,7 @@ color0 = "#1a1b26"
color1 = "#f7768e"
color2 = "#a6e3a1"
color3 = "#f9e2af"
color4 = "#f7768e"
color4 = "#1793d1"
color5 = "#cba6f7"
color6 = "#89dceb"
color7 = "#c0caf5"
@@ -25,7 +25,7 @@ color8 = "#565f89"
color9 = "#f7768e"
color10 = "#a6e3a1"
color11 = "#f9e2af"
color12 = "#f7768e"
color12 = "#7aa2f7"
color13 = "#cba6f7"
color14 = "#89dceb"
color15 = "#ffffff"
@@ -33,11 +33,17 @@ 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 = "#2a1b26"
popup_color = "#2a1b26"
pill_color = "#1a1b26"
popup_color = "#1a1b26"
# Opacity (0-1) for the bar itself, its pills, its popups, and the terminal background
# GTK file-selection highlight (Thunar's grid, etc.) - decoupled from `accent` so it can
# be set independently, defaults to matching it.
gtk_selection_color = "#7aa2f7"
# Opacity (0-1) for the bar itself, its pills, its popups, the terminal background, and
# the GTK file-selection highlight above
bar_opacity = 0.18
pill_opacity = 0.85
popup_opacity = 0.9
terminal_opacity = 0.85
gtk_selection_opacity = 0.5

61
theme/icon_theme.py Normal file
View File

@@ -0,0 +1,61 @@
"""Generates a tiny user icon theme with folder icons in the exact palette accent.
Unlike papirus-folders (~20 fixed presets, needs sudo since it writes into
/usr/share/icons), this writes into ~/.local/share/icons - no sudo, and it matches
the accent exactly instead of snapping to the nearest preset. Called from render.py
on every render, so folder icons are fully live like the rest of the palette.
Works by taking Papirus-Dark's own "blue" folder SVGs (arbitrarily chosen as the
source shapes - a plain two-tone folder, not on a plain color hex code) and replacing
its two fixed colors with the accent and a darkened variant of it.
"""
import os
import re
SOURCE_THEME = "/usr/share/icons/Papirus-Dark"
DEST_THEME = os.path.expanduser("~/.local/share/icons/AetherRice")
SIZES = ["16x16", "22x22", "24x24", "32x32", "48x48", "64x64"]
# The "blue" preset's two colors - main face and the darker top-flap shade - swapped
# out below for the accent and a darkened version of it. Any preset would do as the
# source shapes; blue was just picked arbitrarily.
REF_MAIN = "#5294e2"
REF_FLAP = "#4877b1"
VARIANTS = {"folder.svg": "folder-blue.svg", "folder-open.svg": "folder-blue-open.svg"}
def _darken(hex_color, factor=0.8):
h = hex_color.lstrip("#")
r, g, b = (int(h[i:i + 2], 16) for i in (0, 2, 4))
return "#{:02x}{:02x}{:02x}".format(*(max(0, min(255, int(c * factor))) for c in (r, g, b)))
def render(colors):
accent = colors["accent"]
flap = _darken(accent)
sections = []
for size in SIZES:
src_dir = os.path.join(SOURCE_THEME, size, "places")
dest_dir = os.path.join(DEST_THEME, size, "places")
os.makedirs(dest_dir, exist_ok=True)
for dest_name, src_name in VARIANTS.items():
src_path = os.path.join(src_dir, src_name)
if not os.path.isfile(src_path):
continue
svg = open(src_path).read()
svg = re.sub(REF_MAIN, accent, svg, flags=re.IGNORECASE)
svg = re.sub(REF_FLAP, flap, svg, flags=re.IGNORECASE)
open(os.path.join(dest_dir, dest_name), "w").write(svg)
px = size.split("x")[0]
sections.append(f"[{size}/places]\nContext=Places\nSize={px}\nType=Fixed\n")
dirs = ",".join(f"{size}/places" for size in SIZES)
index = (
"[Icon Theme]\n"
"Name=AetherRice\n"
"Comment=Papirus-Dark with folder icons generated by theme/render.py from the palette accent\n"
"Inherits=Papirus-Dark\n"
f"Directories={dirs}\n\n" + "\n".join(sections)
)
open(os.path.join(DEST_THEME, "index.theme"), "w").write(index)

View File

@@ -19,6 +19,8 @@ import subprocess
import sys
import tomllib
import icon_theme
HERE = os.path.dirname(os.path.abspath(__file__))
COLORS = os.path.join(HERE, "colors.toml")
TEMPLATES = os.path.join(HERE, "templates")
@@ -70,6 +72,8 @@ def render_all(colors):
os.makedirs(os.path.dirname(dest), exist_ok=True)
open(dest, "w").write(substitute(template, colors))
print(f"rendered {app} -> {dest}")
icon_theme.render(colors)
print(f"rendered gtk3-icons -> {icon_theme.DEST_THEME}")
def reload_apps():

View File

@@ -0,0 +1,4 @@
{
"template": "gtk.css",
"destination": "~/.config/gtk-3.0/gtk.css"
}

View File

@@ -0,0 +1,73 @@
/* Generated by theme/render.py from the active palette.
Edit the template at ~/.config/theme/templates/gtk3/gtk.css, not the output.
Blanket GTK3 override (applies to every GTK3 app: Thunar, Qalculate-gtk, etc.) - GSettings
(set in hyprland.lua's config.reloaded hook) picks the base Materia-dark theme, this then
forces the actual colors on top of it to match the palette.
No !important: GTK3's CSS parser doesn't support it at all (not "lower priority" -
it drops the whole declaration, "Junk at end of value" in GTK_DEBUG output). This file
is loaded at GTK_STYLE_PROVIDER_PRIORITY_USER, already above the theme's own CSS, so
plain declarations here win without it. */
* {
color: {foreground};
}
window, dialog, grid {
background-color: {background};
background-image: none;
}
entry, textview, textview text, text {
background-color: {background};
color: {accent};
border: 1px solid {accent};
border-radius: 6px;
box-shadow: none;
}
button {
background-color: {pill_color};
background-image: none;
border: 1px solid {color8};
border-radius: 6px;
box-shadow: none;
}
button:hover {
background-color: {color8};
border-color: {accent};
}
button label {
color: {foreground};
}
button:hover label {
color: {accent};
}
/* Thunar's grid is ExoIconView, an old custom widget that doesn't ask the style
context "what's my background for :selected" through normal CSS matching - it
looks up these named colors directly instead (gtk_style_context_lookup_color).
Redefining them is what actually recolors the selection there; .view:selected/
*:selected below do nothing for it, only for widgets that DO use normal matching. */
@define-color theme_selected_bg_color alpha({gtk_selection_color}, {gtk_selection_opacity});
@define-color theme_selected_fg_color {foreground};
@define-color theme_unfocused_selected_bg_color alpha({gtk_selection_color}, {gtk_selection_opacity});
@define-color theme_unfocused_selected_fg_color {foreground};
/* File-manager icon/list view (Thunar's grid, Materia's rounded selection pill) */
.view {
background-color: transparent;
color: {foreground};
}
.view:hover {
background-color: alpha({accent}, 0.18);
}
*:selected {
background-color: alpha({gtk_selection_color}, {gtk_selection_opacity});
color: {foreground};
}

View File

@@ -0,0 +1,121 @@
# Generated by theme/render.py from the active palette.
# Edit the template at ~/.config/theme/templates/kde-colorscheme/AetherRice.colors, not
# the output.
#
# This is the piece kdeglobals's "ColorScheme=AetherRice" line was pointing at without it
# actually existing: KColorSchemeManager resolves a scheme *by name* to a file here, and
# Breeze (the widget style actually in use, regardless of qt6ct.conf saying "Fusion" - it
# gets loaded alongside qt6ct's style plugin) reads View/Selection colors through that
# lookup rather than through qt6ct's QPalette. Without this file, Breeze silently fell back
# to its own stock scheme - kdeglobals's inline [Colors:*] sections and qt6ct's palette
# were both being applied correctly, they just aren't what item-view selection uses.
[General]
Name=AetherRice
ColorScheme=AetherRice
[KDE]
contrast=4
[Colors:View]
BackgroundNormal={background.rgb}
BackgroundAlternate=32,33,44
ForegroundNormal={foreground.rgb}
ForegroundInactive={color8.rgb}
ForegroundActive={foreground.rgb}
ForegroundLink={color12.rgb}
ForegroundVisited={color5.rgb}
ForegroundNegative={color1.rgb}
ForegroundNeutral={color3.rgb}
ForegroundPositive={color2.rgb}
DecorationFocus={accent.rgb}
DecorationHover={color12.rgb}
[Colors:Window]
BackgroundNormal={background.rgb}
BackgroundAlternate=15,17,26
ForegroundNormal={foreground.rgb}
ForegroundInactive={color8.rgb}
ForegroundActive={foreground.rgb}
ForegroundLink={color12.rgb}
ForegroundVisited={color5.rgb}
ForegroundNegative={color1.rgb}
ForegroundNeutral={color3.rgb}
ForegroundPositive={color2.rgb}
DecorationFocus={accent.rgb}
DecorationHover={color12.rgb}
[Colors:Button]
BackgroundNormal={background.rgb}
BackgroundAlternate=32,33,44
ForegroundNormal={foreground.rgb}
ForegroundInactive={color8.rgb}
ForegroundActive={foreground.rgb}
ForegroundLink={color12.rgb}
ForegroundVisited={color5.rgb}
ForegroundNegative={color1.rgb}
ForegroundNeutral={color3.rgb}
ForegroundPositive={color2.rgb}
DecorationFocus={accent.rgb}
DecorationHover={color12.rgb}
[Colors:Selection]
BackgroundNormal={accent.rgb}
BackgroundAlternate={color12.rgb}
ForegroundNormal=15,17,26
ForegroundInactive=15,17,26
ForegroundActive=15,17,26
ForegroundLink=15,17,26
ForegroundVisited=15,17,26
ForegroundNegative={color1.rgb}
ForegroundNeutral={color3.rgb}
ForegroundPositive={color2.rgb}
DecorationFocus={accent.rgb}
DecorationHover={color12.rgb}
[Colors:Tooltip]
BackgroundNormal=15,17,26
BackgroundAlternate={background.rgb}
ForegroundNormal={foreground.rgb}
ForegroundInactive={color8.rgb}
ForegroundActive={foreground.rgb}
ForegroundLink={color12.rgb}
ForegroundVisited={color5.rgb}
ForegroundNegative={color1.rgb}
ForegroundNeutral={color3.rgb}
ForegroundPositive={color2.rgb}
DecorationFocus={accent.rgb}
DecorationHover={color12.rgb}
[Colors:Complementary]
BackgroundNormal=15,17,26
BackgroundAlternate={background.rgb}
ForegroundNormal={foreground.rgb}
ForegroundInactive={color8.rgb}
ForegroundActive={foreground.rgb}
ForegroundLink={color12.rgb}
ForegroundVisited={color5.rgb}
ForegroundNegative={color1.rgb}
ForegroundNeutral={color3.rgb}
ForegroundPositive={color2.rgb}
DecorationFocus={accent.rgb}
DecorationHover={color12.rgb}
[Colors:Header]
BackgroundNormal={background.rgb}
BackgroundAlternate=32,33,44
ForegroundNormal={foreground.rgb}
ForegroundInactive={color8.rgb}
ForegroundActive={foreground.rgb}
ForegroundLink={color12.rgb}
ForegroundVisited={color5.rgb}
ForegroundNegative={color1.rgb}
ForegroundNeutral={color3.rgb}
ForegroundPositive={color2.rgb}
DecorationFocus={accent.rgb}
DecorationHover={color12.rgb}
[WM]
activeBackground={background.rgb}
activeForeground={foreground.rgb}
inactiveBackground=15,17,26
inactiveForeground={color8.rgb}

View File

@@ -0,0 +1,4 @@
{
"template": "AetherRice.colors",
"destination": "~/.local/share/color-schemes/AetherRice.colors"
}