-
Notifications
You must be signed in to change notification settings - Fork 234
-
I was attempting to create a default tmuxp.json file when it doesn't exists on a specific location. Then make tmuxp freeze overwrite that file. What I didn't realize was that all the default values, initially set, are now gone of course, it's a complete new file.
For my use case it would be nice if the settings like environment and before_script, which are not available in the current freezed session would persist.
There are probably better ways to do this, like sending tmux keys etc.
You're welcome to think with me...
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
A solution for the environment is to set the environment first and then load with the append option, where the sessionName is the same as configured in the yaml/json file. You can also start with a dedicated server socket
tmux -L customSocketName new -e FOO=bar -s sessionName tmuxp load -L customSocketName --append file.tmuxp.json
Beta Was this translation helpful? Give feedback.
All reactions
-
This doesn't work when the session is created by tmux first it seems.
I would like to create a detached session with tmux and then attach and append to that session with a tmuxp configuration / json file.
tmux -L customSocketName new -e FOO=bar -s sessionName
tmuxp load -L customSocketName --append file.tmuxp.json
raise exc.TmuxSessionExists(
libtmux.exc.TmuxSessionExists: Session named sessionName exists
Beta Was this translation helpful? Give feedback.