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.
The line named a wallpaper inside the theme directory directly, so importing a
different theme left it pointing at a path that no longer existed -- a blank
screen at the next login, with nothing in the log to say why, because nobody
asked for a wallpaper and so nothing reported one missing.
It now names ~/.local/share/wallpapers/hyprcosmic/current, the symlink
`import-theme --assets` maintains. rofi's local.rasi shows the same image in
the launcher sidebar and names the same link, so the two cannot drift.
Changing the wallpaper is now `ln -sfn`, not an edit to this file, which the
comment says so that the next person does not undo the indirection.
The path stays literal. This file is not a shell -- deliberately, so that a
file naming programs cannot be escalated into arbitrary execution -- so `~`
and `$HOME` would be passed through as text.
`rofi -show drun` came up unstyled. Three separate reasons, all of them
invisible: `import-theme` wrote ~/.config/rofi/theme.rasi, but rofi only ever
auto-loads config.rasi and nothing imported theme.rasi; theme.rasi holds a
HyDE palette and nothing else, no widget geometry at all; and no layout was
shipped anywhere for it to colour.
The layering mirrors what config/waybar already does, for the same reason --
a theme supplies colours, and the layout has to survive being handed a theme
that defines only some of them:
1. palette.rasi defaults, under the exact names HyDE themes use
2. theme.rasi the installed theme's rofi.theme, written by cosmic-conf
3. rules.rasi geometry and layout, with no colour literals at all
4. local.rasi per-machine paths: sidebar wallpaper, icon theme
Later imports win, so a theme recolours the launcher without rules.rasi
knowing a theme exists, and a machine points at its own wallpaper without
either of them knowing the path. Unlike waybar there is no bridge step: a HyDE
rofi.theme defines the names rules.rasi already references.
1 and 3 are shared and go under /usr/share/hyprcosmic/rofi. 2 and 4 must be
per-user, and config.rasi with them: it imports those two relatively, and rofi
resolves a relative @import against the importing file's directory.
rules.rasi is HyDE's style_1 with three deliberate departures, documented in
its header. HyDE computes the border width, radius and font in rofilaunch.sh
before invoking rofi; there is no launcher script here -- the keybinding runs
`rofi -show drun` bare -- so those are baked in. The sidebar image moves to
local.rasi because HyDE's ~/.cache/hyde/wall.thmb does not exist outside HyDE.
And dummywall gets `background-color: @main-bg` rather than transparent, so a
machine with no wallpaper set shows a panel instead of a hole.
The display-* labels are Nerd Font glyphs copied byte-for-byte out of
style_1.rasi. They are Private Use Area codepoints and do not survive being
retyped; verified as U+F303, U+F120, U+F07B, U+F2D0, each followed by a thin
space, and confirmed present in JetBrainsMono Nerd Font via
`fc-list :charset=`.
Verified with `rofi -dump-theme` and `-dump-config`: both exit 0 with empty
stderr, and the merged dump shows the Tokyo Night theme's main-bg beating the
palette default.
Without it "the file wins" only held at the moment someone last ran `apply` by
hand. Now cosmic.conf is compiled at login and recompiled on every edit to it
or to anything it sources, so whatever COSMIC's settings UI has stored since
the last login is overwritten before the desktop settles.
First in the file for that reason. The bar does not read cosmic-config, so the
ordering is for the compositor's benefit rather than waybar's.
No `--config`: the default path is derived from XDG_CONFIG_HOME inside the
process, so unlike the waybar line this needs no hardcoded home directory --
the one part of this file that is not portable as written.
A malformed edit stays non-fatal. It goes to the session log and the last good
configuration remains in place, so a typo cannot strand you at a broken
desktop; fix the file and the next save applies.
Requires cosmic-conf on PATH, which it now is (/usr/bin/cosmic-conf, release
build). `waybar` and `awww-daemon` are already named bare here, so the profile
resolves argv[0] through PATH.
Keeping the imported theme in its own file, sourced from cosmic.conf, is what
stops a re-import from clobbering the keybindings. But a sourced file only
does anything if something sources it, and until now `import-theme --out`
reported "Wrote ..." whether or not anything did -- which looks like success
while the desktop stays exactly as it was.
It now checks the sibling cosmic.conf and prints the line to add when the file
is unreachable. The match is by filename and deliberately loose: it is looking
for evidence the user already knows about the file, not parsing the config.
The shipped template carries that `source` line commented out rather than
live, because `source` naming a file that does not exist is a hard error, and
a fresh checkout has no theme.conf yet. Copying the template and running
`apply` has to work before any theme is imported.
Three things stood between `assets.rs` and a themed desktop.
`import-theme` never called it. The module was written, tested and unreachable;
`--assets` now wires it up, with `--source`, `--overwrite` and `--dry-run`, and
finds the theme repo's Source/ directory by searching upward rather than
assuming HyDE's exact nesting depth.
The archive guard rejected every real icon theme. Refusing any `..` in a link
target is right for an entry path but wrong for a symlink: icon themes are
built out of relative links into sibling directories, and Tela ships thousands
of `../devices/network-wireless.svg`. What matters is whether the target
resolves inside the destination, which `stays_within_root` now decides
lexically -- no canonicalize, since the tree does not exist at plan time and
following real links during validation would be a TOCTOU window. Absolute
targets and links that climb past the root are still refused; the existing
escape tests still pass.
`apply` silently ignored `source`. It parsed and resolved inline while `watch`
went through `compile`, and `flatten` drops `Item::Source` -- so an include
that worked under `watch` vanished under `apply`. `apply` now uses `compile`
too. This matters immediately: the generated theme lives in its own
theme.conf, sourced from cosmic.conf, so re-importing a theme cannot clobber
the keybindings.
The waybar stylesheet claimed a theme could be dropped in ahead of it to
recolour the bar. It could not -- HyDE names its colours main-bg/wb-act-bg and
the rules referenced bar-bg/accent. Split into palette + theme + bridge +
rules, imported in that order, so the claim is now true. Verified by loading
the result through GTK's own CSS parser: with Tokyo Night installed main-bg
resolves to #24283b and wb-act-bg to #bb9af7; with an empty theme.css the
defaults stand. Both parse without error.
Two deliberate departures, both commented where they are made: the theme's
near-transparent bar-bg is composited at 0.85 because cosmic-comp has no blur
to put behind it, and theme.css is copied next to style.css rather than
imported from HyDE's own path, because a missing @import is fatal in GTK and
would break the bar on any machine without a theme.
The hyprcosmic profile does not start cosmic-bg, so until now nothing was
drawing a background at all.
HyDE calls this swww, and it is packaged for Fedora after all -- the
alebastr/sway-extras COPR carries it. Upstream renamed the project to awww at
0.12 and the package Obsoletes swww < 0.12.0, so `dnf install swww` lands
awww-0.12.1. /usr/bin/swww still exists as a shim, but it prints a deprecation
warning on every invocation and its own help says it will be removed in a
future update, so the autostart line uses the real name.
`bind = SUPER, D, exec, rofi -show drun` is the most recognisable line in a
hyprland.conf, and the hyprcosmic profile makes it necessary rather than just
idiomatic: with cosmic-launcher and cosmic-app-library not running, COSMIC's
stock Super, Super+/ and Super+A bindings point at nothing.
Binds are the one repeatable key in the language -- many lines fold into a
single map instead of the last one winning -- so they bypass the schema, which
is built around one conf key naming one value. They land in the Shortcuts
`custom` key, which cosmic-comp merges over `defaults`, so the system file is
untouched and reverting means deleting the lines and re-applying.
Actions are rendered as RON text rather than modelled as an enum: COSMIC's
Action has forty-odd variants, this crate deliberately does not link the cosmic
crates, and the mapping table only ever needs a handful. Dispatchers without a
genuine equivalent are refused rather than approximated, since a keybinding
that silently does the wrong thing is worse than one that fails to compile.
Verified the emitted file deserializes into cosmic-settings-config's own
`Shortcuts` type: five bindings, keysyms XK_a/XK_slash/XK_Return, Spawn actions.
The profile disables cosmic-panel, so without these a HyprCosmic session is a
compositor with no bar, no clock and no tray. Waybar's shipped default is not
a substitute: /etc/xdg/waybar/config.jsonc is built entirely from sway/*
modules and renders nothing under cosmic-comp.
Module choices are pinned to what cosmic-comp actually advertises on the
Wayland registry, checked against a live session rather than assumed:
ext/workspaces ext_workspace_manager_v1, present in stock cosmic-comp.
wlr/taskbar zwlr_foreign_toplevel_management_v1, absent from stock
cosmic-comp and supplied by this fork's Patch A. Under a
stock compositor the module stays empty and the bar
otherwise works, so the config is not fork-only.
tray cosmic-panel normally hosts the StatusNotifierWatcher via
cosmic-applet-status-area; with the panel disabled waybar
hosts it instead.
The stylesheet keeps every colour behind an @define-color so that a HyDE
theme's waybar.theme -- which is only a list of such declarations, the bespoke
CSS being HyDE's own rather than any theme's -- can recolour the bar by being
sourced ahead of it.
Configs install to /usr/share/hyprcosmic/waybar so the autostart file needs no
per-user paths, which matters because the profile parser is deliberately not a
shell and cannot expand ~ or $HOME.
Verified: config.jsonc parses as JSONC and every compositor module placed on
the bar has a matching config block.