From 27a8666422ef02fb8a827ef27be963f0d19610a2 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 15 Sep 2026 17:16:25 +0200 Subject: feat: launcher to the DP-1 centre, hamburger for English The launcher sat in the centre of the DP-3 status bar, which is the narrow rotated screen. It moves to the middle of the DP-1 desktop bar, where the workspaces and the window list already live and there is room either side of it. Each bar object carries its own include list, so the module definition moves with it. English gets the hamburger back. The stock bar drew it with an emoji, which this module cannot do: it is an image module and takes a path, not text. So the emoji ships as an image instead, from Twemoji. Doing it the other way round, reverting to hyprland/language and its format-en text, would have brought the burger back at the cost of turning the Italian flag into an emoji too, and the real flag asset is worth keeping. flag-gb.svg had no reference left after that, so it is deleted, and install.sh removes the copy an earlier install left behind. The docs carried three claims that were wrong rather than merely stale: the launcher was listed as a CSS background when it has been an image module since the mark was fixed, and SPEC still described the udt role work as adding roles named after this bar's modules when what shipped was deleting eleven roles nothing read. The dot colours were described as coming from [state] roles that gen_waybar never emitted. Co-Authored-By: Claude Opus 5 --- README.md | 25 ++++++++++++++----------- SPEC.md | 56 ++++++++++++++++++++++++++++++------------------------- bin/wb-lang | 11 +++++++---- config.jsonc | 8 ++++---- icons/burger.svg | 10 ++++++++++ icons/flag-gb.svg | 7 ------- install.sh | 5 ++++- 7 files changed, 70 insertions(+), 52 deletions(-) create mode 100644 icons/burger.svg delete mode 100644 icons/flag-gb.svg diff --git a/README.md b/README.md index f44d04e..6abc653 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ Two waybar bars for DP-3: pill clusters, icons from the desktop's own icon theme instead of font glyphs, and colours driven by [unified-desktop-theme](../unified-desktop-theme). - DP-3 [📅 Wed 15/09] [🕑 14:32] [●] [S] [●] [✉ 9] [🔊] [tray] [⏻] [🇮🇹] - DP-1 [1..8] [ open windows ] + DP-3 [📅 Wed 15/09] [🕑 14:32] [●] [●] [✉ 9] [🔊] [tray] [⏻] [🇮🇹] + DP-1 [1..8] [S] [ open windows ] Each bracket is a pill. Pills group into clusters with gaps between them, so the bars read as a few objects rather than one strip. Hover cross-fades @@ -44,8 +44,8 @@ single one covers everything: | Mechanism | Used by | Why | | --- | --- | --- | | `icon-theme` config key | taskbar, tray | Native support, nothing else needed. | -| `image` module | volume, microphone, presentation mode, language | Runs a script that resolves a state to an icon path. | -| CSS `background-image` | workspaces, clock, launcher | `format-icons` takes text, not paths. | +| `image` module | launcher, volume, microphone, language | Takes a path: either static, or from a script that resolves the current state. | +| CSS `background-image` | workspaces, clock, mail, presentation mode | `format-icons` takes text, not paths. | The consequence worth knowing: **the workspace icons live in `styles/modules.css`, not in the module config.** Changing one means editing @@ -67,21 +67,24 @@ with nothing to say why, so it fails while someone is watching instead. gradient and are not recolourable. That is intended here: icons match the rest of the desktop rather than the bar. -The two icons this repo ships are the exception, because the icon theme has -neither. `icons/slackware.svg` (Simple Icons, CC0) is single-path monochrome, -so `install.sh` tints it from the palette. It is filled with the bar's -background colour rather than the accent, because it sits on the accent pill -and the accent would render it invisible against itself. The two flags keep -their national colours. +The three icons this repo ships are the exception, because the icon theme has +none of them. `icons/slackware.svg` (Simple Icons, CC0) is single-path +monochrome, so `install.sh` tints it from the palette. It is filled with the +bar's background colour rather than the accent, because it sits on the accent +pill and the accent would render it invisible against itself. + +`icons/flag-it.svg` and `icons/burger.svg` (Twemoji, CC-BY 4.0) keep their own +colours. The hamburger stands in for the English layout, which is what the +stock bar showed: not a flag, and deliberately so. ## Layout | Bar | Cluster | Modules | | --- | --- | --- | | DP-3 | left | date, time, VM dots | -| DP-3 | centre | launcher | | DP-3 | right | privacy dots, mail, volume drawer, tray, presentation mode, language | | DP-1 | left | workspaces | +| DP-1 | centre | launcher | | DP-1 | right | open windows | No battery, temperature, CPU, memory or backlight: this is a desktop. diff --git a/SPEC.md b/SPEC.md index 7d151d1..54e6d62 100644 --- a/SPEC.md +++ b/SPEC.md @@ -23,11 +23,11 @@ pointed at DP-3. ## Layout - DP-3 [📅 Wed 15/09] [🕑 14:32] [●] [S] [●] [✉ 9] [🔊] [tray] [⏻] [🇮🇹] - date time vm launcher priv mail vol tray present lang + DP-3 [📅 Wed 15/09] [🕑 14:32] [●] [●] [✉ 9] [🔊] [tray] [⏻] [🇮🇹] + date time vm priv mail vol tray present lang - DP-1 [1..8] [ open windows ] - workspaces taskbar + DP-1 [1..8] [S] [ open windows ] + workspaces launcher taskbar DP-3 is rotated, so a bar there is only 1080px wide. One bar holding every module was too crowded at that width, so status stays on DP-3 alone and the @@ -47,7 +47,7 @@ transparent gaps, so the bar reads as groups rather than a continuous strip. | Position | Module | Icon source | Notes | | --- | --- | --- | --- | -| left | `image#launcher` | `slackware.svg`, shipped here | Accent background, the one always-coloured pill. Opens the quickshell drawer. An `image` module: a `custom` one draws nothing when its format is empty, and the format has to be empty because the mark is an icon. | +| DP-1 centre | `image#launcher` | `slackware.svg`, shipped here | Accent background, the one always-coloured pill. Opens the quickshell drawer. An `image` module: a `custom` one draws nothing when its format is empty, and the format has to be empty because the mark is an icon. | | left | `clock#date` | `x-office-calendar` | Icon then text. Calendar tooltip kept. | | left | `clock#time` | `clock` | Icon then text. | | left | `hyprland/workspaces` | eight themed icons, via CSS | See below. | @@ -57,7 +57,7 @@ transparent gaps, so the bar reads as groups rather than a continuous strip. | right | `tray` | application-provided | | | right | `custom/mail` | CSS, plus the count as text | Unread mail, the same notmuch watcher the stock bar ran. The envelope is a CSS background; the count stays text, because it is content rather than decoration, exactly like the clock. | | right | `custom/presentation` | CSS, keyed on the module's class | Presentation mode, the same `statusctl`-backed module the stock bar ran. It already emits an empty text and a state class, so the icon is chosen in CSS and the glyphs are simply dropped. | -| right | `image#lang` | `flag-it.svg` / `flag-gb.svg`, shipped here | An `image` module: `hyprland/language` styles as `#language` only, with no per-language class, so a flag cannot be selected in CSS. | +| right | `image#lang` | `flag-it.svg` / `burger.svg`, shipped here | An `image` module: `hyprland/language` styles as `#language` only, with no per-language class, so the image cannot be selected in CSS. English gets the hamburger the stock bar showed, not a flag. | Dropped from the current bar: `custom/breaktimer`, `custom/mail`, `custom/privacy_dots` stays only if you want it on this bar too (it is @@ -152,7 +152,7 @@ Modular, one file per module, mirroring the current setup: icons/ slackware.svg carries @ACCENT@, substituted on install flag-it.svg - flag-gb.svg + burger.svg bin/ wb-icon state to icon path, for the `image` modules vms_dots.sh moved here from ~/bin, symlinked back @@ -169,24 +169,30 @@ module file explicitly. That is a waybar limitation, not a choice. This repo is a **consumer** of udt: it holds the bar, udt holds the colours. `styles/theme.css` is generated by `udt-palette` and gitignored, exactly like -every other generated file in that repo. Generating it needs two changes on -the udt side: - -**A new `[waybar]` role block.** The current one names `temperature`, -`memory`, `cpu`, `backlight` and `battery`, none of which exist on this bar. -The new roles are `launcher`, `workspaces`, `vmdots`, `taskbar`, `volume`, -`tray`, `present`, `lang`, `date`, `time`, plus the existing `main_*`, -`hover_*` and `outline`. - -**Added to all nine `roles-*.conf`.** `udt-palette --selftest` enforces that -every scheme defines the same role set, so a role added to one file and not -the rest fails the check. That is the check doing its job. - -Dot colours come from the existing `[state]` roles: `success` for a running -VM, `warning` for paused, `critical` for crashed, `info` for saved, and -`fg_faint` for shut off. Both dot scripts currently hardcode `#30D158`, -`#FFD60A`, `#FF9F0A`, `#9B32FA` and `#6E6E73`; they will read a generated -colour block instead. +every other generated file in that repo. udt's `install.sh` writes it straight +into `~/.config/waybar-udt/styles/theme.css` under a fixed name this bar +imports, so switching scheme rewrites the file the running bar already reads. + +**The `[waybar]` role block has no per-module colours.** This was planned as a +rename, and turned out to be a deletion. The stock bar alternated module +backgrounds so it read as stripes, and carried a role for each: `workspaces`, +`temperature`, `memory`, `cpu`, `time`, `date`, `tray`, `volume`, `backlight`, +`battery`, plus `charging`. This bar draws every pill on `@main-bg`, and its +stylesheets reference seven names in total: + + @accent @main-bg @main-fg @hover-bg @hover-fg @outline @critical + +So all eleven module roles had no consumer, and adding `launcher`, `mail` or +`present` roles would have invented more of the same. They are gone from all +nine `roles-*.conf` and from `gen_waybar`. Re-adding one means a stylesheet +that actually references it. + +**Dot colours do not come from `[state]`.** `gen_waybar` never emitted +`success` or `info`, so `install.sh` reads `green`, `teal`, `mauve`, +`overlay0`, `warning` and `critical` back out of the generated stylesheet and +writes `~/.config/waybar-udt/dots.colors` for the two scripts to source. They +are bash and cannot read `@define-color`; both fall back to Macchiato values +when that file is missing, so they still run standalone. ## Install diff --git a/bin/wb-lang b/bin/wb-lang index 5a0cd5d..4e846b6 100755 --- a/bin/wb-lang +++ b/bin/wb-lang @@ -10,8 +10,8 @@ # # wb-lang # print "$path\n$tooltip" for the image module # -# The flags live next to this bar's config because the icon theme ships 13 and -# neither Italian nor British is among them. +# The images live next to this bar's config: the icon theme ships 13 flags and +# Italian is not among them, and it has no hamburger at all. set -euo pipefail flags="$HOME/.config/waybar-udt" @@ -30,11 +30,14 @@ for k in d.get("keyboards", []): print(k.get("active_keymap", "")) break' 2>/dev/null || true)" +# Italian gets its flag; English gets the hamburger, which is what the stock +# bar showed for it. Not a national flag on purpose: the layout is "us" but +# the joke predates this bar, so restoring it matters more than consistency. case "$layout" in Italian*) flag="flag-it.svg"; name="Italian" ;; -English*) flag="flag-gb.svg"; name="English" ;; +English*) flag="burger.svg"; name="English" ;; "") flag="flag-it.svg"; name="unknown" ;; -*) flag="flag-gb.svg"; name="$layout" ;; +*) flag="burger.svg"; name="$layout" ;; esac if [[ ! -r "$flags/$flag" ]]; then diff --git a/config.jsonc b/config.jsonc index 1d94a39..58944aa 100644 --- a/config.jsonc +++ b/config.jsonc @@ -16,7 +16,6 @@ "include": [ "$HOME/.config/waybar-udt/modules/clock.jsonc", "$HOME/.config/waybar-udt/modules/custom/vmdot.jsonc", - "$HOME/.config/waybar-udt/modules/image/launcher.jsonc", "$HOME/.config/waybar-udt/modules/custom/privacy_dots.jsonc", "$HOME/.config/waybar-udt/modules/custom/mail.jsonc", "$HOME/.config/waybar-udt/modules/image/volume.jsonc", @@ -30,9 +29,6 @@ "clock#time", "custom/vmdot" ], - "modules-center": [ - "image#launcher" - ], "modules-right": [ "custom/privacy_dots", "custom/mail", @@ -55,12 +51,16 @@ { "include": [ "$HOME/.config/waybar-udt/modules/hyprland/workspaces.jsonc", + "$HOME/.config/waybar-udt/modules/image/launcher.jsonc", "$HOME/.config/waybar-udt/modules/extras/taskbar.jsonc", ], "modules-left": [ "hyprland/workspaces" ], + "modules-center": [ + "image#launcher" + ], "modules-right": [ "wlr/taskbar" ], diff --git a/icons/burger.svg b/icons/burger.svg new file mode 100644 index 0000000..a424979 --- /dev/null +++ b/icons/burger.svg @@ -0,0 +1,10 @@ + + diff --git a/icons/flag-gb.svg b/icons/flag-gb.svg deleted file mode 100644 index 7991383..0000000 --- a/icons/flag-gb.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/install.sh b/install.sh index cd64844..bae549c 100755 --- a/install.sh +++ b/install.sh @@ -125,7 +125,10 @@ mark="$(sed -n 's/^@define-color main-bg *\(.*\);$/\1/p' "$target/styles/theme.c mark="${mark:-#24273a}" sed "s|@ACCENT@|$mark|" "$repo/icons/slackware.svg" > "$target/slackware.svg" install -Dm644 "$repo/icons/flag-it.svg" "$target/flag-it.svg" -install -Dm644 "$repo/icons/flag-gb.svg" "$target/flag-gb.svg" +install -Dm644 "$repo/icons/burger.svg" "$target/burger.svg" +# The UK flag was replaced by the hamburger for English; drop a copy left by +# an earlier install, or wb-lang's old target lingers on disk unreferenced. +rm -f "$target/flag-gb.svg" # ---------------------------------------------------------------- scripts -- # The two dot scripts used to live only in ~/bin, in no repository at all. -- cgit v1.2.3