Skip to content

Conversation

@coffemugtester
Copy link

re: issue - session can't load window

tmuxifier load-session $session-layout loads the windows specified in the layout --> expected behavior:

tmuxifier load-session $session-layout fails with message "no such window"; unless loading each window before loading the session --> current behavior

how to reproduce:
create session layout and create window layout
load session.

looking at debug logs:
it seems like loading the window directly, associates the window to the current session,
but when loading the session, the window layout is sourced, the set-option command needs to specify $session:$window

tmux set-option -t editor allow-rename off
no such window: window-name

@coffemugtester coffemugtester changed the title fix: add 'session:format' for set-option command in new_window function fix: specify 'session:window' for set-option command in new_window function Aug 18, 2025
Copy link

@KeithETruesdell KeithETruesdell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made these changes manually locally and tested it with a tmuxifier load-window and a tmuxifier load-session command, the session would load the window that was previously defined. This works great for me. Thank you!

@KeithETruesdell
Copy link

....so while using this fix, eveyrthing looks good....it works as intended where it will load windows that are defined and name them appropriately when you 'load-session'...BUT i just noticed that it is also renaming the window that I start on to be the same as the first window in that session.
In my case, I have 2 tmuxifier window layouts defined, v1 and v2.
I have a tmuxifier session defined as loading window for v1 and then loading window for v2.
As part of the window definition, I rename the window to what I want, which in this case is the v1 and v2.
If I am in a different session with a window named "test", when i run the command tmuxifier load-session myProject, it will start a new session (as intended), then create 2 windows per the window definitions and rename them, but then it will also rename that "test" window.

Something that needs to be played with a bit more, but I would still be ok with this, its better than an error. There could also be an issue with how I have things defined, though I don't think its any different than the examples.

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.

2 participants