#event-listener #backup-restore #hyprland #restore #backup

bin+lib hypr-restore

A tool to restore opened applications for hyprland

4 releases

Uses new Rust 2024

0.2.0 Nov 27, 2025
0.1.2 Nov 19, 2025
0.1.1 Nov 19, 2025
0.1.0 Nov 18, 2025

#1699 in Command line utilities

MIT license

385KB
2K SLoC

hypr-restore

Hypr-restore is a tool that tracks your currently open applications and restores them after a reboot. It is primarily designed to run as a background systemd service, but it can also be used via the CLI. Hypr-restore listens to Hyprland’s IPC events and tracks opened, moved, and closed applications by writing their state into a database. After your system boots, the hypr-snapshot.service creates a snapshot of this database so your applications can be restored to the workspaces they were previously located on. After creating the snapshot, the service clears the database so it can begin tracking the new session.

TUI Demo

Table of Contents

Built With

Rust Edition

Requirements

  • Rust
  • Hyprland
  • hyprctl
  • systemd

Features

  • Tracks open applications in real time using Hyprland IPC
  • Restores applications after reboot
  • Provides both a command-line interface and a background service
  • Restores applications to their original workspaces
  • Provides a TUI to manage everything about hypr-restore [WIP]

Installation

Use the package manager cargo to install hypr-restore.

cargo install hypr-restore

Installing the crate only places the binaries. To fully set up hypr-restore, run:

hypr-restore install

This command sets up hypr-restore as a user service and creates everything it needs.

Uninstalling

To remove the changes made by hypr-restore install, run:

hypr-restore uninstall

After this you can use

cargo uninstall hypr-restore

This removes the binaries installed with cargo.

Usage

To run the event listener from your command line, use

hypr-restore listen

Note: Running this command manually while the hypr-restore.listener service is active will cause duplicate event tracking.

To snapshot the current database manually, use

hypr-restore snapshot

Normally this happens automatically for you after rebooting, via hypr-snapshot.service.

To restore the tracked applications, use

hypr-restore

To disable the hypr-listener.service, run

hypr-restore disable

To enable the hypr-listener.service, run

hypr-restore enable

To see a short description for each command, run

hypr-restore --help

To open the tui, run

hypr-restore tui

The update command is still WIP.

Ignoring Applications

If you have applications that are automatically launched after rebooting through your Hyprland config, you can add the hypr-restore disable before and the hypr-restore enable after your exec-once to prevent them from being tracked:

exec-once = hypr-restore disable
exec-once = $terminal
exec-once = hypr-restore enable

If you want to permanently ignore certain applications, you can add their class names in lowercase, obtained via:

hyprctl clients

into the ~/.local/share/hypr_restore/classes.ignore file. Changes to this file are automatically detected and reloaded.

TUI

The TUI currently allows you to:

  • Inspect the database and snapshot
  • View ignored classes and executable paths
  • Check the status and logs of the listener and snapshot services
  • (WIP) Create custom “workbenches”, which are predefined sets of applications/workspaces

Known issues

  • JetBrains IDEs: continuously send open/close window events, which may cause issues.

Roadmap

  • Implement a TUI to manage configuration, installation, and monitoring.
  • Implement the update command
  • Improve the command help section

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Dependencies

~14–29MB
~422K SLoC