mirror of
https://github.com/outbackdingo/hyprcosmic.git
synced 2026-08-25 14:53:21 +00:00
The bar had six modules and one dead click: pulseaudio's on-click ran pavucontrol, which is not installed. It now opens `cosmic-settings sound`, with middle-click as a mute toggle. Added: mpris, bluetooth, temperature, idle_inhibitor, privacy, a swaync notification button, and power-profiles- daemon -- and HyDE's pill styling, so each module is its own rounded chip rather than text in a row. No backlight module. This machine's panel has no sysfs backlight interface, so it would render as a permanent error. The rest of this is about the icons, which have now been got wrong enough times to deserve a mechanism. Private Use Area characters do not survive being typed. Writing the previous version I put a comment at the top of the file saying every glyph was an escape, then typed literal glyphs into the same file; the codepoint dump found `format-bluetooth` had picked up a stray U+F293 and another field had two glyphs where I had written one. Nothing errors -- waybar is perfectly happy to render a label that is one space. So the config is generated, not written. config.jsonc.in is pure ASCII with @@TOKEN@@ placeholders, generate-config.py holds the name-to-codepoint table and emits `\uXXXX` escapes, and it asserts its own output `.isascii()` before writing. A hand-typed glyph now cannot reach the file. The delimiter is doubled because single `@NAME@` collided with wpctl's `@DEFAULT_AUDIO_SINK@`, which the generator caught as an unknown token rather than mangling. Every codepoint was checked against the installed font with `fc-list ":charset=..."`. HyDE's own values do not all survive that: its muted glyph U+FA80 is an old Material Design Icons codepoint that Nerd Fonts v3 moved, so copying upstream verbatim would have shipped tofu. Three were replaced. The font stack named "FontAwesome 6 Free" first, which resolves to the Regular face and carries a fraction of the icon set -- the icons that did appear were coming from accidental per-character fontconfig fallback. JetBrainsMono Nerd Font goes first now. One CSS note, because the failure mode is not obvious: GTK has no `:empty` pseudo-class, and an unknown pseudo-class does not skip the rule, it rejects the whole stylesheet and waybar exits 1. `#tray:empty` took the bar down. install-assets.sh grows a third category. The template and the generator live under config/ but must not be installed -- a file full of placeholders sitting next to the real config is a coin toss for whoever opens one first -- and the audit refuses to run until every file is classified, which is exactly what it is for.
37 lines
1.7 KiB
CSS
37 lines
1.7 KiB
CSS
/* Map HyDE's waybar colour names onto the ones rules.css uses.
|
|
*
|
|
* Imported after both palette.css and the theme's own waybar.theme, so it sees
|
|
* whichever definition of each HyDE name is in force and does not care which
|
|
* file supplied it. This indirection is the whole reason a HyDE theme can
|
|
* recolour this bar without any of the rules changing.
|
|
*/
|
|
|
|
@define-color bar-fg @main-fg;
|
|
@define-color accent @wb-act-bg;
|
|
@define-color muted @wb-hvr-fg;
|
|
|
|
/* `bar-bg` IS remapped, and this is a deliberate departure from the theme.
|
|
*
|
|
* HyDE themes set bar-bg to something like rgba(0, 0, 0, 0.1) and rely on the
|
|
* compositor blurring whatever is behind the bar. cosmic-comp has no
|
|
* rule-driven blur -- `import-theme --report` lists decoration.blur.* as
|
|
* needing a compositor patch -- so honouring that value literally gives a
|
|
* ~90% transparent bar with unblurred desktop showing through and text that
|
|
* cannot be read.
|
|
*
|
|
* So the theme's own background colour is used at an opacity that works
|
|
* without blur. Delete these two lines to get the theme's literal value back,
|
|
* or once blur lands.
|
|
*/
|
|
@define-color bar-bg alpha(@main-bg, 0.85);
|
|
|
|
/* The pill behind each module. Derived rather than themed: HyDE has no name
|
|
* for it, because in HyDE the pill IS the bar -- its modules sit on a
|
|
* transparent strip and the compositor blurs the desktop behind them. Without
|
|
* blur that reads as text floating on the wallpaper, so here the bar keeps a
|
|
* background and the pills are a light lift off it.
|
|
*
|
|
* Derived from the foreground, not the background, so it stays visible whether
|
|
* the theme is dark or light. */
|
|
@define-color module-bg alpha(@main-fg, 0.08);
|