[wiki] [sites] [dwm][patch][viewonrulestag]view on the tag defined in rules || opseter

From: <git_AT_suckless.org>
Date: Thu, 07 Apr 2022 12:21:10 +0200

commit fd37e2b1cc67776191262682fcca315bf14e3070
Author: opseter <opseter_AT_outlook.com>
Date: Thu Apr 7 18:20:33 2022 +0800

    [dwm][patch][viewonrulestag]view on the tag defined in rules

diff --git a/dwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220407-bece862.diff b/dwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220407-bece862.diff
new file mode 100644
index 00000000..9b4ad013
--- /dev/null
+++ b/dwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220407-bece862.diff
_AT_@ -0,0 +1,42 @@
+From 635ae9efbff2ce9d6749e17908320d44582084cd Mon Sep 17 00:00:00 2001
+From: opseter <opseter_AT_outlook.com>
+Date: Thu, 7 Apr 2022 17:45:58 +0800
+Subject: [PATCH] view on rules defined tag
+
+---
+ config.def.h | 1 +
+ dwm.c | 6 ++++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/config.def.h b/config.def.h
+index a2ac963..d077654 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 int viewonrulestag = 1; /* 1 means when open applications view will move to tags defined in rules*/
+ 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 5f16260..2392d2f 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -300,6 +300,12 @@ applyrules(Client *c)
+ {
+ c->isfloating = r->isfloating;
+ c->tags |= r->tags;
++ if(viewonrulestag)
++ {
++ Arg a = {.ui = r->tags};
++ view(&a);
++ }
++
+ for (m = mons; m && m->num != r->monitor; m = m->next);
+ if (m)
+ c->mon = m;
+--
+2.35.1
+
diff --git a/dwm.suckless.org/patches/viewonrulestag/index.md b/dwm.suckless.org/patches/viewonrulestag/index.md
new file mode 100644
index 00000000..6eef09c2
--- /dev/null
+++ b/dwm.suckless.org/patches/viewonrulestag/index.md
_AT_@ -0,0 +1,15 @@
+viewonrulestag
+=========
+
+Description
+-----------
+In the origin version of dwm, even you defined window opens in which tag in rules, view will not move to that tags. So this patch can help view move to the defined tags in rules.
+
+Download
+--------
+* [dwm-viewonrulesdefinedtag-20220407-bece862a.diff](dwm-viewonrulesdefinedtag-20220407-bece862a.diff)
+
+Author
+------
+* opseter - <opseter_AT_outlook.com>
+
Received on Thu Apr 07 2022 - 12:21:10 CEST

This archive was generated by hypermail 2.3.0 : Thu Apr 07 2022 - 12:24:48 CEST