0%

Tmuxinator安装配置

Tmuxinator是管理tmux的工具.

安装

1
gem install tmuxinator

准备

  1. 支持256色
    ~/.bashrc中增加export TERM=screen-256color-bce
  2. 新增配置
  • tmuxinator new blog
  • 配置文件在~/.tmuxinator

编辑配置

个人简单配置,将blog.conf修改为blog.yml

blog.confview raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# ~/.tmuxinator/blog.yml

name: blog
root: /data/blog

# Optional tmux socket
# socket_name: foo

# Runs before everything. Use it to start daemons etc.
# pre: sudo /etc/rc.d/mysqld start

# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions.
# pre_window: rbenv shell 2.0.0-p247

# Pass command line options to tmux. Useful for specifying a different tmux.conf.
# tmux_options: -f ~/.tmux.mac.conf

# Change the command to call tmux. This can be used by derivatives/wrappers like byobu.
# tmux_command: byobu

# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used.
# startup_window: logs

# Controls whether the tmux session should be attached to automatically. Defaults to true.
# attach: false

# Runs after everything. Use it to attach to tmux with custom options etc.
# post: tmux -CC attach -t blog

windows:
- editor: vim /data/blog/source/_post/centos
- server: hexo serve
- cmd:

详细的配置请查看man tmuxinator,或者查看参考文档

参考文档

  1. http://hao.jobbole.com/tmuxinator/
  2. https://github.com/tmuxinator/tmuxinator/issues/84