Desktop session and window management
Omarchy assembles a Wayland desktop session around Hyprland. SDDM starts the compositor for login, Hyprland combines Omarchy defaults with user settings, and a set of shell commands and user services turns that session into a usable desktop. The session manages windows, workspaces, monitors, input, application launch, power events, and recovery as one connected system.
Session assembly
The session begins in SDDM and moves into a user-managed Hyprland session. SDDM uses a small compositor setup for its greeter, while the logged-in session loads Omarchy defaults and personal overrides before it gives applications the Wayland environment they need.
flowchart LR
A[SDDM login] --> B[Wayland Hyprland session]
B --> C[Omarchy defaults]
B --> D[User Hyprland settings]
C --> E[Window and desktop controls]
D --> E
B --> F[User session services]
E --> G[Applications and shell UI]
F --> G
The configuration has a clear ownership split. Omarchy supplies the base behavior, while files under ~/.config/hypr supply personal monitor, input, binding, appearance, and startup changes after the defaults load. This includes optional switches for all Omarchy bindings, preinstalled application bindings, and default touchpad gestures. The split lets package updates improve the base without replacing user choices. See Hyprland configuration and display control for configuration detail.
References: etc/…/10-wayland.conf• L1-5 default/…/hyprland.lua• L1-13 config/…/hyprland.lua• L3-29 default/…/bootstrap.lua• L31-39
Wayland environment
The session presents Wayland as the main display system and keeps X11 support as a compatibility path. Hyprland sets common application variables so GTK, Qt, Mozilla, and Electron applications prefer Wayland, while XWayland windows use compositor scaling that avoids an extra stretch step.
This environment also identifies the desktop as Hyprland for screen sharing and related desktop services. The session exports Omarchy's install path and command path so bindings and services resolve the same tools.
References: default/…/envs.lua• L11-36
Hyprland desktop behavior
Hyprland is the session's compositor and window manager. Omarchy uses it to place windows, manage workspaces and groups, react to monitor changes, and provide direct key and mouse control over the desktop.
The default behavior favors fast keyboard control. Windows can be tiled, floated, grouped, pinned, resized, moved between workspaces, or shown in a scratchpad. A scratchpad is a special workspace that can appear over the current workspace and act as a temporary console.
Window and workspace model
The window model combines normal workspaces with special workspaces and per-workspace layout choice. Users can switch focus, move windows, swap positions, change the tiled or floating state, and save a workspace layout choice for later reloads.
| User-facing area | Desktop result |
|---|---|
| Tiling | Windows share a workspace layout and can be resized or split. |
| Floating and pop-out windows | A window can leave the tile, move freely, remain above other windows, or stay pinned to a display. |
| Workspaces | Windows move between numbered workspaces and monitors without closing. |
| Scratchpad | A special workspace hides or reveals a temporary console over the active desktop. |
| Groups | Several windows share one tiled area and can be selected as a group. |
The workspace layout toggle changes the active workspace between Hyprland's dwindle and scrolling layouts. The selected layout is stored in user state and loaded again when the configuration reloads, so the choice belongs to the workspace rather than only to the current process.
References: default/…/tiling.lua• L1-98 default/…/workspace-layouts.lua• L1-8 bin/omarchy-hyprland-workspace-layout-toggle• L1-21
Window rules
Window rules provide shared defaults before application-specific behavior applies. Omarchy suppresses unwanted maximize events, gives windows a default opacity tag, and applies special handling to unusual XWayland windows. Application rules then shape common desktop cases such as browser windows, dialogs, floating tools, picture-in-picture views, camera overlays, and full-screen media or games.
The result is a common window feel without forcing every application into the same placement. App rules can keep a window focused, pin it above other windows, place it on a special workspace, or give it a size that matches its role. User rules and the linked application configuration remain the place for app-specific changes.
References: default/…/windows.lua• L1-26 default/…/browser.lua• L1-10 default/…/davinci-resolve.lua• L1-11 default/…/hermes.lua• L1-5 default/…/localsend.lua• L1-5 default/…/pip.lua• L1-20 default/…/retroarch.lua• L1-4 default/…/steam.lua• L1-3 default/…/system.lua• L1-44 default/…/webcam-overlay.lua• L1-23
Monitor and input behavior
Hyprland treats monitor layout and input as session state. The monitor panel is the normal user-facing control for scale, resolution, arrangement, refresh rate, and rotation, and it saves those choices for each monitor. config/hypr/monitors.lua loads after Omarchy's defaults and provides an override surface for settings the panel does not cover. Saved panel choices still take priority unless the panel settings are disabled, which lets users keep either per-monitor choices or a repeatable setup in their configuration.
Keyboard settings come from the system console configuration, with a safe Latin layout path for bindings when the main layout cannot type Latin keys. Personal input changes use config/hypr/input.lua as an override surface loaded after the Omarchy defaults. The file can adjust keyboard, pointer, touchpad, application-specific scrolling, and touchpad gesture behavior without changing the shipped session settings. A user must unset an existing gesture before assigning another gesture to the same fingers and direction. For example, a user can replace a default three-finger horizontal swipe with focus movement, which is useful with the scrolling layout.
The session also responds to laptop lid and monitor events. A monitor watcher reconciles clamshell state and retries recovery when a display disappears or a reload leaves an output unavailable. It treats only enabled non-internal outputs as external, so Hyprland's FALLBACK output does not keep the internal panel off after the last external monitor is unplugged. This keeps laptop display toggles and external monitor changes aligned with the physical hardware.
References: config/…/monitors.lua• L1-37 config/…/input.lua• L1-71 default/…/input.lua• L24-75 bin/omarchy-hyprland-monitor-watch• L1-114 bin/omarchy-hyprland-monitor-external-active• L3-9 default/…/utilities.lua• L31-36
User-facing controls
Hyprland bindings are the main bridge from user actions to Omarchy features. A binding may dispatch a compositor action, start an application through the session launcher, open an Omarchy menu or shell panel, or call a stateful command that persists a toggle.
The controls cover four related groups:
- Navigation: focus, workspaces, monitors, groups, scratchpad, and window movement.
- Window shape: tiling, floating, fullscreen, pop-out, gaps, transparency, width, and aspect ratio.
- Desktop tools: menus, panels, notifications, screenshots, recording, color picking, OCR, audio, Bluetooth, network, display, and power views.
- Hardware keys: volume, brightness, keyboard light, touchpad, media, lid, and display controls. These remain available while the session is locked when the action is safe to expose.
The shell UI owns the menus and panels that these bindings open. The compositor owns focus and window actions, while the shell or a command owns broader desktop state. A shared dispatcher uses a shell shortcut when one exists and otherwise starts the related command. This boundary keeps a key press simple even when the resulting action crosses several session components. See Shell UI and desktop interactions for the shell side of this relationship.
References: default/…/tiling.lua• L1-98 default/…/applications.lua• L1-36 default/…/utilities.lua• L1-128 default/…/media.lua• L1-34 default/…/helpers.lua• L58-160
Personal control boundaries
Personal changes belong in the user Hyprland files rather than in the shipped defaults. config/hypr/bindings.lua is the binding override surface: o.bind adds a binding, o.rebind replaces a default, and hl.unbind disables a default without changing the Omarchy base. The personal Hyprland file also exposes switches for default bindings and default touchpad gestures.
The binding layer supports two levels of removal. A user can disable every Omarchy default binding or keep core window-manager controls while removing bindings for preinstalled applications and web applications. This keeps optional application launchers separate from the controls needed to operate the desktop.
References: config/…/hyprland.lua• L6-23 config/…/bindings.lua• L1-28 default/…/applications.lua• L1-36 default/…/helpers.lua• L130-157
Session services
User systemd services extend the compositor session with work that must continue beside Hyprland. They start at graphical-session milestones, receive the Wayland environment, and stop with the session when their work depends on the compositor.
At Hyprland start, Omarchy imports the session environment for user services and starts the shell, first-run work, power-profile setup, monitor watch, and removable-device handling. Post-boot hooks run after the initial desktop configuration is ready. First-run setup enables the shipped user units so the first graphical login has the same session support as later logins.
sequenceDiagram
participant H as Hyprland
participant U as User manager
participant S as Shell and session tools
participant R as Recovery services
H->>U: Import Wayland and session environment
H->>S: Start shell and session helpers
H->>R: Start monitor and post-boot recovery work
U->>S: Run graphical-session services
U->>R: Lock, input, crash, and monitor services
H-->>U: End graphical session
U-->>S: Stop services tied to the session
U-->>R: Stop services tied to the session
Session service roles
The services are split by the kind of session risk they handle:
| Service role | Purpose |
|---|---|
| Session readiness | Import display variables and start work only when a usable graphical session exists. |
| Input and lock | Provide XCompose input and lock before suspend. |
| Display recovery | Restore internal monitor state and reconcile lid or hotplug changes. |
| Session safety | Watch for application crashes and offer a diagnosis path. |
| Hardware support | Start enabled support such as Bluetooth pairing when its conditions apply. |
Conditions keep units inactive when their hardware or session variables do not apply. Services that need Wayland follow graphical-session.target, so an SSH shell or a live user manager does not start a broken copy before login.
References: default/…/autostart.lua• L1-14 install/…/enable-user-units.sh• L1-22 default/…/omarchy-sleep-lock.service• L1-19 default/…/omarchy-fcitx5.service• L1-31 default/…/omarchy-recover-internal-monitor.service• L1-11 default/…/omarchy-crash-watch.service• L1-19
Session lifecycle
The session follows a small set of stages. Each stage prepares the next one and keeps actions that depend on the graphical environment out of earlier system startup.
- Login: SDDM starts a minimal Wayland Hyprland greeter and selects the user session.
- Configuration: Hyprland loads Omarchy defaults, theme overrides, and user configuration.
- Environment: Wayland and Omarchy variables become available to applications and the user manager.
- Startup: The shell, power profile, monitor watch, device automount, and post-boot hooks start.
- Steady state: Bindings control the compositor, shell UI, applications, monitors, and desktop services.
- Recovery: Monitor events, suspend, crashes, and session loss trigger targeted reconciliation or restart behavior.
This order matters because many actions need both a running compositor and the environment that identifies its display socket. Session services therefore use graphical-session ordering and environment conditions instead of starting as general background daemons.
References: etc/…/10-wayland.conf• L1-5 default/…/omarchy.lua• L1-23 default/…/autostart.lua• L1-14 default/…/omarchy-fcitx5.service• L6-20
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the SDDM compositor command and the user Hyprland entry point aligned. A mismatch can affect login before user configuration loads.
- Keep binding descriptions, shell shortcut names, and the shell's global actions aligned. The binding helper may route a command through the shell instead of launching a new process.
- Keep application launchers and application window matches aligned. A renamed app or web app can otherwise launch without receiving its intended focus, placement, or floating behavior.
- Keep the monitor panel's saved choices,
config/hypr/monitors.lua, and monitor recovery behavior aligned. Panel choices can override settings in the file, while file-only settings must still survive a reload. - Keep monitor hotplug, lid-switch bindings, and the monitor watcher aligned. Each covers a different part of display state recovery.
- Keep external-monitor detection aligned with monitor recovery rules. Disabled outputs and Hyprland's
FALLBACKoutput must not count as active external displays. - Keep personal input overrides aligned with the defaults they replace. Input changes can affect keyboard bindings, touchpad behavior, application scroll speed, and workspace gestures together.
- Keep gesture removal and replacement aligned. Hyprland rejects a second gesture with the same fingers and direction until the default is unset.
- Keep graphical-session ordering and environment conditions on services that need
WAYLAND_DISPLAY. Enabling a unit alone must not make it start from SSH. - Keep workspace layout state and its loader aligned. The saved workspace files are part of the behavior restored on a Hyprland reload.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| SDDM starts a compositor command that does not match the installed session entry point | The greeter or user session cannot start with the expected Wayland setup | Keep the SDDM Wayland command and Hyprland session configuration as one contract. |
A Wayland-dependent service starts without WAYLAND_DISPLAY | The service can stay active but cannot reach desktop clients, blocking a later working start | Use graphical-session ordering and environment conditions. |
A monitor setting is changed in config/hypr/monitors.lua while the monitor panel's saved choices remain active | The file's scale, mode, arrangement, refresh, or rotation choice does not take effect for that monitor | Disable panel settings when the file must control every monitor, or change the choice through the panel. |
| A monitor change is handled only once | The internal panel or clamshell state can drift after hotplug, suspend, or delayed display discovery | Keep event handling, retry logic, and the active polling backstop together. |
An inactive or FALLBACK output is counted as an external monitor | The internal panel can stay disabled after the last real external monitor is unplugged | Count only enabled non-internal outputs. |
| A binding names a shell action that is not registered | The key may run a fallback command or do nothing instead of opening the intended UI | Keep the binding target and shell shortcut registry aligned. |
| An application rule no longer matches the launched window | The application opens with the wrong layout, focus, size, or idle behavior | Keep launcher names, web-app focus matches, and window-rule matches aligned. |
| A workspace layout file is written without a valid active workspace | The layout toggle fails and no durable workspace choice is made | Validate the workspace id before saving and applying the layout. |
| A replacement gesture is added without unsetting the default gesture | Hyprland rejects the replacement and the intended touchpad action remains unavailable | Unset the existing gesture before assigning the new one. |
Key files
| File | Why to read it |
|---|---|
etc/sddm.conf.d/10-wayland.conf | Shows how SDDM enters the Wayland Hyprland session. |
config/hypr/hyprland.lua | Shows the boundary between Omarchy defaults and user configuration. |
config/hypr/monitors.lua | Shows how monitor-panel choices and user monitor overrides work together. |
config/hypr/bindings.lua | Shows the supported personal binding override and removal controls. |
config/hypr/input.lua | Shows the user input override surface for keyboards, pointers, touchpads, and gestures. |
default/hypr/omarchy.lua | Shows the main set of compositor, binding, input, window, and theme capabilities. |
default/hypr/autostart.lua | Shows which session helpers start when Hyprland becomes ready. |
default/hypr/bindings/tiling.lua | Shows the core window, workspace, group, and monitor controls. |
default/hypr/bindings/applications.lua | Shows the core and optional application launch controls. |
default/hypr/bindings/utilities.lua | Shows how desktop menus, shell panels, hardware actions, and capture tools reach users. |
default/hypr/helpers.lua | Shows how bindings choose between shell actions, launchers, and direct commands. |
default/hypr/apps/system.lua | Shows the shared treatment for floating tools, dialogs, screensavers, and idle behavior. |
default/hypr/apps/pip.lua | Shows how persistent overlay windows fit the desktop model. |
bin/omarchy-hyprland-monitor-watch | Shows the monitor and clamshell recovery loop. |
bin/omarchy-hyprland-monitor-external-active | Shows how the session identifies a real active external monitor. |
default/systemd/user/omarchy-fcitx5.service | Shows how a Wayland-dependent input service follows the graphical session. |
default/systemd/user/omarchy-sleep-lock.service | Shows how suspend protection attaches to the session. |
| install/…/enable-user-units.sh | Shows when shipped user services become active for a user. |
| docs/hyprland-configuration-and-display-control.md | Child page for detailed compositor and display configuration. |
| docs/shell-ui-and-desktop-interactions.md | Child page for menus, panels, shell actions, and desktop interaction flow. |