Skip to content

Feature idea: Window Restore — save and restore closed windows via keybindings #5426

@TimHerb2005

Description

@TimHerb2005

The Problem

On Omarchy, pressing SUPER+W closes a window permanently. If you accidentally close a browser window, a Terminal, or a PWA — it's gone. You have to reopen the app, navigate back to where you were, and potentially log in again.

The Idea

Replace SUPER+W with a smarter close that saves the window to a history stack. A second keybinding restores the last closed window.

This is particularly useful for:

  • Browser windows accidentally closed
  • PWAs (Teams, ChatGPT, etc.) where state matters
  • Any app where re-navigating is annoying

Implementation

I built this as an AUR package and have been running it on Omarchy for a while:

Keybindings

Shortcut Action
SUPER+W Close window (saved to history)
SUPER+R Restore last closed window
SUPER+SHIFT+R Restore all closed windows
SUPER+ALT+R Pick window from a menu
SUPER+CTRL+R Settings
SUPER+ALT+W Close permanently (original killactive behavior)

Two modes

Relaunch (default): kills the process, relaunches on restore — low memory, works for all apps.

Hide: moves the window to an invisible workspace — full state preserved, YouTube keeps playing, instant restore.

Everything is opt-in and reversible

The feature is packaged separately (omarchy-window-restore-git on AUR) so it doesn't affect anyone who doesn't install it. An uninstall command removes all scripts, keybindings and cache files completely.

PR

I've also opened a PR (#5425) that adds omarchy-install-window-restore to Omarchy's installer scripts, following the same pattern as omarchy-install-tailscale, omarchy-install-vscode, etc. This would make it installable from the Omarchy menu.

Happy to discuss the approach or adjust anything to fit Omarchy's conventions better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions