Skip to main content

Listed in the Omarchy plugin store

omarchy-last-session

Session restore for Omarchy (Arch Linux with Hyprland): saves the windows you have open and brings them back after a reboot, shutdown, logout or crash, each on the workspace and monitor it was on. Python standard library only, no compositor patches, no extra daemons.

omarchy-last-session screenshot

The challenge

Hyprland has no session restore: after a reboot or a crash every window is gone, and most apps only remember their own state once someone reopens them. Bringing a desktop back means knowing which windows were open and where, and how to launch each app so it lands in the same place, with only window classes, titles and process trees to go on.

My role

Sole author. Wrote the Python plugin and its service entry for the Omarchy shell: a snapshot saved within seconds of every window change, and a restore pass on login that launches each app, waits for its windows and pairs them with the saved ones by class and title. Per-app handling covers terminals (reopened in their last directory, with the TUI they were running), Chromium browsers (made to restore their tabs after a kill) and apps that reopen their own windows. The config is an INI file written with every default and a comment per key. Unit tests per module, plus live tests on CI.

Result

Listed in the Omarchy plugin store. Windows come back on their workspace and monitor with floating geometry, groups, fullscreen and pinned state intact; terminals reopen where they were and browsers keep their tabs.

Built with

  • Python
  • Linux
  • Hyprland
  • Omarchy
  • Plugin

I'm available for full-time remote work in EU timezones. Happy to talk through anything here in more detail.

Get in touch