Session persistence for Hyprland. Saves your open applications and puts them back on the right workspaces after a reboot.
- Resolves launch commands from
.desktopfiles, Flatpak cgroups or/proc - Saves sessions as human-readable TOML
- Restores apps to their original workspaces with floating window geometry
- Reconstructs tiling layouts from saved window positions (dwindle and master layouts)
Arch Linux (AUR):
paru -S hyprresume # or yay, etc.From source:
cargo install --path .Add to your hyprland.conf:
exec-once = hyprresume
This starts the daemon, which restores your previous session, tracks window changes and saves periodically. It also saves on logout/shutdown via SIGTERM.
hyprresume save [name] # snapshot current session
hyprresume restore [name] # restore a saved session
hyprresume list # list saved sessions
hyprresume delete <name> # delete a session
hyprresume resolve <class> # show what command a window class maps to
hyprresume status # show daemon/session infoUse -v for info logs, -vv for debug, -vvv for trace.
Place a config file at ~/.config/hypr/hyprresume.toml. All fields are optional; defaults are sane.
[general]
save_interval = 120 # seconds between auto-saves
session_dir = "~/.local/share/hyprresume"
restore_on_start = true
per_window_launch = true # one process per window, not per unique app
restore_geometry = true # restore floating window position/size
restore_layout = true # reconstruct tiling layout (dwindle + master)
[rules]
exclude = [
"^xdg-desktop-portal.*",
"^org\\.kde\\.polkit.*",
]
# include = ["^firefox$", "^code$"] # allowlist mode
[overrides]
# "app.zen_browser.zen" = "flatpak run app.zen_browser.zen"
# "steam_app_.*" = "" # empty = skipA full example config is in assets/hyprresume.toml.
When restore_layout is enabled (the default), hyprresume saves every tiled window's position and size and reconstructs the layout on restore. The active layout is auto-detected via general:layout.
Dwindle — infers a BSP tree from saved geometry, replays it via layoutmsg preselect and applies exact split ratios with layoutmsg splitratio exact. Your Hyprland config should include preserve_split = true so that split directions are stable:
dwindle {
preserve_split = true
}
Master — infers orientation, master/stack partition and mfact from saved geometry. Windows are opened in the correct order (masters first, then stack) so the layout engine places them naturally.
Unsupported layouts fall back to simple restore: windows land on the correct workspaces but use Hyprland's default placement.
Requires Rust 1.94 (pinned in rust-toolchain.toml).
git clone https://github.com/IraSkyx/hyprresume.git
cd hyprresumeBuild and test:
make build # dev build
make test # run all tests
make lint # clippy (pedantic)
make format # rustfmtThe test suite runs entirely without a live Hyprland instance. It uses mock IPC sockets and simulated sessions.
BSD-3-Clause