Repository navigation
feature: add msg restore-cmd: per-window relaunch command - #336
Open
Granitosaurus wants to merge 1 commit into
Open
Granitosaurus wants to merge 1 commit into
Granitosaurus wants to merge 1 commit into
Conversation
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
marked this pull request as ready for review
November 11, 2026 07:24
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-cmdto register its own resume command which is basicallykitty --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: