Closed kronikpillow closed 4 years ago
As for the keybindings, you just set these to whatever you want - it's part of customizing your setup. You can change these to what the original author intended if that helps, using q, a, z, x, or to change the modifier to MOD+Ctrl. You can't expect me to tailor dwm-flexipatch default keybinding to fit with your personal workflow just because you are unsure how to do this on your own.
If you have multiple things triggering on the same keybinding, then multiple things will happen at once, which can cause unexpected behaviour.
You may want to try disabling the systray. I don't know for sure, but my impression is that this inconsistently causes dwm to crash when starting applications that has a tray icon (especially after restarting dwm many times). The general recommendation, as far as I understand, is to use a standalone systray application like trayer or stalonetray.
I dunno how to start dwm with a crash log :D
You mentioned getting kicked back out to your login manager. There should be some output in your login manager's log files. How helpful these will be I'm not so sure.
sorry no disrespect intended but where did you get the idea that i dunno how to setup my own keybindings? I have a full my keybinding setup, I was just commenting/talking..
only thing I dunno is how to change the modifier for just the w+e+s+a+z keys, as I would want to keep mod+j and mod+k with MOD
and I sincerly doubt it's systray related as 1, there is nothing in my systray, and 2 Brave or Neomutt don't even use the systray
I guess one way to find out would be by elimination, disabling one patch after another until the issue is no longer reproducible.
where did you get the idea that i dunno how to setup my own keybindings?
Just judging from what you write sometimes :)
only thing I dunno is how to change the modifier for just the w+e+s+a+z keys, as I would want to keep mod+j and mod+k with MOD
So the patch author here decided to do something different here.
We have the following pre-processor definition:
#define STACKKEYS(MOD,ACTION) \
{ MOD, XK_j, ACTION##stack, {.i = INC(+1) } }, \
{ MOD, XK_k, ACTION##stack, {.i = INC(-1) } }, \
{ MOD, XK_s, ACTION##stack, {.i = PREVSEL } }, \
{ MOD, XK_w, ACTION##stack, {.i = 0 } }, \
{ MOD, XK_e, ACTION##stack, {.i = 1 } }, \
{ MOD, XK_a, ACTION##stack, {.i = 2 } }, \
{ MOD, XK_z, ACTION##stack, {.i = -1 } },
and where all the key bindings are all we have is:
STACKKEYS(MODKEY, focus)
STACKKEYS(MODKEY|ShiftMask, push)
So what is going on here? Well it looks like passing in MODKEY and focus here results in seven keybindings to be printed out. In practice this means that we'd end up with a list like this:
{ MODKEY, XK_j, focusstack, {.i = INC(+1) } },
{ MODKEY, XK_k, focusstack, {.i = INC(-1) } },
{ MODKEY, XK_s, focusstack, {.i = PREVSEL } },
{ MODKEY, XK_w, focusstack, {.i = 0 } },
{ MODKEY, XK_e, focusstack, {.i = 1 } },
{ MODKEY, XK_a, focusstack, {.i = 2 } },
{ MODKEY, XK_z, focusstack, {.i = -1 }
{ MODKEY|ShiftMask, XK_j, pushstack, {.i = INC(+1) } },
{ MODKEY|ShiftMask, XK_k, pushstack, {.i = INC(-1) } },
{ MODKEY|ShiftMask, XK_s, pushstack, {.i = PREVSEL } },
{ MODKEY|ShiftMask, XK_w, pushstack, {.i = 0 } },
{ MODKEY|ShiftMask, XK_e, pushstack, {.i = 1 } },
{ MODKEY|ShiftMask, XK_a, pushstack, {.i = 2 } },
{ MODKEY|ShiftMask, XK_z, pushstack, {.i = -1 } },
You could either just replace it by the above, or just remove the j and k actions from the definition and add those manually. The preprocessor definition here simply helps to ensure that all focusstack actions has the same modifier, and that the keys remain the same between focusstack and pushstack. As you see you'd have to change it in two places to make it consistent when writing it out in plain as above.
I have also seen dwm crash / kick you out sometimes when scrolling through the layouts before opening any windows, but I have only ever seen this when doing a lot of recompiling, exiting, and starting dwm. It is not consistent and I'm a bit at a loss as to what the cause might be.
well maybe I write stupid stuff according to you sometimes as I'm not a programmer, I'm a beginner, but I know how to hack configs pretty well, I have my own dwm build with most stuff I want in it, successfully manually patched on my own, but I'm far from able to edit the patches to fully do what I want them to do, while I fell in love wit your build as many things actually do exactly what I wanted them to do, or if they don't, you seem pretty compliant on making it possible :D
you misunderstood me ...
{ MODKEY|ShiftMask, XK_s, pushstack, {.i = PREVSEL } },
{ MODKEY|ShiftMask, XK_w, pushstack, {.i = 0 } },
{ MODKEY|ShiftMask, XK_e, pushstack, {.i = 1 } },
{ MODKEY|ShiftMask, XK_a, pushstack, {.i = 2 } },
{ MODKEY|ShiftMask, XK_z, pushstack, {.i = -1 } },
its this part that I was talking about that is probably the problem as I have other stuff bound to these keys, but I didn't notice that those keys actually do anything, or do they? i don't quite get what pushstack does
also I'v noticed when there are 5 windows, that you can only use 4 with the stack keys, w selects the master, e selects the 1st in stack, a selects the 2nd in stack, and if there is a 3rd/4th in stack, the Z key skips the 4th and jumps to 5th directly
You might want to have a read over the description on https://dwm.suckless.org/patches/stacker/ again.
With focusstack you have individual keybindings to focus on the first, second, third and last client. So when you click, e.g. MOD+a, then you'd focus on the third client (or the second client if you are using the original bindings that is listed on the above webpage).
With pushstack you may have, e.g., the master window selected, then you can "push" this to go into the third position (the rest then shifts upward, e.g. the second client becomes master, and the previous third client becomes the second client, if I have understood it correctly).
I guess you wouldn't see anything happening if you focus on the third client and then try to push it to the third position.
On the topic of pushing I personally find the zoomswap patch hard to live without.
also I'v noticed when there are 5 windows, that you can only use 4 with the stack keys, w selects the master, e selects the 1st in stack, a selects the 2nd in stack, and if there is a 3rd/4th in stack, the Z key skips the 4th and jumps to 5th directly
Yes, that's intended. If you think about it you'd need a separate keyboard shortcut to handle the fourth client as well. For example you could add shortcuts for the fourth and fifth client this way:
{ MODKEY|ShiftMask, XK_m, pushstack, {.i = 3 } },
{ MODKEY|ShiftMask, XK_n, pushstack, {.i = 4 } },
but obviously this is eating up a lot of keys that could be better used for something else. The z
key in this example is specifically for the last client in the list.
k, thanks for explaining and baring with me, yes I use zoomswap as well :)
I am using your default bindings for stacker, while on mod+shift+w I have bound to launch my browser, and on mod+shift+e I have bound to launch neomutt, and modshift+s I have bound to launch scratchpad, and mod+shift+a to launch alsamixer, in the last 24h when I wanted to launch one of them my dwm completely restarts on its own and gets me back to the login screen, but this doesn't happen every time, it's totally random I assume that it's because MOD + STACKKEY is a focus function MOD + SHIFT + STACKKEY is push function
and even thou the mod + w e s a z are not using the push function they seem to be automatically bound to the stack keys completely rendering the MOD+SHIFT+W/E/S/A/Z useless...
could a workaround for this be created? eg to be able to use mod+shift+w/e/s/a/z for other bindings while using mod+w+e+s+a+z for the stackkeys?
althou I would use e r s a z as default keybindings in the stacker patch, or e r a z x, as 99% of ppl will use mod+w for the browser :)
We could verify if this is what is causing the dwm restart issue, but I dunno how to start dwm with a crash log :D