slstatus, dwlb, dwl

I’ve been trying to do this for the last few hours to no avail.

I can’t start dwlb via dwl’s autostart patch, as it doesn’t work properly that way for some reason (current workspace isn’t highlighted, window title doesn’t appear etc.), so I have to do dwl -s 'dwlb' to start it.

I edited this script for it to use slstatus instead of someblocks, but it doesn’t work either as in dwlb doesn’t even start (I tried using both the autostart patch and the -s flag):

#!/bin/sh

dwlb &
sleep 0.1
slstatus -s | dwlb -status-stdin all

Directly using the command dwl -s 'dwlb && slstatus -s | dwlb -status-stdin all' did actually work once, but stopped working for some reason after that (I didn’t recompile anything, I just rebooted and it stopped working. dwlb does start but the status bar doesn’t work.).

Any help is greatly appreciated.

  • cacti@ani.socialOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 hours ago

    Not sure why, but the solution was to start slstatus first in the script:

    #!/bin/bash
    
    slstatus -s | dwlb -status-stdin all &
    dwlb
    

    And then start dwl with dwl -s script.sh.