mirror of
https://github.com/outbackdingo/hyprcosmic-session.git
synced 2026-08-25 07:20:17 +00:00
1c3e3c3e53081dd5cbf1362d4069c924d48212d3
Two defects in the previous commit, both of which would have failed silently at the greeter rather than loudly at build time. `start_component` passes its whole string to `Process::with_executable`, which treats it as the program name. An autostart line like `waybar -c <path>` was therefore looked up as a binary literally called "waybar -c <path>", and the bar would simply never appear. The unit test asserting that "rofi -show drun" parses as one entry implied arguments worked; they did not. Extras are now split into argv and spawned through a `start_process` helper, which is upstream's `start_component` body with args threaded through -- `start_component` keeps its signature so no upstream call site changes. The splitter honours quoting, because config paths contain spaces, and treats `#` as a comment only where a word would start, so `--color=#1a1b26` survives. It expands nothing else: no variables, globs or command substitution, so a file that names programs cannot be escalated into running arbitrary shell. `start-hyprcosmic` also defaulted HYPRCOSMIC_SESSION_BIN to /usr/bin/cosmic-session -- the stock binary, which has no profile module. The session would have come up as ordinary COSMIC with the gating apparently doing nothing. It now points at /usr/libexec/hyprcosmic, so the fork installs alongside the packaged COSMIC instead of over it, a dnf update cannot clobber it, and the stock entry stays as the escape hatch. It fails loudly with a pointer back to that entry if the binary is missing. Verified: 9 unit tests, including a regression test for the argv defect and one asserting nothing is expanded; `cargo build -j1` clean.
Description
Fork of pop-os/cosmic-session for HyprCosmic: an autostart profile, a start-hyprcosmic entry point, and an install that leaves stock COSMIC intact
126 KiB
Languages
Rust
61.7%
Shell
28.9%
Just
5.7%
Nix
3.7%