Never lose a closed window again on Omarchy.
Replaces SUPER+W with a smarter close that saves windows to a history stack β so you can restore them with SUPER+R.
Works for all apps: browser windows, PWAs (Teams, ChatGPT, etc.), terminals, editors, and more.
π Full documentation in the Wiki β Troubleshooting Β· App Compatibility Β· FAQ Β· Code Docs
All keybindings are automatically listed in Omarchy's built-in keybinding menu (SUPER+K).
| Shortcut | Action |
|---|---|
SUPER+W |
Close window (saved to history) |
SUPER+ALT+W |
Close window permanently (no history, cannot be restored) |
SUPER+R |
Restore the last closed window |
SUPER+SHIFT+R |
Restore all closed windows at once |
SUPER+ALT+R |
Pick window to restore from a menu |
SUPER+D |
Settings menu (mode, max windows, exclusions, workspace, bug report) |
Switch between modes anytime via SUPER+D β Mode.
SUPER+W kills the window and saves the launch command. SUPER+R restarts the app fresh.
- β Low memory usage (process is gone)
- β App content is lost (browser tabs, unsaved state)
- π‘ Browsers can recover tabs via built-in session restore
SUPER+W moves the window to an invisible workspace. The process keeps running. SUPER+R brings it back exactly as it was.
- β Full state preserved β YouTube keeps playing, tabs stay open
- β Instant restore (no relaunch delay)
- β Uses more RAM (process stays alive)
Note: Switching from Hide β Relaunch mode will close all currently hidden windows.
The settings menu has three items:
| Item | Description |
|---|---|
| Mode | Toggle between Relaunch and Hide mode |
| β Settings | Open sub-menu with all configuration options |
| π Create bug report | Generate a bug report file in ~/Downloads/ |
| Option | Description |
|---|---|
| Max windows | Set how many windows are kept in history (default: 5, min: 1) |
| Exclusion list | Exclude specific apps from history (e.g. terminals) |
| Pause media on close | Pause media players when a window is closed/hidden (default: on) |
| Notifications | Enable or disable desktop notifications (default: on) |
| Hide workspace | The workspace number used to hide windows in Hide mode (default: 99) |
Navigate back with ESC at any menu level.
Apps on the exclusion list are closed normally but not saved to history. Useful for apps you never want to restore.
org.omarchy.btop (the system monitor) is excluded by default.
To add an app, open SUPER+D β β Settings β Exclusion list and either:
- Pick from open windows β select any currently open app
- Enter app ID manually β type the window class directly
Run either of these commands:
# Class of the currently focused window
hyprctl activewindow -j | jq '.class'
# Classes of all open windows
hyprctl clients -j | jq -r '.[].class'Common examples:
| App | Window class |
|---|---|
| Chromium | chromium |
| VS Code | code |
| Alacritty | Alacritty |
| Spotify | spotify |
| btop (Omarchy) | org.omarchy.btop |
| Teams (PWA) | chrome-teams.cloud.microsoft__-Default |
When you press SUPER+W:
- The window class is checked against the exclusion list
- If not excluded, the window is saved to history
- In Relaunch mode: window is killed, launch command stored
- In Hide mode: window is moved silently to the hide workspace (invisible, process stays alive)
For Chromium-based apps, the window class is used to identify the correct launch command (not the PID, since all Chromium windows share one process):
class = chromiumβomarchy-launch-browserclass = chrome-teams.cloud.microsoft__-Defaultβomarchy-launch-webapp https://teams.cloud.microsoft/
Note (Relaunch mode): App content (e.g. browser tabs) is not preserved β the app simply relaunches. For browsers, built-in session restore will recover tabs.
- Omarchy (Hyprland-based)
- Python 3.10+
- Omarchy's built-in menu (
omarchy-menu-select/omarchy-menu-input, included with every Omarchy install, used for the picker and settings menus)
git clone https://github.com/TimHerb2005/omarchy-window-restore.git
cd omarchy-window-restore
bash install.shInstall via any AUR helper:
yay -S omarchy-window-restore-gitThen activate for your user:
omarchy-install-window-restoreOr via the Omarchy Menu: Install β AUR β type omarchy-window-restore-git, then run omarchy-install-window-restore in a terminal afterwards.
Both options:
- Copy scripts to
~/.local/bin/ - Add keybindings to
~/.config/hypr/bindings.lua(Omarchy "Quattro"/Hyprland 0.56+) orbindings.conf(older Omarchy), detected automatically - Hyprland reloads the config automatically β no restart needed
On Quattro, SUPER+D/SUPER+ALT+R can open native Quickshell overlays instead of the omarchy-menu-select/omarchy-menu-input menus above β same functionality, themed like the rest of the system, plus a "Window Restore" entry in the Omarchy menu. Install the base tool first (either option above), then:
bash plugin/extras/install.shSee plugin/README.md for details and how to uninstall it.
bash uninstall.shRemoves all scripts, keybindings and the history cache. SUPER+W returns to its default behavior.
~/.local/bin/
βββ hypr-close-window # SUPER+W: save to history/hide, then close
βββ hypr-restore-window # SUPER+R: restore last window
βββ hypr-restore-all # SUPER+SHIFT+R: restore all windows
βββ hypr-restore-picker # SUPER+ALT+R: pick window to restore (menu)
βββ hypr-restore-settings # SUPER+D: settings menu
~/.cache/
βββ hypr-window-history.json # Relaunch mode history (max N entries)
βββ hypr-restore-hidden.json # Hide mode address list (max N entries)
βββ hypr-restore-mode # Current mode: "relaunch" or "hide"
βββ hypr-restore-config.json # Settings: max_windows, excluded_classes, hide_workspace, ...
PolyForm Noncommercial License 1.0.0 β free for personal and non-commercial use, commercial use is not permitted.
