sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 13eb1dba57cafec1ba3a82792b722a21974ab506
parent d5e10bb77eca9542d99ca767b1e9aa1faccfb455
Author: Jack Bird <jack.bird@durham.ac.uk>
Date:   Wed,  4 Aug 2021 23:53:49 +0100

[dwm][patch][focusmaster] Uses lockfullscreen introduced in 138b405

Diffstat:
Adwm.suckless.org/patches/focusmaster/dwm-focusmaster-20210804-138b405.diff | 46++++++++++++++++++++++++++++++++++++++++++++++
Mdwm.suckless.org/patches/focusmaster/dwm-focusmaster-return-20210804-138b405.diff | 14++++++++------
2 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/dwm.suckless.org/patches/focusmaster/dwm-focusmaster-20210804-138b405.diff b/dwm.suckless.org/patches/focusmaster/dwm-focusmaster-20210804-138b405.diff @@ -0,0 +1,46 @@ +From 3e020d93df3aaec92d2daa142cd1f0d5301b3197 Mon Sep 17 00:00:00 2001 +From: Mateus Auler <mateusauler@protonmail.com> +Date: Fri, 17 Jul 2020 12:36:36 -0300 +Subject: [PATCH] Ability to map a key combination to switch focus to + the master window. + +--- + dwm.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/dwm.c b/dwm.c +index 9fd0286..be01927 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -235,6 +235,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 broken[] = "broken"; + static char stext[256]; +@@ -2150,3 +2152,17 @@ 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); ++} +-- +2.27.0 + diff --git a/dwm.suckless.org/patches/focusmaster/dwm-focusmaster-return-20210804-138b405.diff b/dwm.suckless.org/patches/focusmaster/dwm-focusmaster-return-20210804-138b405.diff @@ -1,14 +1,14 @@ -From 6c6a6cfaa73bfd24014df5c810cc78756ec325b4 Mon Sep 17 00:00:00 2001 +From db6a8931a55982b95ed24ef57c8b71a6a3dafab6 Mon Sep 17 00:00:00 2001 From: Jack Bird <jack.bird@durham.ac.uk> Date: Wed, 4 Aug 2021 20:27:23 +0100 Subject: [PATCH] Focus master and return supported over all tags --- - dwm.c | 37 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 37 insertions(+) + dwm.c | 39 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) diff --git a/dwm.c b/dwm.c -index 5e4d494..dcb98b4 100644 +index 5e4d494..ee28f28 100644 --- a/dwm.c +++ b/dwm.c @@ -127,6 +127,7 @@ struct Monitor { @@ -38,7 +38,7 @@ index 5e4d494..dcb98b4 100644 for (tc = &c->mon->clients; *tc && *tc != c; tc = &(*tc)->next); *tc = c->next; } -@@ -816,6 +822,32 @@ focusin(XEvent *e) +@@ -816,6 +822,34 @@ focusin(XEvent *e) setfocus(selmon->sel); } @@ -49,6 +49,8 @@ index 5e4d494..dcb98b4 100644 + + if (selmon->nmaster > 1) + return; ++ if (!selmon->sel || (selmon->sel->isfullscreen && lockfullscreen)) ++ return; + + master = nexttiled(selmon->clients); + @@ -71,7 +73,7 @@ index 5e4d494..dcb98b4 100644 void focusmon(const Arg *arg) { -@@ -1203,6 +1235,11 @@ nexttiled(Client *c) +@@ -1203,6 +1237,11 @@ nexttiled(Client *c) void pop(Client *c) {