mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
Adding focusmaster patch
This commit is contained in:
parent
10f4d513ec
commit
57e727b498
@ -276,6 +276,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
||||
- provides the ability to focus the tag on the immediate left or right of the currently focused tag
|
||||
- it also allows to send the focused window either on the left or the right tag
|
||||
|
||||
- [focusmaster](https://dwm.suckless.org/patches/focusmaster/)
|
||||
- a simple patch that just puts focus back to the master client
|
||||
|
||||
- [focusonclick](https://dwm.suckless.org/patches/focusonclick/)
|
||||
- this patch makes you switch focus only by mouse click and not sloppy (focus follows mouse pointer)
|
||||
|
||||
|
@ -895,6 +895,9 @@ static Key keys[] = {
|
||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||
{ MODKEY, XK_b, togglebar, {0} },
|
||||
#if FOCUSMASTER_PATCH
|
||||
{ MODKEY|ControlMask, XK_space, focusmaster, {0} },
|
||||
#endif // FOCUSMASTER_PATCH
|
||||
#if STACKER_PATCH
|
||||
STACKKEYS(MODKEY, focus)
|
||||
STACKKEYS(MODKEY|ShiftMask, push)
|
||||
|
13
patch/focusmaster.c
Normal file
13
patch/focusmaster.c
Normal file
@ -0,0 +1,13 @@
|
||||
void
|
||||
focusmaster(const Arg *arg)
|
||||
{
|
||||
Client *c;
|
||||
|
||||
if (selmon->nmaster < 1)
|
||||
return;
|
||||
|
||||
c = nexttiled(selmon->clients);
|
||||
|
||||
if (c)
|
||||
focus(c);
|
||||
}
|
1
patch/focusmaster.h
Normal file
1
patch/focusmaster.h
Normal file
@ -0,0 +1 @@
|
||||
static void focusmaster(const Arg *arg);
|
@ -105,6 +105,9 @@
|
||||
#if FOCUSADJACENTTAG_PATCH
|
||||
#include "focusadjacenttag.c"
|
||||
#endif
|
||||
#if FOCUSMASTER_PATCH
|
||||
#include "focusmaster.c"
|
||||
#endif
|
||||
#if FOCUSURGENT_PATCH
|
||||
#include "focusurgent.c"
|
||||
#endif
|
||||
|
@ -105,6 +105,9 @@
|
||||
#if FOCUSADJACENTTAG_PATCH
|
||||
#include "focusadjacenttag.h"
|
||||
#endif
|
||||
#if FOCUSMASTER_PATCH
|
||||
#include "focusmaster.h"
|
||||
#endif
|
||||
#if FOCUSURGENT_PATCH
|
||||
#include "focusurgent.h"
|
||||
#endif
|
||||
|
@ -429,6 +429,11 @@
|
||||
*/
|
||||
#define FOCUSADJACENTTAG_PATCH 0
|
||||
|
||||
/* A simple patch that just puts focus back to the master client.
|
||||
* https://dwm.suckless.org/patches/focusmaster/
|
||||
*/
|
||||
#define FOCUSMASTER_PATCH 0
|
||||
|
||||
/* Switch focus only by mouse click and not sloppy (focus follows mouse pointer).
|
||||
* https://dwm.suckless.org/patches/focusonclick/
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user