Describe the bug
When building swaync with a custom prefix (e.g. --prefix=~/.local), swaync fails to start because the fallback paths for config.json and style.css in src/functions.vala are hardcoded to /usr/local/etc/xdg/swaync/.
This means meson install correctly installs the files to ~/.local/etc/xdg/swaync/, but swaync only searches /usr/local/etc/xdg/swaync/ as the fallback, so it can't find them.
This affects any installation with a non-default prefix, including:
- User-local installs:
--prefix=~/.local
- FreeBSD ports:
/usr/local
- NetBSD pkgsrc:
/usr/pkg
To Reproduce
meson setup --prefix=~/.local build
ninja -C build
meson install -C build
swaync
Output:
Starting SwayNotificationCenter version swaync 0.12.6 (git-1043ef9, branch 'main')
COULD NOT FIND CONFIG FILE! REINSTALL THE PACKAGE!
After creating ~/.config/swaync/config.json:
COULD NOT FIND CSS FILE! REINSTALL THE PACKAGE!
Expected behavior
swaync should find the system-level config and CSS files installed under the custom prefix.
Root cause
src/functions.vala lines 148 and 190 hardcode the fallback path:
paths += "/usr/local/etc/xdg/swaync/style.css";
paths += "/usr/local/etc/xdg/swaync/config.json";
These should use the meson build-time config_path instead.
Related: #4, #167, #168
Describe the bug
When building swaync with a custom prefix (e.g.
--prefix=~/.local), swaync fails to start because the fallback paths forconfig.jsonandstyle.cssinsrc/functions.valaare hardcoded to/usr/local/etc/xdg/swaync/.This means
meson installcorrectly installs the files to~/.local/etc/xdg/swaync/, but swaync only searches/usr/local/etc/xdg/swaync/as the fallback, so it can't find them.This affects any installation with a non-default prefix, including:
--prefix=~/.local/usr/local/usr/pkgTo Reproduce
meson setup --prefix=~/.local build ninja -C build meson install -C build swayncOutput:
After creating
~/.config/swaync/config.json:Expected behavior
swaync should find the system-level config and CSS files installed under the custom prefix.
Root cause
src/functions.valalines 148 and 190 hardcode the fallback path:These should use the meson build-time
config_pathinstead.Related: #4, #167, #168