


Thanks! That does work and dwm compiles fine. However, is this going to be an issue for other patches as well?fedeliallalinea wrote: Try this patch, it works for 6.3 version.


Probably yes, but you should test it.alecStewart1 wrote:Thanks! That does work and dwm compiles fine. However, is this going to be an issue for other patches as well?
...
Is there going to be a lot of tinker with just patches before I can tinker with dwm?

Fair enough, but I think I've found one of those things that I stubbornly want to get to work and refuse to give up, lol.fedeliallalinea wrote:Probably yes, but you should test it.alecStewart1 wrote:Thanks! That does work and dwm compiles fine. However, is this going to be an issue for other patches as well?
...
Is there going to be a lot of tinker with just patches before I can tinker with dwm?
That's one of the reasons I chose a wm that had what I needed without having to waste time with patches.
I'm finding that sometimes it's not hard to update patches and a total pain other times. I'm running into this problem now with the shift-tools patch.NeddySeagoon wrote: Try the patches and see.
Portage will tell you if they fail to apply.
Code: Select all
* Applying 06-shift-tools.diff ...
patching file config.def.h
patch: **** malformed patch at line 29: };
[ !! ]
* ERROR: x11-wm/dwm-6.3::gentoo failed (prepare phase):
* patch -p1 failed with /etc/portage/patches/x11-wm/dwm/06-shift-tools.diff
Code: Select all
--- a/config.def.h 2022-11-07 15:48:11.352474594 -0600
+++ b/config.def.h 2022-11-07 15:52:52.046649301 -0600
@@ -93,2 +93,2 @@
{ "mfact", FLOAT, &mfact },
};
+#include "shift-tools.c"
+
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
+ { MODKEY, XK_o, shiftviewclients, { .i = +1 } },
+ { MODKEY|ShiftMask, XK_o, shiftview, { .i = +1 } },
+ { MODKEY|ShiftMask, XK_i, shiftview, { .i = -1 } },
+ { MODKEY, XK_i, shiftviewclients, { .i = -1 } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
@@ -104,6 +110,10 @@
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
+ { MODKEY|ShiftMask, XK_h, shiftboth, { .i = -1 } },
+ { MODKEY|ControlMask, XK_h, shiftswaptags, { .i = -1 } },
+ { MODKEY|ControlMask, XK_l, shiftswaptags, { .i = +1 } },
+ { MODKEY|ShiftMask, XK_l, shiftboth, { .i = +1 } },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_q, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },

Code: Select all
@@ -93,2 +93,2 @@
{ "mfact", FLOAT, &mfact },
};
+#include "shift-tools.c"
+
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
+ { MODKEY, XK_o, shiftviewclients, { .i = +1 } },
+ { MODKEY|ShiftMask, XK_o, shiftview, { .i = +1 } },
+ { MODKEY|ShiftMask, XK_i, shiftview, { .i = -1 } },
+ { MODKEY, XK_i, shiftviewclients, { .i = -1 } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } }, Code: Select all
@@ -93,2 +93,2 @@Code: Select all
The next hunk @@ -104,6 +110,10 @@
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
+ { MODKEY|ShiftMask, XK_h, shiftboth, { .i = -1 } },
+ { MODKEY|ControlMask, XK_h, shiftswaptags, { .i = -1 } },
+ { MODKEY|ControlMask, XK_l, shiftswaptags, { .i = +1 } },
+ { MODKEY|ShiftMask, XK_l, shiftboth, { .i = +1 } },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_q, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },Code: Select all
@@ -104,6 +110,10 @@Code: Select all
@@ -93,2 +93,2 @@

This is a good idea!alecStewart1 wrote:Just as a note, fedeliallalinea, that patch for vanitygaps seems to work for 6.4 as well. I'll try to remember to post a link to a repo of the updated patches here, in case anyone else comes across this in in the future.

Hi,Hammett wrote:If you want to apply several patches, some might fail because a previous patch has modified the file current patch is trying to modify...
I have gone through this myself and the approach I took was to download dwm source and apply the patches manually, fixing the errors on each patch. Then I renamed the patches to be applied in the correct order and moved those to /etc/portage/patches
If you're curious, I made a git repo for my dwm build... https://github.com/DasHammett/dwm
Not sure if it would build, but you will get an idea of how I did it.

NeddySeagoon wrote:I'm not a witch, I'm a retired electronics engineer
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though
Without more detail, it is hard for us to determine whether you did this correctly.jb1277976_ wrote:I'm having this same error i apply a patch i know works and its fine. but when i try another patch it fails.
Yes, you need to keep active all the patches that you want to be active.jb1277976_ wrote:i'm wondering if i have to keep the previous patch in place and the emerge ?
I would use a project that has mastered the use of a configure system to enable and disable features via a dedicated configure phase, without resorting to source code patches for every commonly used feature.jb1277976_ wrote:if i download the source and patch its easy i just copy paste and re-compile and everything works. What would you do in this situation ?

When downloading dwm directly from suckless and apply patchces everything works fine.Hu wrote:Without more detail, it is hard for us to determine whether you did this correctly.jb1277976_ wrote:I'm having this same error i apply a patch i know works and its fine. but when i try another patch it fails.Yes, you need to keep active all the patches that you want to be active.jb1277976_ wrote:i'm wondering if i have to keep the previous patch in place and the emerge ?I would use a project that has mastered the use of a configure system to enable and disable features via a dedicated configure phase, without resorting to source code patches for every commonly used feature.jb1277976_ wrote:if i download the source and patch its easy i just copy paste and re-compile and everything works. What would you do in this situation ?
