From 1e3def5c7832572877a0f41432bab5655ea4f6bf Mon Sep 17 00:00:00 2001 From: seraphim <18ycm9tx@anonaddy.me> Date: Sat, 8 Aug 2026 17:21:01 +0700 Subject: upd --- tmux/.config/tmux/tmux.conf | 74 +++++++++++++++++++++++++++++++++++++++++++++ tmux/.tmux.conf | 51 ------------------------------- 2 files changed, 74 insertions(+), 51 deletions(-) create mode 100644 tmux/.config/tmux/tmux.conf delete mode 100644 tmux/.tmux.conf (limited to 'tmux') diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf new file mode 100644 index 0000000..e4de091 --- /dev/null +++ b/tmux/.config/tmux/tmux.conf @@ -0,0 +1,74 @@ +# Enable 256 color support +set -g default-terminal "tmux-256color" +set -ga terminal-overrides ",*:RGB" + +# Enable mouse support +set -g mouse on + +# Enable clipboard +set -g set-clipboard on +# Change prefix from Ctrl-b to Ctrl-a +unbind C-b +set -g prefix C-a +bind-key C-a send-prefix + +# Vim-style pane navigation +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +# Split windows (opens in same directory) +unbind % +bind | split-window -h -c "#{pane_current_path}" + +unbind '"' +bind - split-window -v -c "#{pane_current_path}" + +# Reload config +unbind r +bind r source-file $HOME/.config/tmux/tmux.conf + +# Alt+hjkl to switch panes without prefix +bind -n M-h select-pane -L +bind -n M-j select-pane -D +bind -n M-k select-pane -U +bind -n M-l select-pane -R + +# Alt+number to select window +bind -n M-1 select-window -t 1 +bind -n M-2 select-window -t 2 +bind -n M-3 select-window -t 3 +bind -n M-4 select-window -t 4 +bind -n M-5 select-window -t 5 +bind -n M-6 select-window -t 6 +bind -n M-7 select-window -t 7 +bind -n M-8 select-window -t 8 +bind -n M-9 select-window -t 9 +# Statusline - current window +set -g window-status-current-format "#[fg=${thm_blue},bg=${thm_bg}] #I: #[fg=${thm_magenta},bg=${thm_bg}](✓) #[fg=${thm_cyan},bg=${thm_bg}]#(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) #[fg=${thm_magenta},bg=${thm_bg}]" + +# Statusline - other windows +set -g window-status-format "#[fg=${thm_blue},bg=${thm_bg}] #I: #[fg=${thm_fg},bg=${thm_bg}]#W" + +# Statusline - right side +set -g status-right "#[fg=${thm_blue},bg=${thm_bg},nobold,nounderscore,noitalics]#[fg=${thm_bg},bg=${thm_blue},nobold,nounderscore,noitalics] #[fg=${thm_fg},bg=${thm_gray}] #W #{?client_prefix,#[fg=${thm_magenta}],#[fg=${thm_cyan}]}#[bg=${thm_gray}]#{?client_prefix,#[bg=${thm_magenta}],#[bg=${thm_cyan}]}#[fg=${thm_bg}] #[fg=${thm_fg},bg=${thm_gray}] #S " + +# Statusline - left side (empty) +set -g status-left "" + +# Change from 0 based to 1 based because keyboard layout +set -g base-index 1 +set -g pane-base-index 1 +set-window-option -g pane-base-index 1 +set-option -g renumber-windows on + +# Vim-like copy/paste +set-window-option -g mode-keys vi +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle +bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel +unbind -T copy-mode-vi MouseDragEnd1Pane + + + diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf deleted file mode 100644 index c68b67e..0000000 --- a/tmux/.tmux.conf +++ /dev/null @@ -1,51 +0,0 @@ -unbind '"' -bind - split-window -v -c "#{pane_current_path}" - -# Reload config -unbind r -bind r source-file $HOME/.config/tmux/tmux.conf - -# Alt+hjkl to switch panes without prefix -bind -n M-h select-pane -L -bind -n M-j select-pane -D -bind -n M-k select-pane -U -bind -n M-l select-pane -R - -# Alt+number to select window -bind -n M-1 select-window -t 1 -bind -n M-2 select-window -t 2 -bind -n M-3 select-window -t 3 -bind -n M-4 select-window -t 4 -bind -n M-5 select-window -t 5 -bind -n M-6 select-window -t 6 -bind -n M-7 select-window -t 7 -bind -n M-8 select-window -t 8 -bind -n M-9 select-window -t 9 -# Statusline - current window -set -g window-status-current-format "#[fg=${thm_blue},bg=${thm_bg}] #I: #[fg=${thm_magenta},bg=${thm_bg}](✓) #[fg=${thm_cyan},bg=${thm_bg}]#(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) #[fg=${thm_magenta},bg=${thm_bg}]" - -# Statusline - other windows -set -g window-status-format "#[fg=${thm_blue},bg=${thm_bg}] #I: #[fg=${thm_fg},bg=${thm_bg}]#W" - -# Statusline - right side -set -g status-right "#[fg=${thm_blue},bg=${thm_bg},nobold,nounderscore,noitalics]#[fg=${thm_bg},bg=${thm_blue},nobold,nounderscore,noitalics] #[fg=${thm_fg},bg=${thm_gray}] #W #{?client_prefix,#[fg=${thm_magenta}],#[fg=${thm_cyan}]}#[bg=${thm_gray}]#{?client_prefix,#[bg=${thm_magenta}],#[bg=${thm_cyan}]}#[fg=${thm_bg}] #[fg=${thm_fg},bg=${thm_gray}] #S " - -# Statusline - left side (empty) -set -g status-left "" - -# Modes -set -g clock-mode-colour "${thm_blue}" -set -g mode-style "fg=${thm_blue} bg=${thm_black4} bold" -# Change from 0 based to 1 based because keyboard layout -set -g base-index 1 -set -g pane-base-index 1 -set-window-option -g pane-base-index 1 -set-option -g renumber-windows on - -# Vim-like copy/paste -set-window-option -g mode-keys vi -bind-key -T copy-mode-vi v send-keys -X begin-selection -bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle -bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel -unbind -T copy-mode-vi MouseDragEnd1Pane - -- cgit v1.2.3