Raise window to top when focused. Default is no.
## WINDOW SNAPPING
+
*<snapping><range>*
The distance in pixels from the edge of an ouput for window Move
operations to trigger SnapToEdge. A range of 0 disables window snapping.
*<snapping><topMaximize>* [yes|no]
Maximize window if Move operation ends on the top edge. Default is yes.
+## WORKSPACES
+
+*<desktops><names><name>*
+ Define workspaces. A workspace covers all outputs. The OSD only shows
+ windows on the current workspace. Workspaces can be switched to with
+ GoToDesktop and windows can be moved with SendToDesktop. See
+ labwc-actions(5) for more information about their arguments.
+
+*<desktops><popupTime>*
+ Define the timeout after which to hide the workspace OSD.
+ A setting of 0 disables the OSD. Default is 1000 ms.
+
## THEME
*<theme><name>*
<topMaximize>yes</topMaximize>
</snapping>
+ <!--
+ Use GoToDesktop left | right to switch workspaces.
+ Use SendToDesktop left | right to move windows.
+ See man labwc-actions for futher information.
+
+ Workspaces can be configured like this:
+ <desktops>
+ <popupTime>1000</popupTime>
+ <names>
+ <name>Workspace 1</name>
+ <name>Workspace 2</name>
+ <name>Workspace 3</name>
+ </names>
+ </desktops>
+ -->
+ <desktops>
+ <!--
+ popupTime defaults to 1000 so could be left out.
+ Set to 0 to completely disable the workspace OSD.
+ -->
+ <popupTime>1000</popupTime>
+ <names>
+ <name>Default</name>
+ </names>
+ </desktops>
+
<!--
Keybind actions are specified in labwc-actions(5)
The following keybind modifiers are supported:
#include "config/libinput.h"
#include "config/mousebind.h"
#include "config/rcxml.h"
+#include "workspaces.h"
static bool in_keybind;
static bool in_mousebind;
rc.snap_top_maximize = get_bool(content);
} else if (!strcasecmp(nodename, "cycleViewPreview.core")) {
rc.cycle_preview_contents = get_bool(content);
+ } else if (!strcasecmp(nodename, "name.names.desktops")) {
+ struct workspace *workspace = calloc(1, sizeof(struct workspace));
+ workspace->name = strdup(content);
+ wl_list_insert(rc.workspace_config.workspaces.prev, &workspace->link);
+ } else if (!strcasecmp(nodename, "popupTime.desktops")) {
+ rc.workspace_config.popuptime = atoi(content);
}
}
rc.snap_edge_range = 1;
rc.snap_top_maximize = true;
rc.cycle_preview_contents = false;
+ rc.workspace_config.popuptime = INT_MIN;
+ wl_list_init(&rc.workspace_config.workspaces);
}
static struct {
struct libinput_category *l = libinput_category_create();
l->type = TOUCH_DEVICE;
}
+ if (!wl_list_length(&rc.workspace_config.workspaces)) {
+ struct workspace *workspace = calloc(1, sizeof(struct workspace));
+ workspace->name = strdup("Default");
+ wl_list_insert(rc.workspace_config.workspaces.prev, &workspace->link);
+ }
+ if (rc.workspace_config.popuptime == INT_MIN) {
+ rc.workspace_config.popuptime = 1000;
+ }
}
static void
zfree(l);
}
+ struct workspace *w, *w_tmp;
+ wl_list_for_each_safe(w, w_tmp, &rc.workspace_config.workspaces, link) {
+ wl_list_remove(&w->link);
+ zfree(w->name);
+ zfree(w);
+ }
+
/* Reset state vars for starting fresh when Reload is triggered */
current_keybind = NULL;
current_mousebind = NULL;