Closed dkwo closed 1 year ago
@dm1tz @jedugsem maybe you can help?
let me add that this also happens on glibc, not just musl
built with
# Template file for 'sandbar'
pkgname=sandbar
version=0.1
revision=1
hostmakedepends="pkg-config"
makedepends="wayland-protocols pixman-devel fcft-devel wayland-devel"
short_desc="Dwm-like bar for the river wayland compositor"
license="GPL-3.0-or-later"
homepage="https://github.com/kolunmi/sandbar"
_commit_hash="95258a9c074f89387505a39bff9b1f2ea03f58e3"
distfiles="https://github.com/kolunmi/sandbar/archive/${_commit_hash}.tar.gz"
checksum=96c458e79cb1d892c29815951d86a01662361c4a1d9ff19c49f2149b37db241f
do_install() {
make install
vbin sandbar
}
Hello @dkwo! I apologize for the late response. I personally use this script:
FIFO="$XDG_RUNTIME_DIR/sandbar-0"
[ -e "$FIFO" ] && rm -f "$FIFO"
mkfifo "$FIFO"
while cat "$FIFO"; do :; done | sandbar
You can then write to the fifo.
Also I'm 99% sure the warning is not an problem, but I will look into it. Thank you!
this works, thanks a lot!
seems almost an irrelevant issue left, thanks again for helping
@kolunmi While this script works fine, it does hang around after river is closed, at least if I run it via riverctl spawn
. Do you know a way around this? ideally, when I exit river, the script should terminate, and the sandbar-0 fifo be erased.
This (however hacky :), seems to do the job:
while [ -e "${XDG_RUNTIME_DIR}/wayland-1" ] && cat "${FIFO}"; do :; done | sandbar &
actually, i take it back, there seems to be no reliable way to make sure there's no process hanging around. Hence it would be desirable to implement the fifo from within sandbar.
What is the recommended way to print to the bar from a script? I've seen scripts using
mkfifo
but this does work for me: I can use the
sandbar
command (both in river and in the terminal (foot)), but not redirect stdin. I'm on musl, building from latest git.Btw, I noticed the warning
Thanks for this project. It'd be great if you can tag a release, so it can be packaged.