diff --git a/common/.config/tmux/tmux.conf b/common/.config/tmux/tmux.conf index bfcdfa6..226c4d9 100644 --- a/common/.config/tmux/tmux.conf +++ b/common/.config/tmux/tmux.conf @@ -2,11 +2,11 @@ #======================================================== # Rename Session -> $ # Rename Tab -> , -# Next/prev tab -> n/p -# H-split/V-split -> s/v -# Resize Pane -> leave alt -> h,j,k,l (repeat press) -# Switch Pane -> -# Enter copy mode -> [ +# Next/prev tab -> n,p +# H-split/V-split -> s,v +# Resize Pane -> left,right,up,down (repeat press) +# Switch Pane -> h,j,k,l +# Enter copy mode -> [ # Exit copy mode -> # Reload tmux.conf -> 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 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 +# 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 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 [ -> 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"