You are not logged in.

#1 2013-06-17 00:22:31

finh
Member
Registered: 2010-10-31
Posts: 22

DWM + useless gap patch not creating horizontal gaps

Can anyone give me a hand with the uselessgap patch? I'm using version 5.9 found here: dwm.suckless.org/patches/uselessgap.

I've applied it but it doesn't seem to be making any gaps horizontally. This is the only patch I've installed thus far. Here is what the patch is producing:


http://i.imgur.com/ltnGIxd.png



-- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --

Offline

#2 2013-06-17 04:10:11

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: DWM + useless gap patch not creating horizontal gaps

I haven't dealt with the problem myself, but I seem to remember this being a known DWM 6.0 issue that some folks sorted out in the DWM hackers thread.  You should find a link in there somewhere to a fix.

EDIT: Just saw that jwr left you a response in another DWM thread; don't think that either of us are brushing you aside.  DWM patching takes a little getting used to, but if you take the time to look around, you can usually find a fix to most issues online (expecially these forums). wink

Last edited by ANOKNUSA (2013-06-17 04:14:18)

Offline

#3 2013-06-17 09:21:35

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: DWM + useless gap patch not creating horizontal gaps

I have a working uselessgaps for 6.0: https://github.com/Unia/DWM/blob/master … sgaps.diff

Last edited by Unia (2013-06-17 09:21:54)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#4 2013-06-17 14:49:47

finh
Member
Registered: 2010-10-31
Posts: 22

Re: DWM + useless gap patch not creating horizontal gaps

Hi Unia, thanks for the response.

I tried your patch and I'm getting this error:

fin@maggot:~/dwm-6.0$ sudo patch -p1 < uselessgap.diff 
patching file dwm.c
Hunk #2 succeeded at 283 (offset -12 lines).
Hunk #3 succeeded at 477 (offset -12 lines).
Hunk #4 succeeded at 1351 (offset -55 lines).
Hunk #5 succeeded at 1718 with fuzz 2 (offset -68 lines).
Hunk #6 FAILED at 2237.
1 out of 6 hunks FAILED -- saving rejects to file dwm.c.rej

Offline

#5 2013-06-17 14:55:07

finh
Member
Registered: 2010-10-31
Posts: 22

Re: DWM + useless gap patch not creating horizontal gaps

ANOKNUSA wrote:

I haven't dealt with the problem myself, but I seem to remember this being a known DWM 6.0 issue that some folks sorted out in the DWM hackers thread.  You should find a link in there somewhere to a fix.

EDIT: Just saw that jwr left you a response in another DWM thread; don't think that either of us are brushing you aside.  DWM patching takes a little getting used to, but if you take the time to look around, you can usually find a fix to most issues online (expecially these forums). wink

A lot of the links in that thread relevant to my problem have 404d sad

Offline

#6 2013-06-17 14:56:46

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: DWM + useless gap patch not creating horizontal gaps

Why are you patching as sudo?

See this post to solve your problems: http://crunchbang.org/forums/viewtopic. … 12#p266212


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#7 2013-06-17 15:01:18

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: DWM + useless gap patch not creating horizontal gaps

One of the goals of the DWM devs is to keep DWM's base source code at  2000 single lines of code or fewer.  Anytime you see a patch in which lines are inserted or replaced beyond the 2000-line mark, the patch was probably built against a previously patched DWM configuration.

So Unia probably built that patch against the rest of his configuration; that is, he may have other patches to his config that were intended to be applied before that one, which would move the relevant code to a different point than where it exists in your dwm.c file.  Usually, if only one or two hunks fail in the patching process, you can just open the target file (dwm.c in this case), do a search to find the lines the patch file mentions, and insert or replace them manually, then try building DWM to see if it works properly.  Give that a shot; learning to patch DWM by hand is a good skill to practice, and since there are only a few characters in this case, it's as good a test case as any.

Offline

#8 2013-06-17 15:11:06

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: DWM + useless gap patch not creating horizontal gaps

Hm, most of the patches in the "Other patches"directory in my GitHub repo are diff'ed against a vanilla dwm.c; guess I missed this one tongue

The post I linked to explains detailed how to hand-patch DWM and create new a new patch etc.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#9 2013-06-17 15:24:37

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: DWM + useless gap patch not creating horizontal gaps

Unia wrote:

The post I linked to explains detailed how to hand-patch DWM and create new a new patch etc.

Ah, so it does. smile  Since you mentioned it in that Crunchbang post, I should probably run a git diff on my own config here. Having a back-up is probably a good idea.

Offline

Board footer

Powered by FluxBB