跳到主要内容

tmux 美化

信息

tmux 是一个终端复用工具,可以在一个终端中同时运行多个终端

安装 tmux

sudo apt install tmux
提示

mac os 需先安装 homebrew

安装 tmux 主题

dracula 主题

  1. 首先安装 tpm
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
vim ~/.tmux.conf

填入以下内容

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin '[email protected]:user/plugin'
# set -g @plugin '[email protected]:user/plugin'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
  1. 加载配置
# type this in terminal if tmux is already running
tmux source ~/.tmux.conf
  1. 安装 dracula 主题 在~/.tmux.conf 填入以下内容
set -g @plugin 'dracula/tmux'
set -g @dracula-plugins "cpu-usage gpu-usage ram-usage network-bandwidth"
set -g @dracula-network-bandwidth-colors "pink dark_gray"
set -g @dracula-show-powerline true
set -g @dracula-show-flags true
set -g @dracula-border-contrast true
  1. Activating theme

    1. Make sure run -b '~/.tmux/plugins/tpm/tpm' is at the bottom of your .tmux.conf
    2. Run tmux
    3. Use the tpm install command: prefix + I (default prefix is ctrl+b)

tmux 启用鼠标操作

在~/.tmux.conf 填入以下内容

set -g mouse on