ink ladder: base03/base04 derive from base05, shared with hyprland

base03/base04/base05 were three independent slots off the wallpaper, not
one ink at three strengths. On wallhaven-k8dqr6 the raw ladder is red,
blue and cream; on 5y39p9 base03 is a saturated gold against pale cream.
That is why muted labels read as a second accent and why the shell frame
never quite matched the window border beside it.

base04 and base03 are now base05 mixed toward base00. The two factors and
the mix live in settings/ui.nix and are used by all three consumers:
Theme.qml, theming.nix's hypr.lua (applied at runtime) and hyprland.nix's
build-time fallback. Same trick base01/base02 already used for surfaces.

Verified on 5y39p9: hypr.lua now emits aca888 / 727761 from base05 f1e2b6
against base00 0a1f1c, matching what inkStep computes in the shell.
This commit is contained in:
rope 2026-08-31 13:03:45 +01:00
parent 1dc6886b56
commit b5372d46f3
4 changed files with 78 additions and 15 deletions

View file

@ -15,6 +15,7 @@
# target not listed here — walls/wallpaper.png remains its image.
{ config, pkgs, lib, inputs, ... }:
let
ui = import ./ui.nix; # shared ink ladder (inkMuted / inkFaint / mixHex)
isDesktop = lib.elem config.networking.hostName [ "FredOS-Gaming" "FredOS-Macbook" ];
homeDir = "/home/fred";
stateLink = "${homeDir}/.local/state/quickshell-theme";
@ -282,14 +283,21 @@ let
#
# One line, not pretty-printed: hyprctl joins its argv into the request
# string, so keeping the payload free of newlines keeps it intact.
hyprLua = s: pkgs.writeText "hypr.lua" ("hl.config({" + lib.concatStringsSep "," [
''general={["col.active_border"]="rgb(${s.base04})",["col.inactive_border"]="rgb(${s.base03})"}''
# Borders take the DERIVED ink, not s.base04/s.base03 — quickshell's
# Theme.qml runs the same two mixes, and the shell frame sits directly
# against these borders. Reading the raw slots here is what left the two
# outlines a visible shade apart.
hyprLua = s: let
ink4 = ui.mixHex s.base05 s.base00 ui.inkMuted;
ink3 = ui.mixHex s.base05 s.base00 ui.inkFaint;
in pkgs.writeText "hypr.lua" ("hl.config({" + lib.concatStringsSep "," [
''general={["col.active_border"]="rgb(${ink4})",["col.inactive_border"]="rgb(${ink3})"}''
''decoration={shadow={color="rgba(${s.base00}99)"}}''
(''group={["col.border_active"]="rgb(${s.base04})",''
+ ''["col.border_inactive"]="rgb(${s.base03})",''
(''group={["col.border_active"]="rgb(${ink4})",''
+ ''["col.border_inactive"]="rgb(${ink3})",''
+ ''["col.border_locked_active"]="rgb(${s.base05})",''
+ ''groupbar={text_color="rgb(${s.base05})",''
+ ''["col.active"]="rgb(${s.base04})",["col.inactive"]="rgb(${s.base03})"}}'')
+ ''["col.active"]="rgb(${ink4})",["col.inactive"]="rgb(${ink3})"}}'')
''misc={background_color="rgb(${s.base00})"}''
] + "})");