From c9306d03b3fb928af1a677a7e3001e5cf9617da8 Mon Sep 17 00:00:00 2001 From: veypi Date: Mon, 14 Oct 2024 19:42:22 +0800 Subject: [PATCH] tmux conf --- linux/tmux.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/linux/tmux.md b/linux/tmux.md index 418a365..1ba58e3 100644 --- a/linux/tmux.md +++ b/linux/tmux.md @@ -25,3 +25,41 @@ tmux attach -t $1 ``` + +## .tmux.conf + +```bash +# ln -s $(pwd)/tmux.conf ~/.tmux.conf + +# 重新绑定prefix +unbind C-b +set -g prefix 'C-s' + +# 重新加载配置文件 +bind r source-file ~/.tmux.conf \; display-message "Config reloaded.." + +# 打开鼠标 调整面板 切换面板 +set-option -g mouse on + + + +set -g base-index 1 # 设置窗口的起始下标为1 +set -g pane-base-index 1 # 设置面板的起始下标为1 + + +unbind '"' +bind - splitw -v -c '#{pane_current_path}' # 垂直方向新增面板,默认进入当前目录 +unbind % +bind = splitw -h -c '#{pane_current_path}' # 水平方向新增面板,默认进入当前目录 + + + + +set -g status-interval 1 # 状态栏刷新时间 +set -g status-justify left # 状态栏列表左对齐 +setw -g monitor-activity on # 非当前窗口有内容更新时在状态栏通知 + +set -wg window-status-format " #I #W " # 状态栏窗口名称格式 +set -wg window-status-current-format " #I:#W#F " # 状态栏当前窗口名称格式(#I:序号,#w:窗口名称,#F:间隔符) +set -wg window-status-separator "" # 状态栏窗口名称之间的间隔 +```