## WINDOW SWITCHER
-*<windowSwitcher show="" preview="" outlines="">*
+*<windowSwitcher show="" preview="" outlines="" allWorkspaces="">*
*show* [yes|no] Draw the OnScreenDisplay when switching between
windows. Default is yes.
*outlines* [yes|no] Draw an outline around the selected window when
switching between windows. Default is yes.
+ *allWorkspaces* [yes|no] Show windows regardless of what workspace
+ they are on. Default no (that is only windows on the current workspace
+ are shown).
+
*<windowSwitcher><fields><field content="" width="%">*
Define window switcher fields.
Just as for window-rules, 'identifier' relates to app_id for native Wayland
windows and WM_CLASS for XWayland clients.
-->
- <windowSwitcher show="yes" preview="yes" outlines="yes">
+ <windowSwitcher show="yes" preview="yes" outlines="yes" allWorkspaces="no">
<fields>
<field content="type" width="25%" />
<field content="trimmed_identifier" width="25%" />
/* Regions */
struct wl_list regions; /* struct region.link */
+ /* Window Switcher */
struct {
bool show;
bool preview;
bool outlines;
+ uint32_t criteria;
struct wl_list fields; /* struct window_switcher_field.link */
} window_switcher;
set_bool(content, &rc.window_switcher.preview);
} else if (!strcasecmp(nodename, "outlines.windowSwitcher")) {
set_bool(content, &rc.window_switcher.outlines);
+ } else if (!strcasecmp(nodename, "allWorkspaces.windowSwitcher")) {
+ if (parse_bool(content, -1) == true) {
+ rc.window_switcher.criteria &=
+ ~LAB_VIEW_CRITERIA_CURRENT_WORKSPACE;
+ }
/* Remove this long term - just a friendly warning for now */
} else if (strstr(nodename, "windowswitcher.core")) {
rc.window_switcher.show = true;
rc.window_switcher.preview = true;
rc.window_switcher.outlines = true;
+ rc.window_switcher.criteria = LAB_VIEW_CRITERIA_CURRENT_WORKSPACE
+ | LAB_VIEW_CRITERIA_ROOT_TOPLEVEL
+ | LAB_VIEW_CRITERIA_NO_SKIP_WINDOW_SWITCHER;
rc.resize_indicator = LAB_RESIZE_INDICATOR_NEVER;
bool forwards = dir == LAB_CYCLE_DIR_FORWARD;
iter = forwards ? view_next_no_head_stop : view_prev_no_head_stop;
- /*
- * TODO: These criteria are the same as in display_osd() in osd.c
- * for the time being.
- *
- * A future improvement could be to make this configurable for example
- * in rc.xml and then use rc.cycle_view_criteria (or whatever) both
- * here and in the osd.c window-switcher code
- */
- enum lab_view_criteria criteria = LAB_VIEW_CRITERIA_CURRENT_WORKSPACE
- | LAB_VIEW_CRITERIA_ROOT_TOPLEVEL
- | LAB_VIEW_CRITERIA_NO_SKIP_WINDOW_SWITCHER;
+ enum lab_view_criteria criteria = rc.window_switcher.criteria;
/*
* Views are listed in stacking order, topmost first. Usually the
struct wl_array views;
wl_array_init(&views);
- view_array_append(server, &views,
- LAB_VIEW_CRITERIA_CURRENT_WORKSPACE
- | LAB_VIEW_CRITERIA_ROOT_TOPLEVEL
- | LAB_VIEW_CRITERIA_NO_SKIP_WINDOW_SWITCHER);
+ view_array_append(server, &views, rc.window_switcher.criteria);
float scale = output->wlr_output->scale;
int w = theme->osd_window_switcher_width;
{
struct wl_array views;
wl_array_init(&views);
- view_array_append(server, &views,
- LAB_VIEW_CRITERIA_CURRENT_WORKSPACE
- | LAB_VIEW_CRITERIA_ROOT_TOPLEVEL
- | LAB_VIEW_CRITERIA_NO_SKIP_WINDOW_SWITCHER);
+ view_array_append(server, &views, rc.window_switcher.criteria);
int count = wl_array_len(&views);
wl_array_release(&views);
return count;