Files
komorebi/docs/linux/usage/workspaces.md
T
LGUG2Z d781028a2a refactor(repo): move the KDE and macOS docs under docs/ (pure move)
komorebi-for-kde/docs/ -> docs/linux/
komorebi-for-mac/docs/ -> docs/macos/

The Windows docs stay where they are (docs/). Renames only, so links and include paths
that named the old directories are broken at this revision; they are fixed in the revision
that fixes the paths of the whole layout move.
2026-11-05 15:03:27 -08:00

5.4 KiB

Workspaces

Each monitor has workspaces, and shows one of them at a time. A workspace has its own windows and its own layout. komorebi's workspaces are KWin's virtual desktops: workspace 0 is the first desktop, workspace 1 the second, and so on, which is why the pager, the overview and KWin's shortcuts show and switch them too.

komorebi turns on KWin's per-output virtual desktops when it starts, so that each monitor shows a desktop of its own: switching the workspace of one monitor leaves the others as they are. It puts the setting back as it was when it stops.

Showing another workspace

komorebic focus-workspace shows a workspace of the focused monitor, by its number, counted from 0. KWin shows the windows of that workspace and hides the others, and the window of that workspace that had the focus has it again.

komorebic focus-workspace 1
komorebic focus-workspace 0

A workspace that does not exist yet is created, with the ones before it, and KWin gets a desktop for each, named "Workspace 2" and so on. A desktop that is there already keeps its name. The desktops komorebi creates stay when it stops.

Moving a window to another workspace

komorebic move-to-workspace takes the focused window to another workspace, puts it after the windows there, and shows that workspace. komorebic send-to-workspace does the same and stays on the workspace in front, which is tiled again without the window.

komorebic move-to-workspace 1
komorebic send-to-workspace 2

Going round the workspaces

komorebic cycle-workspace shows the next or the previous workspace of the focused monitor, and wraps around at both ends; komorebic cycle-empty-workspace shows the next or the previous one that has no window, if there is one. komorebic cycle-move-to-workspace and komorebic cycle-send-to-workspace take the focused window to the next or the previous workspace, with and without showing it.

komorebic cycle-workspace next
komorebic cycle-empty-workspace previous
komorebic cycle-move-to-workspace next

The last workspace

Each monitor remembers which workspace was in front before the one in front now. komorebic focus-last-workspace shows it again, so two in a row go back and forth between the two. komorebic move-to-last-workspace and komorebic send-to-last-workspace take the focused window there, with and without showing it.

Names

komorebic workspace-name names a workspace, given by the index of its monitor and its own index, and komorebic ensure-named-workspaces gives a monitor a workspace for each name it is given, in order. The name is komorebi's, for the commands that find a workspace by its name: KWin's desktop keeps the name it has. komorebic focus-named-workspace shows the workspace with that name, on the monitor that has it, and focuses that monitor. A name no workspace has changes nothing. komorebic query focused-workspace-name prints the name of the workspace in front, or its index when it has none.

komorebic ensure-named-workspaces 0 web code mail
komorebic focus-named-workspace mail

Adding and removing workspaces

komorebic new-workspace adds a workspace after the last one of the focused monitor and shows it, and komorebic ensure-workspaces gives a monitor at least as many workspaces as it is told. komorebic close-workspace removes the workspace in front and shows the one before it, when the workspace has no window and no name and is not the monitor's last.

komorebic focus-workspaces shows the workspace with the same index on every monitor.

The layout of another workspace

komorebic workspace-layout and komorebic workspace-tiling set the layout of a workspace, and turn its tiling off or on, by the index of its monitor and its own index; komorebic named-workspace-layout and komorebic named-workspace-tiling find it by its name. The focused workspace is tiled again at once, and another workspace the next time it is tiled, when it is shown at the latest.

komorebic workspace-layout 0 1 columns
komorebic named-workspace-tiling mail disable

Switching with KWin

Anything that switches KWin's desktop switches komorebi's workspace: the pager, KWin's own shortcuts, the overview, or an application that raises a window of another desktop (KWin then shows that desktop and focuses the window). komorebi follows, tiles the workspace that came into view, and asks KWin for nothing in reply. A window moved to another desktop with the window menu's "Move to Desktop" moves to that workspace.

The windows that were open before

When komorebi starts, each window that is open goes to the workspace whose desktop it is on, and each monitor starts on the workspace KWin shows there. A window that is on every desktop goes to the workspace in front.