sites

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

commit fd37e2b1cc67776191262682fcca315bf14e3070
parent 90eb3860169ea60ce5fbf9e2d70f98dde55316c1
Author: opseter <opseter@outlook.com>
Date:   Thu,  7 Apr 2022 18:20:33 +0800

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

Diffstat:
Adwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220407-bece862.diff | 42++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/viewonrulestag/index.md | 15+++++++++++++++
2 files changed, 57 insertions(+), 0 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 @@ -0,0 +1,42 @@ +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/index.md b/dwm.suckless.org/patches/viewonrulestag/index.md @@ -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@outlook.com> +