sites

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

commit 78378799708f3623784051b3190bc4842d05327f
parent 8b075d38422af0058251dd88c5433b5a8f836dd3
Author: opseter <opseter@outlook.com>
Date:   Sun, 10 Apr 2022 10:03:35 +0800

[dwm][patch][viewonrulestag]update this patch to fix bugs

Diffstat:
Ddwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220407-bece862.diff | 42------------------------------------------
Adwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220410-bece862.diff | 41+++++++++++++++++++++++++++++++++++++++++
Mdwm.suckless.org/patches/viewonrulestag/index.md | 2+-
3 files changed, 42 insertions(+), 43 deletions(-)

diff --git a/dwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220407-bece862.diff b/dwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220407-bece862.diff @@ -1,42 +0,0 @@ -From 635ae9efbff2ce9d6749e17908320d44582084cd Mon Sep 17 00:00:00 2001 -From: opseter <opseter@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 -@@ -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 -@@ -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/dwm-viewonrulestag-20220410-bece862.diff b/dwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220410-bece862.diff @@ -0,0 +1,41 @@ +From 749e118a78fa884af5bd766c714f91cac995f257 Mon Sep 17 00:00:00 2001 +From: opseter <opseter@outlook.com> +Date: Sat, 9 Apr 2022 11:28:56 +0800 +Subject: [PATCH] v2 + +--- + config.def.h | 1 + + dwm.c | 5 +++++ + 2 files changed, 6 insertions(+) + +diff --git a/config.def.h b/config.def.h +index a2ac963..a2fc692 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -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..afab263 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -310,6 +310,11 @@ applyrules(Client *c) + if (ch.res_name) + XFree(ch.res_name); + c->tags = c->tags & TAGMASK ? c->tags & TAGMASK : c->mon->tagset[c->mon->seltags]; ++ if(viewonrulestag) ++ { ++ Arg a = {.ui = c->tags}; ++ view(&a); ++ } + } + + int +-- +2.35.1 + diff --git a/dwm.suckless.org/patches/viewonrulestag/index.md b/dwm.suckless.org/patches/viewonrulestag/index.md @@ -7,7 +7,7 @@ In the origin version of dwm, even you defined window opens in which tag in rule Download -------- -* [dwm-viewonrulesdefinedtag-20220407-bece862a.diff](dwm-viewonrulesdefinedtag-20220407-bece862a.diff) +* [dwm-viewonrulestag-20220410-bece862.diff](dwm-viewonrulestag-20220410-bece862.diff) Author ------