Closed jbeich closed 3 years ago
The package looks in a few directories for the style.css file.
https://github.com/ErikReider/SwayNotificationCenter/blob/bf44de97a7342616d4ebd8ae5313bb5077fc3208/src/functions.vala#L28-L33
When running meson install
, you'll need to run it as root to copy the CSS file into /etc/xdg/swaync
. If you're running arch, there's now a package in the AUR š
I've packaged slightly older snapshot for FreeBSD where default prefix is /usr/local
. On NetBSD default prefix is /usr/pkg
.
Obviously, packages are not supposed to install outside of prefix because there's no guarantee to have write access there.
Sorry if I've misunderstood this but won't any of those paths work? I'm sadly not that familiar with Free/NetBSD so excuse my ignorance š
@jbeich Was this what you meant? f344600056879aca0368c18c45634e73fc1ae9ae
Better than what I had in mind but also with bugs:
sysconfdir + '/xdg/swaync'
should probably be join_paths(sysconfdir, 'xdg/swaync')
HOME
due to nesting get_system_config_dirs
in get_user_config_dir
/etc
before <prefix>/etc
but /etc
may have a stale config, so should be skipped or last$ cd /tmp
$ ls /tmp/test/**/*.css
/tmp/test/etc/xdg/swaync/style.css
$ truss /tmp/test/bin/swaync |& fgrep style.css
fstatat(AT_FDCWD,"/home/foo/.config/swaync/style.css",0x7fffffffcc60,AT_SYMLINK_NOFOLLOW) ERR#2 'No such file or directory'
fstatat(AT_FDCWD,"/tmp/~/.config/swaync/style.css",0x7fffffffcc60,AT_SYMLINK_NOFOLLOW) ERR#2 'No such file or directory'
fstatat(AT_FDCWD,"/etc/xdg/swaync/style.css",0x7fffffffcc60,AT_SYMLINK_NOFOLLOW) ERR#2 'No such file or directory'
fstatat(AT_FDCWD,"/usr/local/etc/xdg/swaync/style.css",0x7fffffffcc60,AT_SYMLINK_NOFOLLOW) ERR#2 'No such file or directory'
fstatat(AT_FDCWD,"/etc/xdg/swaync/style.css",0x7fffffffcc60,AT_SYMLINK_NOFOLLOW) ERR#2 'No such file or directory'
fstatat(AT_FDCWD,"/tmp/src/style.css",0x7fffffffcc60,AT_SYMLINK_NOFOLLOW) ERR#2 'No such file or directory'
I fixed some of your concerns 9fe929756666dc28cc5aeccf5dfbef0876f75a4c, e9b8146e881f690abb81d5ef5bd7f940d5995e00
āÆ meson setup --prefix=/tmp/test /tmp/swaync_build
āÆ meson install -C /tmp/swaync_build
ninja: Entering directory `/tmp/swaync_build'
[15/15] Linking target src/swaync
Installing src/swaync to /tmp/test/bin
Installing src/swaync-client to /tmp/test/bin
Installing /home/erikreider/GitHub/SwayNotificationCenter/src/style.css to /tmp/test/etc/xdg/swaync
How would you go about finding the style.css in /tmp/test/etc/xdg/swaync
? š¤
Thanks. Works fine now.
How would you go about finding the style.css in
/tmp/test/etc/xdg/swaync
? š¤
Outside of scope for this project. By installing glib under /tmp/test
and patching what get_system_config_dirs
returns e.g.,
$ LD_LIBRARY_PATH=/tmp/test/lib truss /tmp/test/bin/swaync |& fgrep style.css
fstatat(AT_FDCWD,"/home/foo/.config/swaync/style.css",0x7fffffffcc30,AT_SYMLINK_NOFOLLOW) ERR#2 'No such file or directory'
fstatat(AT_FDCWD,"/tmp/test/etc/xdg/swaync/style.css",{ mode=-rw-r--r-- ,inode=1735721,size=1299,blksize=4096 },AT_SYMLINK_NOFOLLOW) = 0 (0x0)
openat(AT_FDCWD,"/tmp/test/etc/xdg/swaync/style.css",O_RDONLY,00) = 19 (0x13)
18a7dee02eed defined
sysconfdir
but forgot to replace/etc
and propagate it to C consumer.