mirror of
https://github.com/outbackdingo/hyprcosmic.git
synced 2026-08-25 14:53:21 +00:00
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.
34 lines
1.8 KiB
Plaintext
34 lines
1.8 KiB
Plaintext
# Programs the HyprCosmic session starts after COSMIC's own components.
|
|
#
|
|
# Installed to ~/.config/hyprcosmic/autostart and read by cosmic-session's
|
|
# profile module. One command per line. Arguments and quoting work, but this is
|
|
# NOT a shell: no $VAR, no ~, no globs, no $(...). Paths must be absolute.
|
|
#
|
|
# `#` starts a comment where a word would start, so `--color=#1a1b26` is fine
|
|
# but `--color #1a1b26` is not; quote it as '#1a1b26' if you need the latter.
|
|
|
|
# The bar. The layout is shared and lives under /usr/share, but the stylesheet
|
|
# has to be per-user: it imports a sibling theme.css holding the installed HyDE
|
|
# theme's palette, and a relative @import resolves against the importing file.
|
|
#
|
|
# The style path below is therefore absolute and contains a home directory.
|
|
# This file is not a shell, so `~` and `$HOME` are literal text here -- replace
|
|
# the path with your own if you are copying this template.
|
|
waybar -c /usr/share/hyprcosmic/waybar/config.jsonc -s /home/dingo/.config/hyprcosmic/waybar/style.css
|
|
|
|
# rofi is not a daemon. It is launched on demand by a keybinding, which COSMIC
|
|
# stores in com.system76.CosmicSettings.Shortcuts rather than here. Set those
|
|
# with `bind` lines in cosmic.conf and `cosmic-conf apply`; see config/cosmic.conf.
|
|
|
|
# Wallpaper. The hyprcosmic profile does not start cosmic-bg, so without this
|
|
# there is nothing drawing a background at all.
|
|
#
|
|
# HyDE calls this swww; upstream renamed it to awww at 0.12 and the Fedora
|
|
# package Obsoletes swww < 0.12.0. /usr/bin/swww is a shim that prints a
|
|
# deprecation warning and is documented as going away, so use the real name.
|
|
# Packaged in the alebastr/sway-extras COPR.
|
|
#
|
|
# The daemon only holds the surface -- it shows nothing until an image is set.
|
|
# Set one once with `awww img /path/to/wallpaper` and it is remembered.
|
|
awww-daemon
|