[wiki] [sites] [dwm][patch] Add to viewontag patch: prevent following window to "all" tag. || Marco Fleres

From: <git_AT_suckless.org>
Date: Sat, 13 Mar 2021 03:03:48 +0100

commit f4c1c57acc78508fd7c547384a8dd5b45c3f9f49
Author: Marco Fleres <mafleres_AT_gmail.com>
Date: Fri Mar 12 22:53:09 2021 -0300

    [dwm][patch] Add to viewontag patch: prevent following window to "all" tag.
    
    Modifies patch viewontag so that tagging a window on all tags does not
    enable all of them. There is no need to follow a window that would still be
    visible anyways.

diff --git a/dwm.suckless.org/patches/viewontag/dwm-viewontag-20210312-61bb8b2.diff b/dwm.suckless.org/patches/viewontag/dwm-viewontag-20210312-61bb8b2.diff
new file mode 100644
index 00000000..a8c09f57
--- /dev/null
+++ b/dwm.suckless.org/patches/viewontag/dwm-viewontag-20210312-61bb8b2.diff
_AT_@ -0,0 +1,39 @@
+From 03d3c172ff736cb80e12f7bb7cab4e1f250af9dd Mon Sep 17 00:00:00 2001
+From: Marco Fleres <mafleres_AT_gmail.com>
+Date: Fri, 12 Mar 2021 22:25:53 -0300
+Subject: [PATCH] Modification on viewontag patch: windows will not be followed
+ to the "all" tag
+
+---
+ config.def.h | 1 +
+ dwm.c | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/config.def.h b/config.def.h
+index 1c0b587..d7dfb6d 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -5,6 +5,7 @@ static const unsigned int borderpx = 1; /* border pixel of windows */
+ static const unsigned int snap = 32; /* snap pixel */
+ static const int showbar = 1; /* 0 means no bar */
+ static const int topbar = 1; /* 0 means bottom bar */
++static const Bool viewontag = True; /* Switch view on tag switch */
+ static const char *fonts[] = { "monospace:size=10" };
+ static const char dmenufont[] = "monospace:size=10";
+ static const char col_gray1[] = "#222222";
+diff --git a/dwm.c b/dwm.c
+index 664c527..8ca2f98 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -1660,6 +1660,8 @@ tag(const Arg *arg)
+ selmon->sel->tags = arg->ui & TAGMASK;
+ focus(NULL);
+ arrange(selmon);
++ if(viewontag && ((arg->ui & TAGMASK) != TAGMASK))
++ view(arg);
+ }
+ }
+
+--
+2.30.1
+
diff --git a/dwm.suckless.org/patches/viewontag/index.md b/dwm.suckless.org/patches/viewontag/index.md
index 6d7d3d3a..14f2ecb1 100644
--- a/dwm.suckless.org/patches/viewontag/index.md
+++ b/dwm.suckless.org/patches/viewontag/index.md
_AT_@ -3,13 +3,17 @@ viewontag
 
 Description
 -----------
-Follow a window to the tag it is being moved to
+Follow a window to the tag it is being moved to.
+
+Patch 20210312 prevents the window being followed if it is being moved to the "all" tag.
 
 Download
 --------
 * [dwm-r1522-viewontag.diff](dwm-r1522-viewontag.diff) (dwm r1522) (20100725)
+* [dwm-viewontag-20210312-61bb8b2.diff](dwm-viewontag-20210312-61bb8b2.diff) (window will not be followed to the "all" tag)
 
 Author
 ------
 * Markus P. - peters\_mops at arcor . de
+* Marco Fleres - mafleres at gmail.com (20210312-61bb8b2)
 
Received on Sat Mar 13 2021 - 03:03:48 CET

This archive was generated by hypermail 2.3.0 : Sat Mar 13 2021 - 03:12:46 CET