]> git.lizzy.rs Git - bspwm.git/commitdiff
Provide computed selectors for the external rules
authorBastien Dejean <nihilhill@gmail.com>
Tue, 24 May 2016 14:32:40 +0000 (16:32 +0200)
committerBastien Dejean <nihilhill@gmail.com>
Tue, 24 May 2016 14:32:40 +0000 (16:32 +0200)
It might be useful to know what the computed monitor, desktop and node
consequences of the built-in phase are when we enter the external phase
of the rule processing mechanism.

doc/bspwm.1
doc/bspwm.1.asciidoc
rule.c

index bb6b821c073b69e8c930be0ce0c993d3f67178d1..8bd250e478c87233ccb2530d387295fdc0652c3e 100644 (file)
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: bspwm
 .\"    Author: [see the "Author" section]
-.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\"      Date: 05/21/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 05/24/2016
 .\"    Manual: Bspwm Manual
-.\"    Source: Bspwm 0.9.1-76-g319566e
+.\"    Source: Bspwm 0.9.1-78-gfd6d090
 .\"  Language: English
 .\"
-.TH "BSPWM" "1" "05/21/2016" "Bspwm 0\&.9\&.1\-76\-g319566e" "Bspwm Manual"
+.TH "BSPWM" "1" "05/24/2016" "Bspwm 0\&.9\&.1\-78\-gfd6d090" "Bspwm Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -1023,7 +1023,7 @@ Prefix prepended to each of the status lines\&.
 .PP
 \fIexternal_rules_command\fR
 .RS 4
-External command used to retrieve rule consequences\&. The command will receive the the ID of the window being processed as its first argument and the class and instance names as second and third arguments\&. The output of that command must have the following format:
+External command used to retrieve rule consequences\&. The command will receive the following arguments: window ID, class and instance names, monitor, desktop and node selectors\&. The output of that command must have the following format:
 \fBkey1=value1 key2=value2 \&...\fR
 (the valid key/value pairs are given in the description of the
 \fIrule\fR
index 0ba586c0f4a2d856f58e25e57463189ee586d938..c2ba4c504057dc5a3e74c50f3c070907624d55cb 100644 (file)
@@ -613,7 +613,7 @@ Global Settings
        Prefix prepended to each of the status lines.
 
 'external_rules_command'::
-       External command used to retrieve rule consequences. The command will receive the the ID of the window being processed as its first argument and the class and instance names as second and third arguments. The output of that command must have the following format: *key1=value1 key2=value2 ...* (the valid key/value pairs are given in the description of the 'rule' command).
+       External command used to retrieve rule consequences. The command will receive the following arguments: window ID, class and instance names, monitor, desktop and node selectors. The output of that command must have the following format: *key1=value1 key2=value2 ...* (the valid key/value pairs are given in the description of the 'rule' command).
 
 'initial_polarity'::
        On which child should a new window be attached when adding a window on a single window tree in automatic mode. Accept the following values: *first_child*, *second_child*.
diff --git a/rule.c b/rule.c
index c6853d4c90030f5fed22eb36365e1e07d358964a..b7710430e3d0bc0b506b34d1b3e8026a7d06a360 100644 (file)
--- a/rule.c
+++ b/rule.c
@@ -279,7 +279,7 @@ bool schedule_rules(xcb_window_t win, rule_consequence_t *csq)
                char wid[SMALEN];
                snprintf(wid, sizeof(wid), "%i", win);
                setsid();
-               execl(external_rules_command, external_rules_command, wid, csq->class_name, csq->instance_name, NULL);
+               execl(external_rules_command, external_rules_command, wid, csq->class_name, csq->instance_name, csq->monitor_desc, csq->desktop_desc, csq->node_desc, NULL);
                err("Couldn't spawn rule command.\n");
        } else if (pid > 0) {
                close(fds[1]);