francma / wob

A lightweight overlay volume/backlight/progress/anything bar for Wayland.
ISC License
911 stars 50 forks source link

Exec doesn't run custom configuration #93

Closed joaonunatings closed 2 years ago

joaonunatings commented 2 years ago

Hi, I have the following lines in my sway config file:

set $WOBSOCK $XDG_RUNTIME_DIR/wob.sock
exec mkfifo $WOBSOCK && tail -f $WOBSOCK | wob -a bottom -H 20 -W 1920 -o 0 -b 0 -p 0 -t 1500 --overflow-mode nowrap

After reboot or start up, configuration seems to be the default one. When getting process information I get:

$ ps xa | grep wob
    923 ?        Ss     0:00 /usr/bin/wob
francma commented 2 years ago

What commands are you using to feed wob with values? What happens if you echo directly to $XDG_RUNTIME_DIR/wob.sock?

joaonunatings commented 2 years ago

echo "$(pamixer --get-volume) $wob_background $wob_border $wob_sink_bar" > $WOBSOCK

Where variables:

set $wob_background #C4C4C422
set $wob_border #FFFFFFFF
set $wob_sink_bar #5DADE2FF
set $wob_source_bar #86EDA8FF
set $wob_backlight_bar #D7DBDDFF

Echoing directly to $XDG_RUNTIME_DIR/wob.sock shows me default wob config.

francma commented 2 years ago

This is what i get when i run ps xa | grep wob with command line parameters.

 262393 pts/4    S+     0:00 wob -a bottom -H 20 -W 1920 -o 0 -b 0 -p 0 -t 1500 --overflow-mode nowrap

My guess is that you are starting wob multiple times in your config or something and only the first one runs because second call to mkfifo $WOBSOCK will fail if $WOBSOCK already exists.

joaonunatings commented 2 years ago

Ok then this problem may be related to how I launch sway. I'll try and dig into this problem, but thank you.