hyprresurrect

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 1 Imported by: 0

README

hyprresurrect

hyprresurrect saves your currently open applications in hyprland and restores them on reboot (or at any point)

Why?

I started using hyprland. I wanted a way to restore my tiles and layout. I tried a few existing tools but wasn't happy, some would dump everything onto one workspace, or not care about multiple monitors, etc. So the natural course of action was to build my own :)

If you're reading this then this is still WIP! But mostly done. Just need the daemon, ✅group support, ✅persisting tile size/layout

Installation

AUR
not yet! sorry!
Go

Requires Go 1.27+

go install github.com/FillipdotS/hyprresurrect@latest

Usage

hyprresurrect save              # snapshot the current windows/layout
hyprresurrect restore           # restore the most recent snapshot
hyprresurrect restore --dry-run # prints the restore plan without actually executing it 
hyprresurrect version           # prints the installed version

Contributing

Feel free to contribute anything and everything! Just make sure it's tested and makes sense for this tool. Preferably make an issue beforehand so there's alignment.

Testing

Regular unit tests can be run via go test

E2E Tests

These require you to be running hyprland. They spawn a nested hyprland session that uses the real go build binary to run commands and checks via hyprctl clients -j if we got the intended results

HR_E2E=1 go test ./internal/e2e/

The nested session shows the name of the running test. To actually watch one go by, slow every step down:

HR_E2E=1 HR_E2E_SLOW=500ms go test ./internal/e2e/ -run TestRoundTrip

Todo (Roughly in order)

  • ✅ E2E testing hyprland via a nested session

  • ⬜ Autosave daemon

  • ⬜ Auto restore on reboot

  • ✅ Groups. Membership, tab order and the raised tab all round trip

  • ⬜ Terminal contents. i.e. "btop" or "herdr"

  • ✅ Remember tile sizes and layout.

  • ⬜ Named workspaces. Only numeric workspace ids are captured. Not sure this is needed

  • ⬜ Flatpak support.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package cmd implements the cli commands / flags of hyprresurrect
Package cmd implements the cli commands / flags of hyprresurrect
internal
hypr
Package hypr deals with connecting to the hyprland UNIX socket
Package hypr deals with connecting to the hyprland UNIX socket
restore
Package restore turns a snapshot back into a running session.
Package restore turns a snapshot back into a running session.
snapshot
Package snapshot builds the record of a session that restore later replays.
Package snapshot builds the record of a session that restore later replays.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL