[wiki] [sites] [dwm][patch][focusmaster] Uses lockfullscreen introduced in 138b405 || Jack Bird
commit 13eb1dba57cafec1ba3a82792b722a21974ab506
Author: Jack Bird <jack.bird_AT_durham.ac.uk>
Date: Wed Aug 4 23:53:49 2021 +0100
[dwm][patch][focusmaster] Uses lockfullscreen introduced in 138b405
diff --git a/dwm.suckless.org/patches/focusmaster/dwm-focusmaster-20210804-138b405.diff b/dwm.suckless.org/patches/focusmaster/dwm-focusmaster-20210804-138b405.diff
new file mode 100644
index 00000000..cc6dffab
--- /dev/null
+++ b/dwm.suckless.org/patches/focusmaster/dwm-focusmaster-20210804-138b405.diff
_AT_@ -0,0 +1,46 @@
+From 3e020d93df3aaec92d2daa142cd1f0d5301b3197 Mon Sep 17 00:00:00 2001
+From: Mateus Auler <mateusauler_AT_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
+_AT_@ -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];
+_AT_@ -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
index 85d1a6a8..47836050 100644
--- a/dwm.suckless.org/patches/focusmaster/dwm-focusmaster-return-20210804-138b405.diff
+++ b/dwm.suckless.org/patches/focusmaster/dwm-focusmaster-return-20210804-138b405.diff
_AT_@ -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_AT_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
_AT_@ -127,6 +127,7 @@ struct Monitor {
_AT_@ -38,7 +38,7 @@ index 5e4d494..dcb98b4 100644
for (tc = &c->mon->clients; *tc && *tc != c; tc = &(*tc)->next);
*tc = c->next;
}
-_AT_@ -816,6 +822,32 @@ focusin(XEvent *e)
+_AT_@ -816,6 +822,34 @@ focusin(XEvent *e)
setfocus(selmon->sel);
}
_AT_@ -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);
+
_AT_@ -71,7 +73,7 @@ index 5e4d494..dcb98b4 100644
void
focusmon(const Arg *arg)
{
-_AT_@ -1203,6 +1235,11 @@ nexttiled(Client *c)
+_AT_@ -1203,6 +1237,11 @@ nexttiled(Client *c)
void
pop(Client *c)
{
Received on Thu Aug 05 2021 - 00:56:58 CEST
This archive was generated by hypermail 2.3.0
: Thu Aug 05 2021 - 01:00:44 CEST