Skip to content

feature: add msg restore-cmd: per-window relaunch command - #336

Open
Granitosaurus wants to merge 1 commit into
malbiruk:mainfrom
Granitosaurus:restore-cmd
Open

Granitosaurus wants to merge 1 commit into
malbiruk:mainfrom
Granitosaurus:restore-cmd

Conversation

@Granitosaurus

@Granitosaurus Granitosaurus commented Nov 9, 2026 •

Copy link
Copy Markdown

Working on a feature that allows to override window restore command for when window is restored from a placeholder which can restore some window states like claude code session:

2026-11-09_18-24-53.mp4

in this example I open a claude code in kitty where claude has a hook to call new driftwm msg restore-cmd to register its own resume command which is basically kitty --directory "$cwd" claude --resume "$session". Once the resume session is registered I close the window with suspend-window and show that resume correctly restores kitty terminal with claude session.

remaining:

  • full pre-pr review
  • dog food the UX. I'm quite happy as is right now but want to explore more how it works with different programs

A suspended window relaunches from its .desktop Exec=, which reopens the
bare app (an empty terminal). `driftwm msg restore-cmd -- <argv>` stores a
command on a window instead; it is saved in session.json, kept on the
stand-in across suspend/close, and handed to the window that adopts the slot.
Without --id/--app-id the target is the window owning an ancestor of the
caller, so a script running inside the window can set its own.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Granitosaurus
Granitosaurus marked this pull request as ready for review November 11, 2026 07:24
@Granitosaurus Granitosaurus changed the title WIP feature: add msg restore-cmd: per-window relaunch command feature: add msg restore-cmd: per-window relaunch command Nov 11, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant