bread-ecosystem/bread-theme/assets/shell/liquid-motion/theme.toml
Breadway 53a6c59f2d bread-theme: correct [launcher] manifest to match breadbox's actual behaviour
radius (20 -> 8) and icon_px (36 -> 32) were demo-derived aspirations, not
what breadbox implements today (.launcher-bg's actual border-radius and
make_icon's actual set_pixel_size). row_anim/rule/footer/sections/modes are
kept but marked declared-but-not-yet-consumed: breadbox implements none of
row animation, a rule/divider, a footer, sections, or query modes today, so
the manifest should say so rather than imply they're live. Adds a builtin
launcher test mirroring the existing window/tokens fidelity tests.
2026-08-31 15:14:44 +08:00

179 lines
6.6 KiB
TOML

# The compiled-in builtin theme (bread-theme/src/shell/builtin.rs). Describes
# breadbar/breadbox AS THEY EXIST TODAY, not the 01-liquid-motion.html demo —
# where the two disagree (bar side margin, launcher width/top, the two easing
# curves), this file follows the current Rust source, since Phase 2's
# acceptance test is pixel-identical rendering against today's bar.
#
# Sources: breadbar/src/main.rs:16-22 (BAR_* / CHIP_HEIGHT / ICON_PX consts),
# breadbar/src/theme.rs (load_css's radius/pad/spring locals and the actual
# CSS selectors), breadbar/src/{panel,osd}.rs and
# breadbar/src/notifications/{popup,history}.rs (satellite window anchors,
# margins, namespaces), breadbox/breadbox/src/main.rs:341-346 (launcher
# margin/size), :151 (build_css's .launcher-bg radius), :174-193 (make_icon's
# set_pixel_size calls), ~/.config/hypr/scripts/ui/rules.lua (compositor
# rules).
name = "Liquid Motion"
id = "liquid-motion"
[tokens]
font_family = "Varela Round, sans-serif"
font_fallback = "sans-serif"
font_size_base = 14
radius_bar = 16
radius_card = 12
radius_sm = 9
# Not in the plan's §4 schema list, but a named local in theme.rs::load_css
# alongside radius_bar/radius_card/radius_sm (`radius_pill = "999px"`) — the
# OSD pill's corner radius.
radius_pill = 999
pad = 12
bg_alpha = 0.72
# Two curves theme.rs actually uses, not one: `spring` is the overshoot/bounce
# curve (clock flips, pop-ins, the workspace caret draw); `spring_settle` is
# the flatter curve used for hovers and workspace/stat-pair transitions. The
# plan's §4 example names only `spring`.
spring = "cubic-bezier(0.22, 1.35, 0.36, 1)"
spring_settle = "cubic-bezier(0.22, 1.2, 0.36, 1)"
# "accent" flows through as @accent (the workspace-trail gradient's start);
# these are palette token NAMES, not hex - pywal still drives colour.
accent_from = "accent"
accent_to = "teal"
# Not in the plan's §4 schema list, but breadbar::CHIP_HEIGHT / ::ICON_PX
# today.
chip_height = 32
icon_px = 24
[bar.window]
anchors = ["top", "left", "right"]
width = "fill"
height = 44
margin = { top = 12, left = 16, right = 16 }
exclusive = "auto"
# breadbar never calls gtk4-layer-shell's set_keyboard_mode today, which
# defaults to KeyboardMode::None — spelled out explicitly here rather than
# left to omit-means-default, since "the shell must never fail to start
# because a theme file is malformed" cuts both ways: an explicit builtin
# value can't silently drift if the crate's own Default ever changes.
keyboard = "none"
layer = "top"
[bar.slots]
# The `widget:*` entries reproduce breadbar's pre-Phase-3b fixed Lua-widget
# interleave exactly (main.rs's now-removed widget_right_of_workspaces /
# widget_left_of_clock / widget_right_of_clock / widget_left_of_stats), so
# this manifest still renders pixel-identically to today's bar. `tray`
# deliberately has NO slot entry anywhere — it lives in the control-panel
# popover, not the bar, and is keyed directly by breadbar regardless of
# `[bar.slots]`.
left = ["workspaces", "widget:right_of_workspaces"]
centre = ["media", "widget:left_of_clock", "clock", "widget:right_of_clock"]
right = ["widget:left_of_stats", "volume", "wifi", "battery", "control"]
drawer = []
[modules.workspaces]
style = "trail"
show_empty = true
[modules.clock]
style = "flip"
format = "%H:%M"
show_date = false
[launcher]
# breadbox/breadbox/src/main.rs:341-344 sets vbox.set_margin_top(120) and
# vbox.set_size_request(600, -1) — the demo's "540px overlay, 16% top" is a
# design-doc approximation, not what the code does today.
mode = "overlay"
width = 600
top = "120px"
# .launcher-bg { border-radius: 8px } (build_css, main.rs:151) — corrected
# from an earlier demo-derived 20px; breadbox does not implement the demo's
# 20px rounding.
radius = 8
# make_icon() (main.rs:174-193) calls img.set_pixel_size(32) on both the
# cached-texture (gio::File/gdk::Texture) path and the GTK icon-theme
# fallback path — corrected from a demo-derived 36px.
icon_px = 32
# Declared-but-not-yet-consumed: breadbox's Phase 4b-i wiring reads only
# mode/width/top/radius/icon_px above; it does not read any of the five keys
# below. row_anim/rule/footer are demo-derived aspirations breadbox
# implements not at all today (no row entrance/exit animation, no
# rule/divider element between the search entry and the list, no footer
# widget summarizing app count). sections/modes happen to already describe
# today's actual (trivial) behaviour — one flat unsectioned list, plain app
# search with no calc/command/url modes — but are likewise unread by any
# code path; a real sections/modes implementation is Phase 5/6, same as the
# other three.
row_anim = "flip"
rule = "gradient"
footer = "count_apps"
sections = false
modes = ["apps"]
# Keyed by layer-shell namespace, matching [compositor.*] below, so the two
# tables share one keyspace and can be validated against each other.
# breadbar-notif's popup toast uses set_default_width(320) (its history
# sibling on the same namespace uses 360 — 320 is the live-toast surface, the
# one this positions). breadbar-panel sets no window width at all: its
# popovers size from their own CSS (.control-panel-inner / .wifi-popover-inner
# min-width), which is why its width is "auto" rather than a number.
[surfaces."breadbar-notif"]
anchor = "top_right"
offset = [16, 64]
width = 320
layer = "overlay"
[surfaces."breadbar-osd"]
anchor = "bottom_centre"
offset = 80
width = 180
layer = "overlay"
[surfaces."breadbar-panel"]
anchor = "top_right"
offset = [16, 64]
width = "auto"
layer = "overlay"
[surfaces."breadbar-dismiss"]
# Anchored to all four edges (a fullscreen click-away scrim) with only a top
# margin, so it starts below the bar rather than covering it.
anchor = "fill"
offset = 56
width = "fill"
layer = "overlay"
# Faithful to scripts/ui/rules.lua's five breadbar namespaces + breadbox.
[compositor."breadbar"]
blur = true
ignore_alpha = 0.2
blur_popups = true
animation = "slide top"
[compositor."breadbar-osd"]
blur = true
ignore_alpha = 0.2
animation = "slide bottom"
[compositor."breadbar-notif"]
blur = true
ignore_alpha = 0.2
animation = "slide right"
[compositor."breadbar-panel"]
blur = true
ignore_alpha = 0.2
animation = "slide right"
[compositor."breadbar-dismiss"]
no_anim = true
[compositor."breadbox"]
blur = true
ignore_alpha = 0.2
# No `css = "..."` overlay: the builtin is compiled in via `include_str!`
# and has no on-disk directory to resolve a relative overlay path against.
# `extra.css` is for user/system themes, which do have one — see
# `resolve_theme` in mod.rs.