tmux-python / tmuxp

🖥️ Session manager for tmux, build on libtmux.
https://tmuxp.git-pull.com/
MIT License
4.07k stars 231 forks source link

Multiple configs in single file #573

Open rightaway opened 4 years ago

rightaway commented 4 years ago

I'd like to have multiple configs in a single file, rather than having to spread them across multiple files. If a yaml file contains an array of objects, then tmuxp should load whichever of them matches, like tmuxp load first or tmuxp load second.

- session_name: first
  windows: ...
- session_name: second
  windows: ...

The config file can then be a single file under ~/.tmuxp/config.yml.

rightaway commented 4 years ago

Or even better the config file can just be ~/.tmuxp.yml. Or following the XDG specification it could be be ~/.config/tmuxp.yml.

lifeBalance commented 4 years ago

You can also have a custom tmuxp config directory by setting the TMUX_CONFIGDIR in your environment variables:

export TMUXP_CONFIGDIR=$HOME/.config/tmuxp
rightaway commented 4 years ago

With a single file there won't even be a need for a directory. Everything can be in a single file ~/.config/tmuxp.yml making configuration tmuxp even easier.

lifeBalance commented 4 years ago

Don't agree with you about the single file thing; I was just letting you know that if you want to keep your config files in an XDG-compliant directory you totally can.