feat: support scroller porportion in window rule
This commit is contained in:
@@ -90,13 +90,13 @@ static const char *tags[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const Rule rules[] = {
|
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:
|
/* examples:
|
||||||
{ "Gimp", NULL, 0, 1, -1,800,600 },
|
{ "Gimp", NULL, 0, 1, -1,800,600 },
|
||||||
*/
|
*/
|
||||||
{ "Google-chrome", NULL, 1 << 3, 0, 0, NULL, 0,-1, 0,0},
|
{ "Google-chrome", NULL, 1 << 3, 0, 0, 0, NULL, 0,-1, 0,0},
|
||||||
{ "wofi", NULL, 0, 1, 0, "zoom", 1,-1, 0,0},
|
{ "wofi", NULL, 0, 1, 0, 0, "zoom", 1,-1, 0,0},
|
||||||
{ "pot", NULL, 0, 1, 0, "zoom", 1,-1, 0,0},
|
{ "pot", NULL, 0, 1, 0, 0, "zoom", 1,-1, 0,0},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
2
main.c
2
main.c
@@ -336,6 +336,7 @@ typedef struct {
|
|||||||
unsigned int tags;
|
unsigned int tags;
|
||||||
int isfloating;
|
int isfloating;
|
||||||
int isfullscreen;
|
int isfullscreen;
|
||||||
|
float scroller_proportion;
|
||||||
const char *animation_type;
|
const char *animation_type;
|
||||||
int isnoborder;
|
int isnoborder;
|
||||||
int monitor;
|
int monitor;
|
||||||
@@ -1100,6 +1101,7 @@ applyrules(Client *c) {
|
|||||||
(!r->id || strstr(appid, r->id))) {
|
(!r->id || strstr(appid, r->id))) {
|
||||||
c->isfloating = r->isfloating;
|
c->isfloating = r->isfloating;
|
||||||
c->animation_type = r->animation_type;
|
c->animation_type = r->animation_type;
|
||||||
|
c->scroller_proportion = r->scroller_proportion > 0 ? r->scroller_proportion : scroller_default_proportion;
|
||||||
c->isnoborder = r->isnoborder;
|
c->isnoborder = r->isnoborder;
|
||||||
newtags |= r->tags;
|
newtags |= r->tags;
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user