dwm

Suckless' dwm with my personal patches
git clone https://git.instinctive.eu/dwm.git
Log | Files | Refs | README | LICENSE

commit fc755b8d06a9a6457f73093bee7633e5dfd8459e
parent 3e4b9c77eb269277a443ac8197b663e79e265f7b
Author: Natasha Kerensikova <natacha@instinctive.eu>
Date:   Sat, 20 May 2023 17:13:26 +0200

[patch] dwm-focusmaster-20210804-138b405.diff

Diffstat:
Mdwm.c | 18++++++++++++++++++
1 file changed, 18 insertions(+), 0 deletions(-)

diff --git a/dwm.c b/dwm.c @@ -238,6 +238,8 @@ static int xerrordummy(Display *dpy, XErrorEvent *ee); static int xerrorstart(Display *dpy, XErrorEvent *ee); static void zoom(const Arg *arg); +static void focusmaster(const Arg *arg); + /* variables */ static const char autostartblocksh[] = "autostart_blocking.sh"; static const char autostartsh[] = "autostart.sh"; @@ -2340,3 +2342,19 @@ main(int argc, char *argv[]) XCloseDisplay(dpy); return EXIT_SUCCESS; } + +void +focusmaster(const Arg *arg) +{ + Client *c; + + if (selmon->nmaster < 1) + return; + if (!selmon->sel || (selmon->sel->isfullscreen && lockfullscreen)) + return; + + c = nexttiled(selmon->clients); + + if (c) + focus(c); +}