mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
Adding switchcol patch
This commit is contained in:
parent
40000bba1c
commit
853c64fbb7
@ -13,7 +13,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
|||||||
|
|
||||||
### Changelog:
|
### Changelog:
|
||||||
|
|
||||||
2019-10-03 - Added onlyquitonempty patch
|
2019-10-03 - Added onlyquitonempty and switchcol patches
|
||||||
|
|
||||||
2019-10-02 - Added restartsig, emptyview, focusurgent and focusadjacenttag patches
|
2019-10-02 - Added restartsig, emptyview, focusurgent and focusadjacenttag patches
|
||||||
|
|
||||||
@ -173,6 +173,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
|||||||
- [sticky](https://dwm.suckless.org/patches/sticky/)
|
- [sticky](https://dwm.suckless.org/patches/sticky/)
|
||||||
- adds toggleable keyboard shortcut to make a client 'sticky', i.e. visible on all tags
|
- adds toggleable keyboard shortcut to make a client 'sticky', i.e. visible on all tags
|
||||||
|
|
||||||
|
- [switchcol](https://dwm.suckless.org/patches/switchcol/)
|
||||||
|
- allows you to switch focus between the master and stack columns using a single keybinding
|
||||||
|
|
||||||
- [switchtag](https://github.com/bakkeby/dwm-vanitygaps/blob/master/patches/dwm-switchtag-6.2.diff)
|
- [switchtag](https://github.com/bakkeby/dwm-vanitygaps/blob/master/patches/dwm-switchtag-6.2.diff)
|
||||||
- when an application opens on a specific tab this patch adds the option to also switch to that tag when the application starts
|
- when an application opens on a specific tab this patch adds the option to also switch to that tag when the application starts
|
||||||
|
|
||||||
|
@ -86,6 +86,10 @@
|
|||||||
#include "systray.c"
|
#include "systray.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if SWITCHCOL_PATCH
|
||||||
|
#include "switchcol.c"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if TAGALLMON_PATCH
|
#if TAGALLMON_PATCH
|
||||||
#include "tagallmon.c"
|
#include "tagallmon.c"
|
||||||
#endif
|
#endif
|
||||||
|
@ -86,6 +86,10 @@
|
|||||||
#include "systray.h"
|
#include "systray.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if SWITCHCOL_PATCH
|
||||||
|
#include "switchcol.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if TAGALLMON_PATCH
|
#if TAGALLMON_PATCH
|
||||||
#include "tagallmon.h"
|
#include "tagallmon.h"
|
||||||
#endif
|
#endif
|
||||||
|
28
patch/switchcol.c
Normal file
28
patch/switchcol.c
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
void
|
||||||
|
switchcol(const Arg *arg)
|
||||||
|
{
|
||||||
|
Client *c, *t;
|
||||||
|
int col = 0;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (!selmon->sel)
|
||||||
|
return;
|
||||||
|
for (i = 0, c = nexttiled(selmon->clients); c ;
|
||||||
|
c = nexttiled(c->next), i++) {
|
||||||
|
if (c == selmon->sel)
|
||||||
|
col = (i + 1) > selmon->nmaster;
|
||||||
|
}
|
||||||
|
if (i <= selmon->nmaster)
|
||||||
|
return;
|
||||||
|
for (c = selmon->stack; c; c = c->snext) {
|
||||||
|
if (!ISVISIBLE(c))
|
||||||
|
continue;
|
||||||
|
for (i = 0, t = nexttiled(selmon->clients); t && t != c;
|
||||||
|
t = nexttiled(t->next), i++);
|
||||||
|
if (t && (i + 1 > selmon->nmaster) != col) {
|
||||||
|
focus(c);
|
||||||
|
restack(selmon);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1
patch/switchcol.h
Normal file
1
patch/switchcol.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
static void switchcol(const Arg *arg);
|
@ -276,6 +276,11 @@
|
|||||||
*/
|
*/
|
||||||
#define SYSTRAY_PATCH 0
|
#define SYSTRAY_PATCH 0
|
||||||
|
|
||||||
|
/* Switch focus between the master and stack columns using a single keybinding.
|
||||||
|
* https://dwm.suckless.org/patches/switchcol/
|
||||||
|
*/
|
||||||
|
#define SWITCHCOL_PATCH 0
|
||||||
|
|
||||||
/* By default dwm allow you to set application specific rules so that you can have your browser,
|
/* By default dwm allow you to set application specific rules so that you can have your browser,
|
||||||
* for example, start up on tag 9 optionally on a given monitor when you open your browser it is
|
* for example, start up on tag 9 optionally on a given monitor when you open your browser it is
|
||||||
* then automatically moved to the configured tag, but you have to manually enable the tag to see
|
* then automatically moved to the configured tag, but you have to manually enable the tag to see
|
||||||
@ -284,7 +289,7 @@
|
|||||||
* 0 is default behaviour
|
* 0 is default behaviour
|
||||||
* 1 automatically moves you to the tag of the newly opened application and
|
* 1 automatically moves you to the tag of the newly opened application and
|
||||||
* 2 enables the tag of the newly opened application in addition to your existing enabled tags
|
* 2 enables the tag of the newly opened application in addition to your existing enabled tags
|
||||||
|
*
|
||||||
* https://github.com/bakkeby/dwm-vanitygaps/blob/master/patches/dwm-switchtag-6.2.diff
|
* https://github.com/bakkeby/dwm-vanitygaps/blob/master/patches/dwm-switchtag-6.2.diff
|
||||||
*/
|
*/
|
||||||
#define SWITCHTAG_PATCH 0
|
#define SWITCHTAG_PATCH 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user