feat(tmux): Minimal theme, minimal plugins, more Vim-my

This commit is contained in:
Pratik Tripathy
2025-11-23 18:14:13 +05:30
parent 24b2aacd92
commit 96d6e21727

View File

@@ -2,10 +2,10 @@
#========================================================
# Rename Session -> <ctrl-a> $
# Rename Tab -> <ctrl-a> ,
# Next/prev tab -> <ctrl-a> n/p
# H-split/V-split -> <ctrl-a> s/v
# Resize Pane -> <ctrl-a> leave alt -> h,j,k,l (repeat press)
# Switch Pane -> <ctrl-h,j,k,l>
# Next/prev tab -> <ctrl-a> n,p
# H-split/V-split -> <ctrl-a> s,v
# Resize Pane -> <ctrl-a> left,right,up,down (repeat press)
# Switch Pane -> <ctrl-a> h,j,k,l
# Enter copy mode -> <ctrl-a> [
# Exit copy mode -> <enter>
# Reload tmux.conf -> <ctrl-a> r
@@ -23,27 +23,36 @@ bind-key C-a send-prefix
# Kill current session with q
bind q confirm-before kill-session
# Intuitive split bindings to | & -
unbind %
bind s split-window -h
unbind '"'
bind v split-window -v
# Open panes in the current directory
# Intuitive split bindings to | & -
bind - split-window -v -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
# Use <leader> repeated(h,j,k,l)s to resize current pane
bind -r h resize-pane -L
bind -r l resize-pane -R
bind -r k resize-pane -U
bind -r j resize-pane -D
# <leader> h,j,k,l to move between panes
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# Use <leader> repeated(h,j,k,l)s to resize pane
bind -r Left resize-pane -L
bind -r Right resize-pane -R
bind -r Up resize-pane -U
bind -r Down resize-pane -D
# Use Vim Navigations to copy text from the NON-vim panes
# Enable Tmux copy mode with <leader>[ -> Then use Vim navigations
bind-key -T copy-mode-vi "v" send -X begin-selection
bind-key -T copy-mode-vi "y" send -X copy-selection
unbind -T copy-mode-vi MouseDragEnd1Pane # Enable mouse selection as well
setw -g mode-keys vi
# Use `v` to trigger selection
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Use `y` to yank current selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# Enable mouse selection as well
unbind -T copy-mode-vi MouseDragEnd1Pane
# From Tmux-sensible Plugin
bind C-p previous-window
@@ -60,8 +69,6 @@ set -g @resurrect-restore "C-r"
# OPTIONS
#========================================================
set -g set-clipboard on # Use system clipboard
setw -g mode-keys vi
set-window-option -g mode-keys vi
# From tmux-sensible plugin
set -g display-time 1000 # Display message for 1s
@@ -94,45 +101,35 @@ set -g default-terminal "${TERM}"
set-option -g default-terminal "xterm-256color"
set-option -sa terminal-overrides ",xterm*:Tc"
# Status at top
# Colors
gray_light="#D8DEE9"
gray_medium="#ABB2BF"
gray_dark="#3B4252"
green_soft="#A3BE8C"
blue_muted="#81A1c1"
cyan_soft="#88C0D0"
# Status-Bar Style
set -g status-position top
set -g status-left-length 100
set -g status-style "fg=${gray_light},bg=default"
set -g status-left "#[fg=${green_soft},bold] #S #[fg=${gray_light},nobold] |"
set -g window-status-current-format "#[fg=${cyan_soft},bold]  #[underscore]#I:#W"
set -g message-style "fg=${gray_light},bg=default"
set -g mode-style "fg=${gray_dark},bg=${blue_muted}"
set -g pane-border-style "fg=${gray_dark}"
set -g pane-active-border-style "fg=${gray_medium}"
#========================================================
# PLUGINS
#========================================================
run "$XDG_CONFIG_HOME/tmux/plugins/tpm/tpm" # Init Tmux Plugin Manager
set -g @plugin "christoomey/vim-tmux-navigator" # sync pane nav with Vim window nav
set -g @plugin "tmux-plugins/tmux-resurrect" # Persist sessions
set -g @plugin "tmux-plugins/tmux-continuum" # Auto save sessions every 15mins
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin "tmux-plugins/tmux-copycat"
set -g @plugin "catppuccin/tmux"
#========================================================
# PLUGINS Configurations
#========================================================
# Color schemes
set -g @catppuccin_flavour "mocha"
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " █"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator " "
set -g @catppuccin_status_right_separator_inverse "no"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_status_enable "yes"
set -g @catppuccin_window_status_icon_enable "yes"
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{pane_current_path}"
set -g @catppuccin_status_modules_right "session directory"
set -g @plugin "tmux-plugins/tpm"