mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
Adding transferall patch
This commit is contained in:
parent
4ddfdab30e
commit
6de03c1735
@ -15,7 +15,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
|||||||
|
|
||||||
### Changelog:
|
### Changelog:
|
||||||
|
|
||||||
2020-02-02 - Added fsignal patch and moved dwmc signal settings to config.def.h
|
2020-02-02 - Added fsignal and transferall patches
|
||||||
|
|
||||||
2020-01-29 - Added swapfocus and shiftview patches
|
2020-01-29 - Added swapfocus and shiftview patches
|
||||||
|
|
||||||
@ -345,6 +345,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
|||||||
- [transfer](https://dwm.suckless.org/patches/transfer/)
|
- [transfer](https://dwm.suckless.org/patches/transfer/)
|
||||||
- lets you transfer the currently focused client between the master and stack area while increasing or decreasing the master area (nmaster) accordingly
|
- lets you transfer the currently focused client between the master and stack area while increasing or decreasing the master area (nmaster) accordingly
|
||||||
|
|
||||||
|
- [transferall](https://dwm.suckless.org/patches/transfer/)
|
||||||
|
- lets you transfer all clients between the master and stack area while increasing or decreasing the master area (nmaster) accordingly
|
||||||
|
|
||||||
- [unfloatvisible](https://dwm.suckless.org/patches/unfloatvisible/)
|
- [unfloatvisible](https://dwm.suckless.org/patches/unfloatvisible/)
|
||||||
- resets isfloating on any visible windows that have it set and optionally also applies a layout
|
- resets isfloating on any visible windows that have it set and optionally also applies a layout
|
||||||
|
|
||||||
|
@ -604,6 +604,9 @@ static Key keys[] = {
|
|||||||
#if TRANSFER_PATCH
|
#if TRANSFER_PATCH
|
||||||
{ MODKEY, XK_x, transfer, {0} },
|
{ MODKEY, XK_x, transfer, {0} },
|
||||||
#endif // TRANSFER_PATCH
|
#endif // TRANSFER_PATCH
|
||||||
|
#if TRANSFER_ALL_PATCH
|
||||||
|
{ MODKEY|ControlMask, XK_x, transferall, {0} },
|
||||||
|
#endif // TRANSFER_ALL_PATCH
|
||||||
{ MODKEY, XK_Return, zoom, {0} },
|
{ MODKEY, XK_Return, zoom, {0} },
|
||||||
#if VANITYGAPS_PATCH
|
#if VANITYGAPS_PATCH
|
||||||
{ MODKEY|Mod4Mask, XK_u, incrgaps, {.i = +1 } },
|
{ MODKEY|Mod4Mask, XK_u, incrgaps, {.i = +1 } },
|
||||||
|
@ -131,6 +131,9 @@
|
|||||||
#if TRANSFER_PATCH
|
#if TRANSFER_PATCH
|
||||||
#include "transfer.c"
|
#include "transfer.c"
|
||||||
#endif
|
#endif
|
||||||
|
#if TRANSFER_ALL_PATCH
|
||||||
|
#include "transferall.c"
|
||||||
|
#endif
|
||||||
#if UNFLOATVISIBLE_PATCH
|
#if UNFLOATVISIBLE_PATCH
|
||||||
#include "unfloatvisible.c"
|
#include "unfloatvisible.c"
|
||||||
#endif
|
#endif
|
||||||
|
@ -131,6 +131,9 @@
|
|||||||
#if TRANSFER_PATCH
|
#if TRANSFER_PATCH
|
||||||
#include "transfer.h"
|
#include "transfer.h"
|
||||||
#endif
|
#endif
|
||||||
|
#if TRANSFER_ALL_PATCH
|
||||||
|
#include "transferall.h"
|
||||||
|
#endif
|
||||||
#if UNFLOATVISIBLE_PATCH
|
#if UNFLOATVISIBLE_PATCH
|
||||||
#include "unfloatvisible.h"
|
#include "unfloatvisible.h"
|
||||||
#endif
|
#endif
|
||||||
|
25
patch/transferall.c
Normal file
25
patch/transferall.c
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
void
|
||||||
|
transferall(const Arg *arg)
|
||||||
|
{
|
||||||
|
Client *c, *n = selmon->clients, *attachfrom = NULL;
|
||||||
|
int i = 0, nstackclients = 0;
|
||||||
|
while (n) {
|
||||||
|
c = n;
|
||||||
|
n = c->next;
|
||||||
|
if (!ISVISIBLE(c) || c->isfloating) continue;
|
||||||
|
if (i >= selmon->nmaster) {
|
||||||
|
detach(c);
|
||||||
|
if (!attachfrom) {
|
||||||
|
attach(c);
|
||||||
|
} else {
|
||||||
|
c->next = attachfrom->next;
|
||||||
|
attachfrom->next = c;
|
||||||
|
}
|
||||||
|
attachfrom = c;
|
||||||
|
nstackclients++;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
selmon->nmaster = nstackclients;
|
||||||
|
arrange(selmon);
|
||||||
|
}
|
1
patch/transferall.h
Normal file
1
patch/transferall.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
static void transferall(const Arg *arg);
|
@ -538,6 +538,12 @@
|
|||||||
*/
|
*/
|
||||||
#define TRANSFER_PATCH 0
|
#define TRANSFER_PATCH 0
|
||||||
|
|
||||||
|
/* Lets you transfer all clients between the master and stack area
|
||||||
|
* while increasing or decreasing the master area (nmaster) accordingly.
|
||||||
|
* https://dwm.suckless.org/patches/transfer/
|
||||||
|
*/
|
||||||
|
#define TRANSFER_ALL_PATCH 0
|
||||||
|
|
||||||
/* This patch resets isfloating on any visible windows that have it set.
|
/* This patch resets isfloating on any visible windows that have it set.
|
||||||
* Optionally also applies a layout.
|
* Optionally also applies a layout.
|
||||||
* https://dwm.suckless.org/patches/unfloatvisible/
|
* https://dwm.suckless.org/patches/unfloatvisible/
|
||||||
|
Loading…
Reference in New Issue
Block a user