adaptative_raise
Prevent floating windows from being raised when they might cover other floating windows.
+ status_stdout
+ Output the status of monitors and desktops on stdout.
+
## Mouse Bindings
button_modifier + left mouse button
.TP
.I adaptative_raise
Prevent floating windows from being raised when they might cover other floating windows.
+.TP
+.I status_stdout
+Output the status of monitors and desktops on stdout.
.SH MOUSE BINDINGS
.TP
.I button_modifier + left mouse button
return;
if (xcb_icccm_get_wm_hints_reply(dpy, xcb_icccm_get_wm_hints(dpy, e->window), &hints, NULL) == 1) {
loc.node->client->urgent = (hints.flags & XCB_ICCCM_WM_HINT_X_URGENCY);
+ put_status();
if (loc.monitor->desk == loc.desktop)
arrange(loc.monitor, loc.desktop);
}
}
}
}
+ put_status();
} else if (strcmp(cmd, "cycle_layout") == 0) {
if (mon->desk->layout == LAYOUT_MONOCLE)
mon->desk->layout = LAYOUT_TILED;
else
mon->desk->layout = LAYOUT_MONOCLE;
+ put_status();
} else if (strcmp(cmd, "shift") == 0) {
char *dir = strtok(NULL, TOK_SEP);
if (dir != NULL) {
char *new_name = strtok(NULL, TOK_SEP);
if (new_name != NULL) {
strncpy(m->name, new_name, sizeof(m->name));
+ put_status();
}
}
}
if (new_name != NULL) {
strncpy(loc.desktop->name, new_name, sizeof(loc.desktop->name));
ewmh_update_desktop_names();
+ put_status();
}
}
}
bool b;
if (parse_bool(value, &b))
adaptative_raise = b;
+ } else if (strcmp(name, "status_stdout") == 0) {
+ bool b;
+ if (parse_bool(value, &b))
+ status_stdout = b;
} else if (strcmp(name, "wm_name") == 0) {
strncpy(wm_name, value, sizeof(wm_name));
ewmh_update_wm_name();
snprintf(rsp, BUFSIZ, "%s", BOOLSTR(focus_follows_mouse));
else if (strcmp(name, "adaptative_raise") == 0)
snprintf(rsp, BUFSIZ, "%s", BOOLSTR(adaptative_raise));
+ else if (strcmp(name, "status_stdout") == 0)
+ snprintf(rsp, BUFSIZ, "%s", BOOLSTR(status_stdout));
else if (strcmp(name, "wm_name") == 0)
snprintf(rsp, BUFSIZ, "%s", wm_name);
else if (strcmp(name, "button_modifier") == 0)
gapless_monocle = GAPLESS_MONOCLE;
focus_follows_mouse = FOCUS_FOLLOWS_MOUSE;
adaptative_raise = ADAPTATIVE_RAISE;
+ status_stdout = STATUS_STDOUT;
}
#define GAPLESS_MONOCLE false
#define FOCUS_FOLLOWS_MOUSE false
#define ADAPTATIVE_RAISE false
+#define STATUS_STDOUT false
char focused_border_color[MAXLEN];
char active_border_color[MAXLEN];
bool gapless_monocle;
bool focus_follows_mouse;
bool adaptative_raise;
+bool status_stdout;
char wm_name[MAXLEN];
unsigned int button_modifier;
}
}
+void put_status(void)
+{
+ if (!status_stdout)
+ return;
+ bool urgent = false;
+ for (monitor_t *m = mon_head; m != NULL; m = m->next) {
+ printf("%c%s:", (mon == m ? 'M' : 'm'), m->name);
+ for (desktop_t *d = m->desk_head; d != NULL; d = d->next, urgent = false) {
+ for (node_t *n = first_extrema(d->root); n != NULL && !urgent; n = next_leaf(n))
+ urgent |= n->client->urgent;
+ printf("%c%c%s:", (m->desk == d ? 'D' : (d->root != NULL ? 'd' : '_')), (urgent ? '!' : '_'), d->name);
+ }
+ }
+ printf("L%c:W%X\n", (mon->desk->layout == LAYOUT_TILED ? 'T' : 'M'), (mon->desk->focus == NULL ? 0 : mon->desk->focus->client->window));
+ fflush(stdout);
+}
+
void arrange(monitor_t *m, desktop_t *d)
{
PRINTF("arrange %s%s%s\n", (num_monitors > 1 ? m->name : ""), (num_monitors > 1 ? " " : ""), d->name);
}
ewmh_update_active_window();
+ put_status();
}
void update_current(void)
ewmh_update_active_window();
else
focus_node(mon, mon->desk, mon->desk->focus, true);
+ put_status();
}
void unlink_node(desktop_t *d, node_t *n)
mon = m;
ewmh_update_current_desktop();
+ put_status();
}
void select_desktop(desktop_t *d)
update_current();
ewmh_update_current_desktop();
+ put_status();
}
void cycle_monitor(cycle_dir_t dir)
num_desktops++;
ewmh_update_number_of_desktops();
ewmh_update_desktop_names();
+ put_status();
}
void add_monitor(xcb_rectangle_t *rect)
void dump_tree(desktop_t *, node_t *, char *, unsigned int);
void list_desktops(monitor_t *, list_option_t, unsigned int, char *);
void list_monitors(list_option_t, char *);
+void put_status(void);
void focus_node(monitor_t *, desktop_t *, node_t *, bool);
void update_current(void);
void unlink_node(desktop_t *, node_t *);