From 1c2e2c4c51044c5d4ecc3fd9bf675ed98e1d4664 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 9 Feb 2025 21:24:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=BB=9A=E5=8A=A8=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=AF=94=E4=BE=8B=E7=AA=97=E5=8F=A3=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.def.h | 8 ++++---- main.c | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config.def.h b/config.def.h index d8576ba0..b396da3c 100644 --- a/config.def.h +++ b/config.def.h @@ -90,13 +90,13 @@ static const char *tags[] = { }; static const Rule rules[] = { - /* app_id title tags mask isfloating isfullscreen animation_type isnoborder monitor width height */ + /* app_id title tags mask isfloating isfullscreen scroller_proportion animation_type isnoborder monitor width height */ /* examples: { "Gimp", NULL, 0, 1, -1,800,600 }, */ - { "Google-chrome", NULL, 1 << 3, 0, 0, NULL, 0,-1, 0,0}, - { "wofi", NULL, 0, 1, 0, "zoom", 1,-1, 0,0}, - { "pot", NULL, 0, 1, 0, "zoom", 1,-1, 0,0}, + { "Google-chrome", NULL, 1 << 3, 0, 0, 0, NULL, 0,-1, 0,0}, + { "wofi", NULL, 0, 1, 0, 0, "zoom", 1,-1, 0,0}, + { "pot", NULL, 0, 1, 0, 0, "zoom", 1,-1, 0,0}, }; diff --git a/main.c b/main.c index bf656eff..de36c88f 100644 --- a/main.c +++ b/main.c @@ -336,6 +336,7 @@ typedef struct { unsigned int tags; int isfloating; int isfullscreen; + float scroller_proportion; const char *animation_type; int isnoborder; int monitor; @@ -1100,6 +1101,7 @@ applyrules(Client *c) { (!r->id || strstr(appid, r->id))) { c->isfloating = r->isfloating; c->animation_type = r->animation_type; + c->scroller_proportion = r->scroller_proportion > 0 ? r->scroller_proportion : scroller_default_proportion; c->isnoborder = r->isnoborder; newtags |= r->tags; i = 0;