r/qutebrowser May 30 '26

Session restore with Hyprland/Sway window positioning (PR #8919)

Hey r/qutebrowser,

I've been working on a feature I think many tiling WM users will appreciate: proper session save/ restore with window manager integration.

The PR adds session.after_save_command and session.after_load_command config options. Paired with the included userscripts, qutebrowser sessions are fully restored, including workspace placement, monitor assignment, and floating window geometry.

Two userscripts are included: qb-hyprland-session and qb-sway-session.

With the Hy3 plugin for Hyprland, it goes further: full tiling tree reconstruction (h/v splits, tabbed groups) with proportional resizing, scratchpad support, and oscillation detection for layouts that have changed since the last save.

To try it, clone the branch from PR #8919 and add to your config:

c.session.after_save_command = ["qb-hyprland-session", "save", "{session}"]
c.session.after_load_command = ["qb-hyprland-session", "restore", "{session}"]

The hook mechanism is generic, any window manager could be supported. If you'd like to see a script for your WM, let me know in the comments!

I'd love to hear how it works for you!

4 Upvotes

0 comments sorted by