mirror of
https://github.com/vale981/bspwm
synced 2025-03-06 02:01:42 -05:00
Add new rule consequence: border
This commit is contained in:
parent
549507db24
commit
6f32affb5d
5 changed files with 8 additions and 6 deletions
|
@ -2,12 +2,12 @@
|
||||||
.\" Title: bspwm
|
.\" Title: bspwm
|
||||||
.\" Author: [see the "Author" section]
|
.\" Author: [see the "Author" section]
|
||||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||||
.\" Date: 07/23/2014
|
.\" Date: 08/14/2014
|
||||||
.\" Manual: Bspwm Manual
|
.\" Manual: Bspwm Manual
|
||||||
.\" Source: Bspwm 0.8.9
|
.\" Source: Bspwm 0.8.9
|
||||||
.\" Language: English
|
.\" Language: English
|
||||||
.\"
|
.\"
|
||||||
.TH "BSPWM" "1" "07/23/2014" "Bspwm 0\&.8\&.9" "Bspwm Manual"
|
.TH "BSPWM" "1" "08/14/2014" "Bspwm 0\&.8\&.9" "Bspwm Manual"
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
.\" * Define some portability stuff
|
.\" * Define some portability stuff
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
|
@ -895,7 +895,7 @@ rule \fIOPTIONS\fR
|
||||||
\fBOptions\fR
|
\fBOptions\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
.PP
|
.PP
|
||||||
\fB\-a\fR, \fB\-\-add\fR <class_name>|<instance_name>|* [\fB\-o\fR|\fB\-\-one\-shot\fR] [monitor=MONITOR_SEL|desktop=DESKTOP_SEL|window=WINDOW_SEL] [(floating|fullscreen|pseudo_tiled|locked|sticky|private|center|follow|manage|focus)=(on|off)] [split_dir=DIR]
|
\fB\-a\fR, \fB\-\-add\fR <class_name>|<instance_name>|* [\fB\-o\fR|\fB\-\-one\-shot\fR] [monitor=MONITOR_SEL|desktop=DESKTOP_SEL|window=WINDOW_SEL] [(floating|fullscreen|pseudo_tiled|locked|sticky|private|center|follow|manage|focus|border)=(on|off)] [split_dir=DIR]
|
||||||
.RS 4
|
.RS 4
|
||||||
Create a new rule\&.
|
Create a new rule\&.
|
||||||
.RE
|
.RE
|
||||||
|
|
|
@ -549,7 +549,7 @@ rule 'OPTIONS'
|
||||||
Options
|
Options
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
|
|
||||||
*-a*, *--add* <class_name>|<instance_name>|* [*-o*|*--one-shot*] [monitor=MONITOR_SEL|desktop=DESKTOP_SEL|window=WINDOW_SEL] [(floating|fullscreen|pseudo_tiled|locked|sticky|private|center|follow|manage|focus)=(on|off)] [split_dir=DIR]::
|
*-a*, *--add* <class_name>|<instance_name>|* [*-o*|*--one-shot*] [monitor=MONITOR_SEL|desktop=DESKTOP_SEL|window=WINDOW_SEL] [(floating|fullscreen|pseudo_tiled|locked|sticky|private|center|follow|manage|focus|border)=(on|off)] [split_dir=DIR]::
|
||||||
Create a new rule.
|
Create a new rule.
|
||||||
|
|
||||||
*-r*, *--remove* ^<n>|head|tail|<class_name>|<instance_name>|*...::
|
*-r*, *--remove* ^<n>|head|tail|<class_name>|<instance_name>|*...::
|
||||||
|
|
3
rule.c
3
rule.c
|
@ -97,7 +97,7 @@ bool remove_rule_by_index(int idx)
|
||||||
rule_consequence_t *make_rule_conquence(void)
|
rule_consequence_t *make_rule_conquence(void)
|
||||||
{
|
{
|
||||||
rule_consequence_t *rc = calloc(1, sizeof(rule_consequence_t));
|
rule_consequence_t *rc = calloc(1, sizeof(rule_consequence_t));
|
||||||
rc->manage = rc->focus = true;
|
rc->manage = rc->focus = rc->border = true;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,6 +299,7 @@ void parse_key_value(char *key, char *value, rule_consequence_t *csq)
|
||||||
SETCSQ(follow)
|
SETCSQ(follow)
|
||||||
SETCSQ(manage)
|
SETCSQ(manage)
|
||||||
SETCSQ(focus)
|
SETCSQ(focus)
|
||||||
|
SETCSQ(border)
|
||||||
#undef SETCSQ
|
#undef SETCSQ
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1
types.h
1
types.h
|
@ -285,6 +285,7 @@ typedef struct {
|
||||||
bool follow;
|
bool follow;
|
||||||
bool manage;
|
bool manage;
|
||||||
bool focus;
|
bool focus;
|
||||||
|
bool border;
|
||||||
} rule_consequence_t;
|
} rule_consequence_t;
|
||||||
|
|
||||||
typedef struct pending_rule_t pending_rule_t;
|
typedef struct pending_rule_t pending_rule_t;
|
||||||
|
|
2
window.c
2
window.c
|
@ -122,7 +122,7 @@ void manage_window(xcb_window_t win, rule_consequence_t *csq, int fd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
client_t *c = make_client(win, d->border_width);
|
client_t *c = make_client(win, csq->border ? d->border_width : 0);
|
||||||
update_floating_rectangle(c);
|
update_floating_rectangle(c);
|
||||||
if (c->floating_rectangle.x == 0 && c->floating_rectangle.y == 0)
|
if (c->floating_rectangle.x == 0 && c->floating_rectangle.y == 0)
|
||||||
csq->center = true;
|
csq->center = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue