pavtiger / my-dwm-desktop-enviroment

2 stars 0 forks source link

Fix dwm restart autostarting apps second time around #22

Open pavtiger opened 1 year ago

Goosegit11 commented 1 year ago

do you know how to fix it?

pavtiger commented 1 year ago

Sorry for responding with such a delay, I was very busy past week. In dwm, when you press restart code just runs execlp("dwm", "dwm", NULL) and executes the whole script again. So if you want to check if dwm is running the first time since the boot up, I don't see other ways than to create a file.tmp in .dwm/ directory that indicates, that apps have been already been executed and there's no need to do it again. And on boot up this file will be deleted. I can implement this feature if you need it, I have already written half of it. But do note, that this approach already sounds not up to suckless (community that created dwm) philosophy. In short: less features = more stable and safer