[dwm] Restart Patch - No more loops

A section for Window Manager configurations. If the WM doesn't exist yet, simply start a new thread.
Forum rules
Configurations, tips, questions and answers related to window managers only.
User avatar
stark
MILF
Posts: 521
Joined: Sat Sep 27, 2014 6:38 pm
Location: Arpanet
Contact:

[dwm] Restart Patch - No more loops

Unread post by stark » Thu Jan 15, 2015 4:26 pm

dwm-6.1-restart.diff at GitHub

NOTE: I have only tested this against dwm-6.1

Get the patch:

wget -q ow.ly/HndrO -O dwm-6.1-restart.diff

Hand Patch it.

Then add the following to your config.h ( inside static Key keys[], preferably above the actual quit keybinding )

Code: Select all

{ MODKEY|ShiftMask,             XK_r,      quit,           {1} },
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu

User avatar
Dr_Chroot
Alfalfa
Posts: 1100
Joined: Mon Jun 09, 2014 9:49 pm
Location: among the sagebrush
Contact:

Re: [dwm] Restart Patch - No more loops

Unread post by Dr_Chroot » Thu Jan 15, 2015 4:38 pm

^ He lives. 7 days... 7 long days since stark has posted... But thanks for the patch :D I just removed dwm from my older Arch install, dang it. I was thinking that I might eventually toss Slackware 14.1 on a 20GB partition; might play with dwm some on that, use the patch there :) It was always irritating to have to restart X.org if I wanted to restart dwm, though, so this will be fantastic!
Fight internet censorship.
EFF | Tor Project | Bitcoin

"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden

User avatar
stark
MILF
Posts: 521
Joined: Sat Sep 27, 2014 6:38 pm
Location: Arpanet
Contact:

Re: [dwm] Restart Patch - No more loops

Unread post by stark » Thu Jan 15, 2015 4:48 pm

Lol, I got caught up in work but I came by sometimes but didn't have anything interesting to post about so kept my troll fingers off the keyboard :)

And didn't you load dwm in a loop before ?

Code: Select all

#Start dwm in a loop ( a hack to restart dwm without closing X applications )
while true; do
	# Log stderror to a file 
	dwm 2> $HOME/.logs/dwm.log
	# No error logging
	#dwm >/dev/null 2>&1
done
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu

User avatar
Dr_Chroot
Alfalfa
Posts: 1100
Joined: Mon Jun 09, 2014 9:49 pm
Location: among the sagebrush
Contact:

Re: [dwm] Restart Patch - No more loops

Unread post by Dr_Chroot » Thu Jan 15, 2015 5:03 pm

stark wrote:Lol, I got caught up in work but I came by sometimes but didn't have anything interesting to post about so kept my troll fingers off the keyboard :)
Haha, that is fine. I should probably focus on my education a little more, as I have a lot on my plate. I didn't do so hot in the last semester, so I am trying to hit this one hard... I was originally doing three classes (12 credits here) as Biology was 6 credit and involved a lot of memorization, which is something I suck at. Nonetheless, yesterday I picked up a Tuesday/Saturday "Philosophy & Contemporary Ideas", as I thought that something of that nature would be a nice break in between memorizing the confounded protoplasmic reticulum junk :P I already regretted picking it up when I looked at the reading list this morning as I was walking to the library; at least I will get to read some more of my boy, Kierkegaard. (He would've made a decent punk rocker, that angsty SOB)

Edit: For clarification, I am doing this leg of general education online (although I am temporarily on a college campus in Florida, which provides me access to a nice library) so that flexibility is probably too... flexible. I spend far too much time on Spotify, Reddit, etc. I should probably go read through the GTD, Pomodoro thread again -_-
stark wrote:And didn't you load dwm in a loop before ?
You know, I am not exactly quite sure. I did that Arch install back in Sept. of 2013, so I am trying to remember what I had configured on that dwm. All I know is that I was unable to restart dwm if I made a change to the configs, at least unless I restarted X.org. Did I misunderstand the nature of your patch?
Fight internet censorship.
EFF | Tor Project | Bitcoin

"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden

User avatar
stark
MILF
Posts: 521
Joined: Sat Sep 27, 2014 6:38 pm
Location: Arpanet
Contact:

Re: [dwm] Restart Patch - No more loops

Unread post by stark » Thu Jan 15, 2015 5:43 pm

Looks like you're working very hard, atleast to me :) and at the same time having fun ;)

And this patch is not written by me at all! The author is unknown but its hosted by another author who has written a lot of great patches for dwm. Dwm doesn't provide any restart functionality, you'd either load it in a loop as mentioned in the Arch Wiki or write the function yourself or use someone else's patch. Back then you must have been using dwm-6.0 ( alot of people still use it as majority of the patches works with it ) there is a selfrestart patch for dwm-6.0 which is quite big compared to this one and is not posix compliant so i don't know if it will work under BSDs or other OS'es. This one will work with the latest commit of dwm so no need to use a loop or logging out of X :)
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu

Post Reply