Thread: dwm patching
View Single Post
Old 28th April 2022
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
Join Date: Apr 2008
Location: NYC
Posts: 631

Several years later, I'm updating this because it is one of the first hits for dwm openbsd.

There is now a port for dwm-6.2, which is behind FreeBSD and most versions of Linux. I use the moveresize patch and just download a diff, called something like dwm-moveresize<date>.diff. I rename it to patch-moveresize and put in the patches directory. I then run make patch. Because (I think) the diff has things like a/config.def.h b/config.def it will ask file to patch, but it gives me the lines running up to that, so it's simple to type config.def.h and dwm.c when asked for the file name.
I then do as Brian says and
cd `make show=WRKDIST`
This lets me see the various files, including config.def.h which I can edit if I wish, or I can put in my already customized config.h.

Then (again) as Brian instructs) cd -;make install

Most people know all this stuff, but for newcomers who hit it on a web search I'll mention that if you already have a config.h you use and just want the moveresize patch for dwm.c, you can edit the diff file, remove the config.def.h stuff and also remove the a/ and b/ with the lines that have the a/dwm.c and b/dwm.c, and it then should not need to ask file to patch.

Again, this is *years* after this was last posted to, but again, I came upon it in a web search, so figured I might as well update it. I have a fairly simple page about it at

Just search for OpenBSD on the page and it briefly goes over Brian's instructions.
Reply With Quote