About configuring slstatus in DWM

Just installed suckless’s DWM on arch, then I installed slstatus for viewing my system stats but I just can’t figure out a way to run it as a background process and make it launch at startup. I’ve tried putting exec slstatus in my .xinitrc but it just doesn’t work. please guide me through this, I’ve spent hours configuring it but can’t make it work :frowning:

If DWM supports running commands at launch, you may try something like this:

slstatus &&

so I followed this https://wiki.archlinux.org/title/Dwm#Statusbar_configuration and did this:
First I created the


file and
pasted this as its contents

# Statusbar loop
while true; do
   xsetroot -name "$( date +"%F %R" )"
   sleep 1m    # Update time every minute
done &

# Autostart section 
exec slstatus &
exec dwm

then I went to the directory where I cloned the slstatus repo and did

sudo make clean install

slstatus is working file now. thanks.

But one thing is bothering me, I have sddm installed as my display manager and when I try to login in the very first time it somehow resembles the same login color theme as my wallpaper and so I tried to fix it by placing

nitrogen --restore &

in my


but it didn’t work, please shed some light on this

Autostart did not work for me neither when I tried dwm last time. I made a thread and got useful infos to create my own autostart script. Perhaps this might help you. It’s easier like that. I also have a couple of command to add brightness button support etc on laptops. Took a while to figure out.

1 Like