I’m talking about this patch:

https://dwm.suckless.org/patches/autostart/

Now, the notes seem simple: after apply the patch, dwm will look for the autostart script in ~/.dwm/autostart.sh.

But if you read it carefully, the file is:

~/.dwm/autostart.sh &

Wth does a “&” have to do with file name? I tried to just use the normal file: autostart.sh with exec dunst. It doesnt work…

I tried to create in the Thunar this weird file name, “autostop.sh &”. The system does not recognize it as sh script anymore. .

Any help is welcome.

  • Ferk@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    6 days ago

    But, whichever command I put in autostart.sh will run as if I run in terminal with the & sign. E.g: dunst & to run in the background.

    Well, only if it’s one single command, if you have multiple commands inside of the script, they will still run sequentially (the next command will only run after the previous one completely closes) unless you add & to them as well.

    The difference is that dwm itself will not have to wait for the autostart.sh to complete before launching itself (thanks to it being run in the background with &)

    However, autostart_blocking.sh (which isn’t run with a &) will stop dwm from fully launching until the script completes… I guess this is useful if you need certain things to be set up before dwm actually starts… but it would potentially add a delay on dwm startup.