You are not logged in.

#26 2013-05-19 14:42:19

grobar87
Member
From: Македонија
Registered: 2010-08-25
Posts: 172

Re: [SOLVED]Need help with dwm...

Unia wrote:

No, you're not doing anything wrong. Let me explain:

Patches made by people are usually patched against a clean, vanilla dwm.c. This means that when you want to apply multiple patches, you will have to adapt those that will be patched against a non-vanilla dwm.c. To do so you can first apply patch A, then hand-patch patch B and create a new .diff file which will be patch B, made to be patched against a dwm.c which was patched with patch A. Savvy? tongue

That's why you see my patches are numbered. It's a queue. The systray patch is the fourth, which means it was patched against XFT, pertag2 and uselessgaps. Because you don't use those, it can't find the code it should edit. That's why it's failing. To fix this, first patch a vanilla dwm.c with XFT and then hand-patch the systray in:

1. Patch vanilla dwm.c with XFT;
2. Open the systray patch in an editor and also open the just patched dwm.c;
3. Search for the lines to replace that are listed in the systray patch and apply these changes to the patched dwm.c;
4. When done, create a new .diff file of the systray patch that's patched against the XFT patched dwm.c:

diff -u <hand-patched dwm.c> <xft-patched dwm.c> >> 02-dwm-6.0-systray.diff

Hi again smile I decide to try again with patching dwm. So far:
1. Done
2. Done
3. Ok i find the lines and applied them to xft patched dwm.c, but should i remove the "+" and "-" sings or i just leave them? And when i'm done.. i just save xft patched  dwm.c or...?
Sorry for bad english and thanks again smile


And... here... we... go!

Offline

#27 2013-05-19 15:40:10

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: [SOLVED]Need help with dwm...

First, step 4 from Unia's list is optional.  Once you do #3 you should be able to compile a version with just the bits you want.  The advantage of #4 is that it is easier to repeate this later on a new install, and you can then share your work with others who have the same goals as you.

Now, for your question: the + and - signs are part of the diff-file format.  The pluses are lines that should be added to dwm.c, the minus are lines already in the original that should be removed.  Lines without pluses or minuses are just context lines to figure out where this is supposed to go; do not add the context lines to dwm.c, they're already there.

Also, a patch has lines that (I think) begin with an @.  These are also just instructions on which file to patch and an estimate of which line number to start at.

Lastly, when done, yes, save it as dwm.c.  You are just editing the original dwm.c, right?

Last edited by Trilby (2013-05-19 15:41:26)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#28 2013-05-22 17:33:54

grobar87
Member
From: Македонија
Registered: 2010-08-25
Posts: 172

Re: [SOLVED]Need help with dwm...

Thanks Trilby! One more question: When i done editing dwm.c i save it, but when i run "make clean install" i got some errors.. Do i need to run "patch < systray.diff" after editing dwm.c or just "make clean install"?


And... here... we... go!

Offline

#29 2013-05-22 18:07:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: [SOLVED]Need help with dwm...

The systray.diff is what you applied manually right?  So you should not / could not apply it again.  You did it manually because patch could do it automatically.

You shouldn't try to install untill it builds properly - just use `make`.

As far as the errors, you'd need to say what they are.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#30 2013-06-01 13:48:39

grobar87
Member
From: Македонија
Registered: 2010-08-25
Posts: 172

Re: [SOLVED]Need help with dwm...

I finally successfully applied patch to dwm big_smile Well i still can't apply systray patch,but i can apply any other patch.I will try systray patch later again i think i miss some code line or something.Big thanks for Trilby and Unia! I will mark this solved.


And... here... we... go!

Offline

Board footer

Powered by FluxBB