dots/private_dot_config/tmux/tmux.conf
2025-06-10 17:30:22 +08:00

93 lines
2.2 KiB
Bash

set -g @black0 "#151515"
set -g @black1 "#1f1f1f"
set -g @black2 "#2e2e2e"
set -g @black3 "#424242"
set -g @white0 "#e8e3e3"
set -g @white1 "#bbb6b6"
set -g @red "#b66467"
set -g @yellow "#d9bc8c"
set -g @green "#8c977d"
set -g @aqua "#8aa6a2"
set -g @blue "#8da3b9"
set -g @purple "#a988b0"
# start with window 1 (instead of 0)
set -g base-index 1
# start with pane 1
set -g pane-base-index 1
# split panes using | and -, make sure they open in the same path
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# open new windows in the current path
bind c new-window -c "#{pane_current_path}"
# reload config file
bind r source-file ~/.config/tmux/tmux.conf
unbind p
bind p previous-window
# shorten command delay
set -sg escape-time 1
# don't rename windows automatically
set -g allow-rename off
# mouse control (clickable windows, panes, resizable panes)
set -g mouse on
# enable vi mode keys
set-window-option -g mode-keys vi
# set default terminal mode to 256 colors
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# allow focus events to get through to applications running in tmux
set -g focus-events on
# loud or quiet?
set -g visual-activity on
set -g visual-bell on
set -g visual-silence off
setw -g monitor-activity off
set -g bell-action none
# modes
setw -g clock-mode-colour green
setw -g mode-style 'fg=#{@black0} bg=#{@white0} bold'
# panes
set -g pane-border-style 'fg=#{@black2}'
set -g pane-active-border-style 'fg=#{@green}'
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=#{@black0} fg=#{@white0}'
set -g status-left '#{?client_prefix,#[fg=#{@purple}],#[fg=#{@black2}]} ■ '
set -g status-left-length 10
set -g status-right-style 'fg=#{@black0} bg=#{@blue} bold'
set -g status-right ' #{pane_current_path} '
setw -g window-status-current-style 'fg=#{@black0} bg=#{@green} bold'
setw -g window-status-current-format ' #I #W #F '
setw -g window-status-style 'fg=#{@white1} bg=#{@black1}'
setw -g window-status-separator ' '
setw -g window-status-format ' #I #W #F '
setw -g window-status-bell-style 'fg=#{@red} bg=terminal bold'
# messages
set -g message-style 'fg=#{@yellow} bg=terminal bold'