# waybar-theme-udt A waybar bar for DP-3, themed by [unified-desktop-theme][udt] and drawn with icons from the desktop's own icon theme rather than font glyphs. [udt]: ../unified-desktop-theme ## Goal Three things at once: - **No font glyphs.** Every module that shows a symbol shows a real icon from `Material-Black-Plum-Suru`, the theme GTK already uses. Icons keep their own colours, because that is what every other application on this desktop shows. - **Colours from udt.** Pill backgrounds, text and states resolve from `palette/roles-.conf`, so switching scheme recolours this bar with everything else. - **Pill clusters with transitions.** The grouped-capsule layout of `idea1.png` with the hover and state transitions of `idea2.png`. The current bar on DP-1 is untouched. This one installs alongside it and is pointed at DP-3. ## Layout DP-3 [📅 Wed 15/09] [🕑 14:32] [●] [●] [✉ 9] [🔊] [tray] [⏻] [🇮🇹] date time vm priv mail vol tray present lang 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 desktop itself, the workspaces and the window list, moved to DP-1 where there are 2560px to spread them across. Both are one waybar process reading one stylesheet: waybar takes a top-level array of bars. This replaces the stock bar rather than sitting beside it. Hyprland starts it from `~/.config/hypr/sections/autostart.lua`, which used to launch a bare `waybar`; `~/.config/waybar/` is left on disk but nothing reads it. Each bracket is one pill. Neighbouring pills in a cluster share a background and weld together with asymmetric corner radii; clusters are separated by transparent gaps, so the bar reads as groups rather than a continuous strip. ### Modules | Position | Module | Icon source | Notes | | --- | --- | --- | --- | | 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. | | left | `custom/vmdot` | coloured dots | Dots keep their shape; colours move to roles. | | center | `wlr/taskbar` | `icon-theme` config key | Per-window application icons. | | right | `group/wireplumber` | `image` module | Drawer group kept as it is today. | | 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` / `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 currently listed; say if it should follow the others out). No battery, no temperature, no cpu, no memory, no backlight: this is a desktop. Clock is the one module that stays text. An icon cannot say 14:32; the icon sits before the text, which is what makes it match the rest. ### Workspace icons | WS | Icon | Was | | --- | --- | --- | | 1 | `web-browser` | browser glyph | | 2 | `utilities-terminal` | terminal glyph | | 3 | `text-editor` | code glyph | | 4 | `network-server` | matches the quickshell drawer's VM tile (`U+F233`, Font Awesome `server`) | | 5 | `document-edit` | pen on a document: the alternate text editor lives here | | 6 | `applications-graphics` | graphics glyph | | 7 | `internet-chat` | chat glyph | | 8 | `input-gaming` | joypad: games and media players | All eight resolve in `Material-Black-Plum-Suru` today. ## How icons reach the bar Three mechanisms, because waybar offers three and no single one covers everything. This is the part worth reading before changing anything. **1. Native `icon-theme` (taskbar, tray).** `wlr/taskbar` takes `icon-theme` and `icon-size` outright. Today it asks for `Papirus`, **which is not installed**, so GTK has been silently falling back. Pointing it at `Material-Black-Plum-Suru` is a bug fix, not a preference. **2. The `image` module (volume, presentation mode).** `image` runs `exec` and expects `$path\n$tooltip` on stdout, so a small script maps state to an icon name, resolves it through the GTK icon theme, and prints the path. One `image` module is one icon, so a five-state volume indicator is one module plus one script, not five modules. **3. CSS `background-image` (workspaces).** Workspace buttons come from a single `hyprland/workspaces` module and `format-icons` takes text, not paths. Faking the strip with eight `custom` modules would lose click-to-switch and the active/urgent states, so instead the real module keeps its behaviour, its labels are emptied, and each button gets an icon through `#workspaces button:nth-child(n) { background-image: url(...) }`. The consequence, stated plainly: **the eight workspace icon paths live in the stylesheet, not in the config.** Changing a workspace icon means editing CSS. ### Why the icons cannot follow the accent 2466 of the 5169 panel icons in `Material-Black-Plum-Suru` carry a hardcoded `oomox` gradient (`#a08fbf` to `#5a33a3`) and seven further named gradients each. They are not monochrome and not recolourable by CSS `color`. So icons show their own colours and do not track the scheme, which is the intended behaviour here: they match every other application on the desktop. The two icons this repo ships are the exception. `slackware.svg` (from Simple Icons) and the two flags are single-path monochrome, so `slackware.svg` is tinted by a one-line `fill` substitution at install time. It takes the bar's background colour, not the accent: it sits on the accent pill, and filling it with the accent puts it on top of itself. The flags keep their national colours. ## Repository layout Modular, one file per module, mirroring the current setup: config.jsonc entry point, `include`s every module file modules/ clock.jsonc clock#date and clock#time hyprland/ workspaces.jsonc language.jsonc custom/ launcher.jsonc vmdot.jsonc extras/ taskbar.jsonc tray.jsonc wireplumber.jsonc image/ language.jsonc the keyboard flag, via `image` styles/ style.css entry point, imports the rest in order theme.css GENERATED by udt-palette, gitignored fonts.css global.css #waybar, tooltip, button base rules pills.css the cluster geometry and transitions modules.css per-module rules, including workspace icons icons/ slackware.svg carries @ACCENT@, substituted on install flag-it.svg burger.svg bin/ wb-icon state to icon path, for the `image` modules vms_dots.sh moved here from ~/bin, symlinked back privacy_dots.sh moved here from ~/bin, symlinked back install.sh LICENSE README.md Wildcard `include` is broken in waybar 0.14, so `config.jsonc` lists every module file explicitly. That is a waybar limitation, not a choice. ## Palette integration 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. 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 `install.sh` follows udt's conventions: symlink what this repo owns canonically, copy what another application owns, guard every reload. - Module and style files are **symlinked** into `~/.config/waybar-udt/`, so the repo cannot drift from what is installed. - `icons/slackware.svg` is **generated** into place with `@ACCENT@` substituted, the same way udt generates `launcher.rasi`. - `bin/vms_dots.sh` and `bin/privacy_dots.sh` are symlinked to `~/bin/`, replacing the copies that live there now. **The originals are backed up first**: they are the only copy and are not currently in any repository. - The bar is **not** started and `~/.config/waybar` is **not** touched. Running it is one command, printed at the end, so DP-1's bar keeps working until you choose otherwise. Reload is `killall -SIGUSR2 waybar`, and `reload_style_on_change` is already on. ## Verification Per udt's own rule, visual claims are measured, not reasoned about: grim -o DP-3 /tmp/shot.png `wb-icon` gets one runnable self-check: every icon name the bar asks for must resolve in the icon theme, so a missing icon fails loudly at install time rather than rendering as a blank pill. ## Open questions 1. `custom/privacy_dots` is in the keep list but was not in the ten modules you named. On this bar or not? 2. Licence: GPLv2-only unless you say otherwise.