How to set per session window options

27 views
Skip to first unread message

Terrace Williams

unread,
Aug 13, 2022, 3:24:01 PM8/13/22
to tmux-users
I'm trying to create a background session, and then set remain-on-exit so that all the windows in that session have the option set, but other sessions are unaffected:

tmux new-session -d -s home -c home -n cmd

tmux set-option -t home remain-on-exit on

But from what I'm reading remain-on-exit can't be set on a session, and setting it globally isn't what I want. Is there a way to make it so that only my home session will keep panes open after exit?

Nicholas Marriott

unread,
Aug 14, 2022, 2:56:00 AM8/14/22
to Terrace Williams, tmux-users
Hi

You should be able to use a session hook to set it on each new window in the session.

--
You received this message because you are subscribed to the Google Groups "tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/e43e9642-c101-42c6-a878-912743788c3dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages