refactor: Update tmux configuration
• Change prefix key to C-a and bind reload to r • Remove Catppuccin theme configuration • Add Tokyo Night theme and update plugin list • Change vertical/horizontal split bindings to v/h • Add lazygit popup binding y
This commit is contained in:
1
tmux/.gitignore
vendored
Normal file
1
tmux/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
plugins/
|
||||
@@ -3,10 +3,18 @@ set-option -sa terminal-overrides ",xterm*:Tc"
|
||||
#Enable mouse
|
||||
set -g mouse on
|
||||
|
||||
# Set prefix
|
||||
unbind C-b
|
||||
set -g prefix C-a
|
||||
bind C-a send-prefix
|
||||
# Enable focus-events
|
||||
# https://www.reddit.com/r/neovim/comments/1l4tubm/copy_last_yanked_text_to_clipboard_on_focuslost/
|
||||
set -g focus-events on
|
||||
|
||||
# Allow default copy and pasting behaviour
|
||||
set -s set-clipboard external
|
||||
|
||||
# History size
|
||||
set -g history-limit 10000
|
||||
|
||||
# Allow config relaoding with <C-b> r
|
||||
bind r source-file ~/.config/tmux/tmux.conf
|
||||
|
||||
# Shift Alt vim keys to switch windows
|
||||
bind -n M-H previous-window
|
||||
@@ -19,22 +27,6 @@ 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
|
||||
bind-key -T copy-mode-vi Y capture-pane
|
||||
|
||||
# Use catppuccin mocha
|
||||
set -g @catppuccin_flavour 'mocha'
|
||||
set -g @catppuccin_window_status_style "rounded"
|
||||
set -g status-right-length 100
|
||||
set -g status-left-length 100
|
||||
set -g status-left ""
|
||||
set -g status-right "#{E:@catppuccin_status_application}"
|
||||
set -agF status-right "#{E:@catppuccin_status_cpu}"
|
||||
set -ag status-right "#{E:@catppuccin_status_session}"
|
||||
set -ag status-right "#{E:@catppuccin_status_uptime}"
|
||||
set -agF status-right "#{E:@catppuccin_status_battery}"
|
||||
|
||||
# Split in the same cwd
|
||||
bind "\\" split-window -v -c '#{pane_current_path}'
|
||||
bind "|" split-window -h -c '#{pane_current_path}'
|
||||
|
||||
# Start windows and panes at index 1, not 0
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
@@ -44,13 +36,33 @@ set-option -g renumber-windows on
|
||||
# Toggle sincrosnize panes
|
||||
bind "S" setw synchronize-panes
|
||||
|
||||
# Split in the same cwd
|
||||
bind "v" split-window -v -c '#{pane_current_path}'
|
||||
bind "h" split-window -h -c '#{pane_current_path}'
|
||||
|
||||
bind y display-popup \
|
||||
-d "#{pane_current_path}" \
|
||||
-w 80% \
|
||||
-h 80% \
|
||||
-E "lazygit"
|
||||
|
||||
# List of plugins
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||
set -g @plugin 'catppuccin/tmux'
|
||||
set -g @plugin 'tmux-plugin-yank'
|
||||
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
||||
set -g @plugin 'fabioluciano/tmux-tokyo-night'
|
||||
|
||||
set -g @theme_variation 'night'
|
||||
set -g @theme_plugins 'cpu,memory'
|
||||
set -g @theme_session_icon 'auto'
|
||||
# Show/hide status bar (on, off, 2, 3, 4, 5)
|
||||
set -g @theme_status 'on'
|
||||
# Status bar position (top, bottom)
|
||||
set -g @theme_status_position 'bottom'
|
||||
# Status bar alignment (left, centre, right)
|
||||
set -g @theme_status_justify 'centre'
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
|
||||
Reference in New Issue
Block a user