oxwm github discord tonybtw.com

Layouts

The layouts

Name Symbol What it does
tiling []= Master area on the left, stack on the right
dwindle [\] Each new window takes half of the remaining space, in a spiral
grid [#] Every window gets an equal cell
monocle [M] One window at a time, full size
scrolling [S] Windows side by side in a strip you scroll through
floating ><> Nothing is tiled, windows stay where you put them

The symbol is what the bar shows next to the tags.

Some layouts answer to other names too. tile is tiling, normie and float are floating, scroll is scrolling, and fib and fibonacci are dwindle.

Switching

Bind a key to a layout, or cycle through all of them:

oxwm.key.bind({ modkey }, "C", oxwm.layout.set("tiling"))
oxwm.key.bind({ modkey }, "F", oxwm.layout.set("floating"))
oxwm.key.bind({ modkey }, "G", oxwm.layout.set("grid"))
oxwm.key.bind({ modkey }, "N", oxwm.layout.cycle())

Default layout

New tags start in tiling. To change that for every tag:

oxwm.set_layout("dwindle")

To change it for one tag, give the tag number first. Tags count from 1 here:

oxwm.set_tag_layout(1, "grid")
oxwm.set_tag_layout(9, "monocle")

Tags you do not mention use the set_layout value.

Symbols

Replace the symbol the bar shows for a layout:

oxwm.set_layout_symbol("tiling", "[T]")
oxwm.set_layout_symbol("floating", "[F]")
oxwm.set_layout_symbol("monocle", "[1]")

Master area

The tiling layout splits the screen into a master area and a stack. Two actions change that split:

oxwm.key.bind({ modkey }, "H", oxwm.set_master_factor(-50))
oxwm.key.bind({ modkey }, "L", oxwm.set_master_factor(50))
oxwm.key.bind({ modkey }, "I", oxwm.inc_num_master(1))
oxwm.key.bind({ modkey }, "P", oxwm.inc_num_master(-1))

set_master_factor takes thousandths of the screen width, so 50 widens the master area by 5%. The master area starts at 55% and stays between 5% and 95%.

inc_num_master changes how many windows sit in the master area.

Both are remembered per tag.

Where new windows go

The attach method decides where a new window lands in the stack:

oxwm.set_attach_method("aside")
Method New window goes
aside To the top of the stack, leaving the master alone. This is the default
top To the very top, becoming the master
bottom To the end of the stack
above Just above the focused window
below Just below the focused window

Moving windows in the stack

oxwm.key.bind({ modkey }, "J", oxwm.client.focus_stack(1))
oxwm.key.bind({ modkey }, "K", oxwm.client.focus_stack(-1))
oxwm.key.bind({ modkey, "Shift" }, "J", oxwm.client.move_stack(1))
oxwm.key.bind({ modkey, "Shift" }, "K", oxwm.client.move_stack(-1))

focus_stack moves the focus. move_stack swaps the focused window with its neighbour.

Floating and fullscreen

Any single window can leave the layout:

oxwm.key.bind({ modkey, "Shift" }, "Space", oxwm.client.toggle_floating())
oxwm.key.bind({ modkey, "Shift" }, "F", oxwm.client.toggle_fullscreen())

Floating windows can be moved and resized with the mouse.

Scrolling

The scrolling layout has enough settings to get its own page.