mirror of
https://github.com/vale981/bspwm
synced 2025-03-05 18:01:37 -05:00
Add node modifier: active
This commit is contained in:
parent
70b477de2e
commit
ccddf1231d
5 changed files with 23 additions and 5 deletions
13
doc/bspwm.1
13
doc/bspwm.1
|
@ -2,12 +2,12 @@
|
|||
.\" Title: bspwm
|
||||
.\" Author: [see the "Author" section]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
|
||||
.\" Date: 05/28/2016
|
||||
.\" Date: 09/22/2016
|
||||
.\" Manual: Bspwm Manual
|
||||
.\" Source: Bspwm 0.9.1-80-g4583587
|
||||
.\" Source: Bspwm 0.9.1-95-g70b477d
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "BSPWM" "1" "05/28/2016" "Bspwm 0\&.9\&.1\-80\-g4583587" "Bspwm Manual"
|
||||
.TH "BSPWM" "1" "09/22/2016" "Bspwm 0\&.9\&.1\-95\-g70b477d" "Bspwm Manual"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
|
@ -96,7 +96,7 @@ Select a node\&.
|
|||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
NODE_SEL := [NODE_SEL#](DIR|CYCLE_DIR|PATH|last|older|newer|focused|pointed|biggest|<node_id>)[\&.[!]focused][\&.[!]automatic][\&.[!]local][\&.[!]leaf][\&.[!]window][\&.[!]STATE][\&.[!]FLAG][\&.[!]LAYER][\&.[!]same_class][\&.[!]descendant_of][\&.[!]ancestor_of]
|
||||
NODE_SEL := [NODE_SEL#](DIR|CYCLE_DIR|PATH|last|older|newer|focused|pointed|biggest|<node_id>)[\&.[!]focused][\&.[!]automatic][\&.[!]local][\&.[!]active][\&.[!]leaf][\&.[!]window][\&.[!]STATE][\&.[!]FLAG][\&.[!]LAYER][\&.[!]same_class][\&.[!]descendant_of][\&.[!]ancestor_of]
|
||||
|
||||
STATE := tiled|pseudo_tiled|floating|fullscreen
|
||||
|
||||
|
@ -230,6 +230,11 @@ Only consider nodes in automatic or manual insertion mode\&.
|
|||
Only consider nodes in or not in the reference desktop\&.
|
||||
.RE
|
||||
.PP
|
||||
[!]active
|
||||
.RS 4
|
||||
Only consider nodes in or not in the active desktop of their monitor\&.
|
||||
.RE
|
||||
.PP
|
||||
[!]leaf
|
||||
.RS 4
|
||||
Only consider leaves or internal nodes\&.
|
||||
|
|
|
@ -70,7 +70,7 @@ Node
|
|||
Select a node.
|
||||
|
||||
----
|
||||
NODE_SEL := [NODE_SEL#](DIR|CYCLE_DIR|PATH|last|older|newer|focused|pointed|biggest|<node_id>)[.[!]focused][.[!]automatic][.[!]local][.[!]leaf][.[!]window][.[!]STATE][.[!]FLAG][.[!]LAYER][.[!]same_class][.[!]descendant_of][.[!]ancestor_of]
|
||||
NODE_SEL := [NODE_SEL#](DIR|CYCLE_DIR|PATH|last|older|newer|focused|pointed|biggest|<node_id>)[.[!]focused][.[!]automatic][.[!]local][.[!]active][.[!]leaf][.[!]window][.[!]STATE][.[!]FLAG][.[!]LAYER][.[!]same_class][.[!]descendant_of][.[!]ancestor_of]
|
||||
|
||||
STATE := tiled|pseudo_tiled|floating|fullscreen
|
||||
|
||||
|
@ -148,6 +148,9 @@ Modifiers
|
|||
[!]local::
|
||||
Only consider nodes in or not in the reference desktop.
|
||||
|
||||
[!]active::
|
||||
Only consider nodes in or not in the active desktop of their monitor.
|
||||
|
||||
[!]leaf::
|
||||
Only consider leaves or internal nodes.
|
||||
|
||||
|
|
1
parse.c
1
parse.c
|
@ -439,6 +439,7 @@ bool parse_node_modifiers(char *desc, node_select_t *sel)
|
|||
GET_MOD(automatic)
|
||||
GET_MOD(focused)
|
||||
GET_MOD(local)
|
||||
GET_MOD(active)
|
||||
GET_MOD(leaf)
|
||||
GET_MOD(window)
|
||||
GET_MOD(pseudo_tiled)
|
||||
|
|
8
query.c
8
query.c
|
@ -339,6 +339,7 @@ node_select_t make_node_select(void)
|
|||
.automatic = OPTION_NONE,
|
||||
.focused = OPTION_NONE,
|
||||
.local = OPTION_NONE,
|
||||
.active = OPTION_NONE,
|
||||
.leaf = OPTION_NONE,
|
||||
.window = OPTION_NONE,
|
||||
.tiled = OPTION_NONE,
|
||||
|
@ -851,6 +852,13 @@ bool node_matches(coordinates_t *loc, coordinates_t *ref, node_select_t sel)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (sel.active != OPTION_NONE &&
|
||||
loc->desktop != loc->monitor->desk
|
||||
? sel.active == OPTION_TRUE
|
||||
: sel.active == OPTION_FALSE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sel.leaf != OPTION_NONE &&
|
||||
!is_leaf(loc->node)
|
||||
? sel.leaf == OPTION_TRUE
|
||||
|
|
1
types.h
1
types.h
|
@ -143,6 +143,7 @@ typedef struct {
|
|||
option_bool_t automatic;
|
||||
option_bool_t focused;
|
||||
option_bool_t local;
|
||||
option_bool_t active;
|
||||
option_bool_t leaf;
|
||||
option_bool_t window;
|
||||
option_bool_t tiled;
|
||||
|
|
Loading…
Add table
Reference in a new issue