How to start tmux with several windows in different directories?

后端 未结 5 1227
一个人的身影
一个人的身影 2021-01-30 03:42

I want to use a script to open a tmux session with 6 windows, each in a different directory. I started with a script I found and tried this first:

tmux new-sessi         


        
5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-30 03:58

    For thous who don't install ruby tmuxp is available in Python and supports both Teamocil and Tmuxinator style configuration files (in both yaml and json).

    • Source https://github.com/tony/tmuxp
    • Docs http://tmuxp.readthedocs.io/en/latest/
    • Pypi https://pypi.python.org/pypi/tmuxp/1.0.0

    Not to mention there is a very sweet library behind it all https://github.com/tony/libtmux


     pip install --user tmuxp
    

    add ~/.local/bin/ to your $PATH for python user install programs

    -

    # ~/.tmuxp/workbench.yaml
    session_name: workbench
    windows:
      - name: workbench
        layout: main-vertical
        panes:
          - vim
          - pane
          - pane
    

    -

     tumxp load workbench
    

提交回复
热议问题