feat: add windowrule option scroller_proportion_single

This commit is contained in:
DreamMaoMao
2025-11-14 15:39:04 +08:00
parent 514c916678
commit 407c9d74a4
4 changed files with 22 additions and 4 deletions

View File

@@ -90,6 +90,7 @@ typedef struct {
int noblur;
float focused_opacity;
float unfocused_opacity;
float scroller_proportion_single;
uint32_t passmod;
xkb_keysym_t keysym;
KeyBinding globalkeybinding;
@@ -1679,6 +1680,7 @@ void parse_option(Config *config, char *key, char *value) {
// float rule value, relay to a client property
rule->focused_opacity = 0;
rule->unfocused_opacity = 0;
rule->scroller_proportion_single = 0.0f;
rule->scroller_proportion = 0;
// special rule value,not directly set to client property
@@ -1750,6 +1752,8 @@ void parse_option(Config *config, char *key, char *value) {
rule->isunglobal = atoi(val);
} else if (strcmp(key, "isglobal") == 0) {
rule->isglobal = atoi(val);
} else if (strcmp(key, "scroller_proportion_single") == 0) {
rule->scroller_proportion_single = atof(val);
} else if (strcmp(key, "unfocused_opacity") == 0) {
rule->unfocused_opacity = atof(val);
} else if (strcmp(key, "focused_opacity") == 0) {