Whether the client has full server-side decorations,
borders only, or no server-side decorations.
+ *monitor* [current|left|right|<monitor_name>]
+ Whether the client is on a monitor relative to the to
+ the currently focused monitor (current, left, or right)
+ or on a monitor with the supplied <monitor_name>.
+
This argument is optional.
*then*
}
if (query->monitor) {
- struct output *target = output_from_name(view->server, query->monitor);
- if (target != view->output) {
+ struct output *current = output_nearest_to_cursor(view->server);
+
+ if (!strcasecmp(query->monitor, "current") && current != view->output) {
+ return false;
+ }
+ if (!strcasecmp(query->monitor, "left") &&
+ output_get_adjacent(current, VIEW_EDGE_LEFT, false) != view->output) {
+ return false;
+ }
+ if (!strcasecmp(query->monitor, "right") &&
+ output_get_adjacent(current, VIEW_EDGE_RIGHT, false) != view->output) {
+ return false;
+ }
+ if (output_from_name(view->server, query->monitor) != view->output) {
return false;
}
}