Skip to content

gnoblin.configure.window_management ​

Configure this part of gnoblin.configure with the window_management key.

Put these fields inside gnoblin.configure {window_management = {...}}. Changes apply on configuration reload. Omitted fields use the defaults below.

KeyValuesDefaultEffect
focus_mode"click", "sloppy", "mouse""click"Focus on click, pointer entry, or pointer movement.
focus_new_windows"smart", "strict""smart"Controls whether newly opened windows may take focus.
raise_on_clickBooleantrueRaise a window when clicked.
auto_raiseBooleanfalseRaise the focused window automatically.
focus_change_on_pointer_restBooleanfalseChange focus when the pointer stops over another window.
auto_raise_delay0–10000 ms500Delay before automatic raise.
action_double_click_titlebarTitlebar action below"toggle-maximize"Action for a titlebar double-click.
action_middle_click_titlebarTitlebar action below"lower"Action for a titlebar middle-click.
action_right_click_titlebarTitlebar action below"menu"Action for a titlebar right-click.
dynamic_workspacesBooleanfalseCreate and remove workspaces as needed.
workspaces_only_on_primaryBooleanfalseKeep workspaces on the primary monitor.
edge_tilingBooleanfalseEnable Mutter's edge tiling.
num_workspaces1–364Fixed workspace count when dynamic workspaces are disabled.
workspace_namesUp to 36 strings, each at most 80 characters{}Display labels by workspace position.
workspace_idsOrdered array of up to 36 unique IDs{}Stable IDs assigned by each workspace's initial position.
center_new_windowsBooleanfalseCenter newly created windows.
attach_modal_dialogsBooleanfalsePlace modal dialogs with their parent window.
constrain_drag_to_work_areaBooleantrueKeep interactive window moves inside the work area.

Workspace IDs must be unique and match ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$. A configured ID is assigned by initial position, then follows its workspace if order changes. Gnoblin generates a session-only ID for each unconfigured workspace; do not save those IDs in rules or scripts. This works with fixed and dynamic workspaces. See the window rules guide for matching and placement examples.

For example, use pointer-follow focus and name the first two workspaces:

lua
gnoblin.configure {
    window_management = {
        focus_mode = "sloppy",
        workspace_names = {"Main", "Chat"},
        workspace_ids = {"main", "chat"},
    },
}

Titlebar actions ​

The three titlebar click fields accept these values:

ValueAction
toggle-maximizeToggle maximize.
toggle-maximize-horizontallyToggle horizontal maximize.
toggle-maximize-verticallyToggle vertical maximize.
minimizeMinimize the window.
lowerLower the window in the stacking order.
menuOpen the window menu.
noneDo nothing.

These settings control Mutter policy and Gnoblin's built-in fallback SSD. Applications that draw their own client-side titlebars handle those clicks themselves.

GTK applications usually draw their own titlebars and read GNOME's window manager settings directly. This Lua section does not change those apps' CSD behavior. A custom SSD renderer implements its own titlebar click behavior.

See titlebars.

Type definition ​

This is schema pseudocode in Lua table form. ? marks an optional field; | separates accepted alternatives.

lua
gnoblin.configure {
    window_management = {
        focus_mode = "click" | "sloppy" | "mouse"?,
        focus_new_windows = "smart" | "strict"?,
        raise_on_click = boolean?,
        auto_raise = boolean?,
        focus_change_on_pointer_rest = boolean?,
        auto_raise_delay = integer?, -- 0–10000 ms
        action_double_click_titlebar = TitlebarAction?,
        action_middle_click_titlebar = TitlebarAction?,
        action_right_click_titlebar = TitlebarAction?,
        dynamic_workspaces = boolean?,
        workspaces_only_on_primary = boolean?,
        edge_tiling = boolean?,
        num_workspaces = integer?, -- 1–36
        workspace_names = {string, ...}?, -- up to 36, max 80 characters each
        workspace_ids = {string, ...}?, -- up to 36 unique IDs
        center_new_windows = boolean?,
        attach_modal_dialogs = boolean?,
        constrain_drag_to_work_area = boolean?,
    },
}

-- TitlebarAction = "toggle-maximize" | "toggle-maximize-horizontally"
--                | "toggle-maximize-vertically" | "minimize" | "lower"
--                | "menu" | "none"