{
init();
ewmh_init();
- const xcb_setup_t *current_setup = xcb_get_setup(dpy);
- resource_id_base = current_setup->resource_id_base;
- screen = xcb_setup_roots_iterator(current_setup).data;
+ screen = xcb_setup_roots_iterator(xcb_get_setup(dpy)).data;
if (screen == NULL) {
err("Can't acquire the default screen.\n");
xcb_connection_t *dpy;
int default_screen, screen_width, screen_height;
uint32_t clients_count;
-uint32_t resource_id_base;
xcb_screen_t *screen;
xcb_window_t root;
char config_path[MAXLEN];
.\" Title: bspwm
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 03/16/2016
+.\" Date: 03/20/2016
.\" Manual: Bspwm Manual
-.\" Source: Bspwm 0.9.1-2-g212442e
+.\" Source: Bspwm 0.9.1-3-g9ae96eb
.\" Language: English
.\"
-.TH "BSPWM" "1" "03/16/2016" "Bspwm 0\&.9\&.1\-2\-g212442e" "Bspwm Manual"
+.TH "BSPWM" "1" "03/20/2016" "Bspwm 0\&.9\&.1\-3\-g9ae96eb" "Bspwm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.RS 4
.\}
.nf
-NODE_SEL := (<node_id>|PATH|DIR|CYCLE_DIR|last|older|newer|biggest|focused)[\&.[!]focused][\&.[!]automatic][\&.[!]local][\&.[!]leaf][\&.[!]STATE][\&.[!]FLAG][\&.[!]LAYER][\&.[!]same_class]
+NODE_SEL := (DIR|CYCLE_DIR|PATH|last|older|newer|focused|biggest|<node_id>)[\&.[!]focused][\&.[!]automatic][\&.[!]local][\&.[!]leaf][\&.[!]STATE][\&.[!]FLAG][\&.[!]LAYER][\&.[!]same_class]
STATE := tiled|pseudo_tiled|floating|fullscreen
\fBDescriptors\fR
.RS 4
.PP
-<node_id>
-.RS 4
-Selects the node with the given ID\&.
-.RE
-.PP
-\fIPATH\fR
-.RS 4
-Selects the node at the given path\&.
-.RE
-.PP
\fIDIR\fR
.RS 4
Selects the window in the given (spacial) direction relative to the active node\&.
Selects the window in the given (cyclic) direction\&.
.RE
.PP
-biggest
+\fIPATH\fR
.RS 4
-Selects the biggest window on the current desktop\&.
+Selects the node at the given path\&.
.RE
.PP
last
Selects the previously focused node\&.
.RE
.PP
+older
+.RS 4
+Selects the node older than the focused node in the history\&.
+.RE
+.PP
+newer
+.RS 4
+Selects the node newer than the focused node in the history\&.
+.RE
+.PP
focused
.RS 4
Selects the currently focused node\&.
.RE
.PP
-older
+biggest
.RS 4
-Selects the node older than the focused node in the history\&.
+Selects the biggest window on the current desktop\&.
.RE
.PP
-newer
+<node_id>
.RS 4
-Selects the node newer than the focused node in the history\&.
+Selects the node with the given ID\&.
.RE
.RE
.sp
.RS 4
.\}
.nf
-DESKTOP_SEL := (<desktop_id>|<desktop_name>|[MONITOR_SEL:](focused|^<n>)|CYCLE_DIR|last|older|newer)[\&.[!]occupied][\&.[!]focused][\&.[!]urgent][\&.[!]local]
+DESKTOP_SEL := (CYCLE_DIR|last|older|newer|[MONITOR_SEL:](focused|^<n>)|<desktop_id>|<desktop_name>)[\&.[!]occupied][\&.[!]focused][\&.[!]urgent][\&.[!]local]
.fi
.if n \{\
.RE
\fBDescriptors\fR
.RS 4
.PP
-<desktop_id>
+\fICYCLE_DIR\fR
.RS 4
-Selects the desktop with the given ID\&.
+Selects the desktop in the given direction relative to the active desktop\&.
.RE
.PP
-<desktop_name>
+last
.RS 4
-Selects the desktop with the given name\&.
+Selects the previously focused desktop\&.
.RE
.PP
-^<n>
+older
.RS 4
-Selects the nth desktop\&.
+Selects the desktop older than the focused desktop in the history\&.
.RE
.PP
-\fICYCLE_DIR\fR
+newer
.RS 4
-Selects the desktop in the given direction relative to the active desktop\&.
+Selects the desktop newer than the focused desktop in the history\&.
.RE
.PP
-last
+focused
.RS 4
-Selects the previously focused desktop\&.
+Selects the currently focused desktop\&.
.RE
.PP
-focused
+^<n>
.RS 4
-Selects the currently focused desktop\&.
+Selects the nth desktop\&.
.RE
.PP
-older
+<desktop_id>
.RS 4
-Selects the desktop older than the focused desktop in the history\&.
+Selects the desktop with the given ID\&.
.RE
.PP
-newer
+<desktop_name>
.RS 4
-Selects the desktop newer than the focused desktop in the history\&.
+Selects the desktop with the given name\&.
.RE
.RE
.sp
.RS 4
.\}
.nf
-MONITOR_SEL := (<monitor_id>|<monitor_name>|^<n>|DIR|CYCLE_DIR|last|primary|focused|older|newer)[\&.[!]occupied][\&.[!]focused]
+MONITOR_SEL := (DIR|CYCLE_DIR|last|older|newer|focused|primary|^<n>|<monitor_id>|<monitor_name>)[\&.[!]occupied][\&.[!]focused]
.fi
.if n \{\
.RE
\fBDescriptors\fR
.RS 4
.PP
-<monitor_id>
+\fIDIR\fR
.RS 4
-Selects the monitor with the given ID\&.
+Selects the monitor in the given (spacial) direction relative to the active monitor\&.
.RE
.PP
-<monitor_name>
+\fICYCLE_DIR\fR
.RS 4
-Selects the monitor with the given name\&.
+Selects the monitor in the given (cyclic) direction relative to the active monitor\&.
.RE
.PP
-^<n>
+last
.RS 4
-Selects the nth monitor\&.
+Selects the previously focused monitor\&.
.RE
.PP
-\fIDIR\fR
+older
.RS 4
-Selects the monitor in the given (spacial) direction relative to the active monitor\&.
+Selects the monitor older than the focused monitor in the history\&.
.RE
.PP
-\fICYCLE_DIR\fR
+newer
.RS 4
-Selects the monitor in the given (cyclic) direction relative to the active monitor\&.
+Selects the monitor newer than the focused monitor in the history\&.
.RE
.PP
-primary
+focused
.RS 4
-Selects the primary monitor\&.
+Selects the currently focused monitor\&.
.RE
.PP
-last
+primary
.RS 4
-Selects the previously focused monitor\&.
+Selects the primary monitor\&.
.RE
.PP
-focused
+^<n>
.RS 4
-Selects the currently focused monitor\&.
+Selects the nth monitor\&.
.RE
.PP
-older
+<monitor_id>
.RS 4
-Selects the monitor older than the focused monitor in the history\&.
+Selects the monitor with the given ID\&.
.RE
.PP
-newer
+<monitor_name>
.RS 4
-Selects the monitor newer than the focused monitor in the history\&.
+Selects the monitor with the given name\&.
.RE
.RE
.sp
Select a node.
----
-NODE_SEL := (<node_id>|PATH|DIR|CYCLE_DIR|last|older|newer|biggest|focused)[.[!]focused][.[!]automatic][.[!]local][.[!]leaf][.[!]STATE][.[!]FLAG][.[!]LAYER][.[!]same_class]
+NODE_SEL := (DIR|CYCLE_DIR|PATH|last|older|newer|focused|biggest|<node_id>)[.[!]focused][.[!]automatic][.[!]local][.[!]leaf][.[!]STATE][.[!]FLAG][.[!]LAYER][.[!]same_class]
STATE := tiled|pseudo_tiled|floating|fullscreen
Descriptors
^^^^^^^^^^^
-<node_id>::
- Selects the node with the given ID.
-
-'PATH'::
- Selects the node at the given path.
-
'DIR'::
Selects the window in the given (spacial) direction relative to the active node.
'CYCLE_DIR'::
Selects the window in the given (cyclic) direction.
-biggest::
- Selects the biggest window on the current desktop.
+'PATH'::
+ Selects the node at the given path.
last::
Selects the previously focused node.
-focused::
- Selects the currently focused node.
-
older::
Selects the node older than the focused node in the history.
newer::
Selects the node newer than the focused node in the history.
+focused::
+ Selects the currently focused node.
+
+biggest::
+ Selects the biggest window on the current desktop.
+
+<node_id>::
+ Selects the node with the given ID.
+
Path Jumps
^^^^^^^^^^
Select a desktop.
----
-DESKTOP_SEL := (<desktop_id>|<desktop_name>|[MONITOR_SEL:](focused|^<n>)|CYCLE_DIR|last|older|newer)[.[!]occupied][.[!]focused][.[!]urgent][.[!]local]
+DESKTOP_SEL := (CYCLE_DIR|last|older|newer|[MONITOR_SEL:](focused|^<n>)|<desktop_id>|<desktop_name>)[.[!]occupied][.[!]focused][.[!]urgent][.[!]local]
----
Descriptors
^^^^^^^^^^^
-<desktop_id>::
- Selects the desktop with the given ID.
-
-<desktop_name>::
- Selects the desktop with the given name.
-
-^<n>::
- Selects the nth desktop.
-
'CYCLE_DIR'::
Selects the desktop in the given direction relative to the active desktop.
last::
Selects the previously focused desktop.
-focused::
- Selects the currently focused desktop.
-
older::
Selects the desktop older than the focused desktop in the history.
newer::
Selects the desktop newer than the focused desktop in the history.
+focused::
+ Selects the currently focused desktop.
+
+^<n>::
+ Selects the nth desktop.
+
+<desktop_id>::
+ Selects the desktop with the given ID.
+
+<desktop_name>::
+ Selects the desktop with the given name.
+
Modifiers
^^^^^^^^^
Select a monitor.
----
-MONITOR_SEL := (<monitor_id>|<monitor_name>|^<n>|DIR|CYCLE_DIR|last|primary|focused|older|newer)[.[!]occupied][.[!]focused]
+MONITOR_SEL := (DIR|CYCLE_DIR|last|older|newer|focused|primary|^<n>|<monitor_id>|<monitor_name>)[.[!]occupied][.[!]focused]
----
Descriptors
^^^^^^^^^^^
-<monitor_id>::
- Selects the monitor with the given ID.
-
-<monitor_name>::
- Selects the monitor with the given name.
-
-^<n>::
- Selects the nth monitor.
-
'DIR'::
Selects the monitor in the given (spacial) direction relative to the active monitor.
'CYCLE_DIR'::
Selects the monitor in the given (cyclic) direction relative to the active monitor.
-primary::
- Selects the primary monitor.
-
last::
Selects the previously focused monitor.
-focused::
- Selects the currently focused monitor.
-
older::
Selects the monitor older than the focused monitor in the history.
newer::
Selects the monitor newer than the focused monitor in the history.
+focused::
+ Selects the currently focused monitor.
+
+primary::
+ Selects the primary monitor.
+
+^<n>::
+ Selects the nth monitor.
+
+<monitor_id>::
+ Selects the monitor with the given ID.
+
+<monitor_name>::
+ Selects the monitor with the given name.
+
+
Modifiers
^^^^^^^^^
char *end;
errno = 0;
uint32_t v = strtol(s, &end, 0);
- if (errno != 0 || *end != '\0' || v < resource_id_base) {
+ if (errno != 0 || *end != '\0') {
return false;
}
*id = v;
}
}
}
- } else if (parse_index(desc, &idx)) {
- if (desktop_from_index(idx, dst, NULL)) {
- return desktop_matches(dst, ref, sel);
- }
- } else if (parse_id(desc, &id)) {
- if (desktop_from_id(id, dst, NULL)) {
- return desktop_matches(dst, ref, sel);
- }
+ } else if (parse_index(desc, &idx) && desktop_from_index(idx, dst, NULL)) {
+ return desktop_matches(dst, ref, sel);
+ } else if (parse_id(desc, &id) && desktop_from_id(id, dst, NULL)) {
+ return desktop_matches(dst, ref, sel);
} else {
if (locate_desktop(desc, dst)) {
return desktop_matches(dst, ref, sel);
if (monitor_matches(&loc, ref, sel)) {
dst->monitor = mon;
}
- } else if (parse_index(desc, &idx)) {
- if (monitor_from_index(idx, dst)) {
- return monitor_matches(dst, ref, sel);
- }
- } else if (parse_id(desc, &id)) {
- if (monitor_from_id(id, dst)) {
- return monitor_matches(dst, ref, sel);
- }
+ } else if (parse_index(desc, &idx) && monitor_from_index(idx, dst)) {
+ return monitor_matches(dst, ref, sel);
+ } else if (parse_id(desc, &id)&& monitor_from_id(id, dst)) {
+ return monitor_matches(dst, ref, sel);
} else {
if (locate_monitor(desc, dst)) {
return monitor_matches(dst, ref, sel);