|
|
@@ -1,77 +1,67 @@
|
|
|
-# sudo ln -s /usr/local/bin/tmux /usr/bin/tmux
|
|
|
-# set-option -sa terminal-overrides ",xterm*:Tc"
|
|
|
-# Dont forget to git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
|
|
-set -g default-terminal screen-256color
|
|
|
+set -g default-terminal "tmux-256color"
|
|
|
set -g mouse on
|
|
|
set -g xterm-keys on
|
|
|
+
|
|
|
unbind C-b
|
|
|
set -g prefix C-Space
|
|
|
bind C-Space send-prefix
|
|
|
|
|
|
set-option -g detach-on-destroy off
|
|
|
-# Vim style pane selection
|
|
|
+
|
|
|
+# Vim-style pane navigation
|
|
|
bind h select-pane -L
|
|
|
-bind j select-pane -D
|
|
|
+bind j select-pane -D
|
|
|
bind k select-pane -U
|
|
|
bind l select-pane -R
|
|
|
|
|
|
-# Pane resizing (vim-like, Shift+HJKL)
|
|
|
+# Resize panes (Alt+HJKL)
|
|
|
bind -n M-h resize-pane -L 3
|
|
|
bind -n M-j resize-pane -D 3
|
|
|
bind -n M-k resize-pane -U 3
|
|
|
bind -n M-l resize-pane -R 3
|
|
|
|
|
|
-# Start windows and panes at 1, not 0
|
|
|
+# Window + pane indexing
|
|
|
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
|
|
|
-
|
|
|
-# Use Alt-arrow keys without prefix key to switch panes
|
|
|
-# bind -n M-H select-pane -L
|
|
|
-# bind -n M-L select-pane -R
|
|
|
-# bind -n M-J select-pane -U
|
|
|
-# bind -n M-K select-pane -D
|
|
|
+set -g renumber-windows on
|
|
|
|
|
|
-# Shift arrow to switch windows
|
|
|
-# bind -n S-Left previous-window
|
|
|
-# bind -n S-Right next-window
|
|
|
-
|
|
|
-# Shift Alt vim keys to switch windows
|
|
|
+# Window switching (Alt+Shift+H/L)
|
|
|
bind -n M-H previous-window
|
|
|
bind -n M-L next-window
|
|
|
|
|
|
-# set -g @catppuccin_flavour 'mocha'
|
|
|
+# vi-mode copy
|
|
|
+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
|
|
|
|
|
|
-set -g @plugin 'wfxr/tmux-power'
|
|
|
+# Split windows in current path
|
|
|
+bind '"' split-window -v -c "#{pane_current_path}"
|
|
|
+bind % split-window -h -c "#{pane_current_path}"
|
|
|
+
|
|
|
+# plugins live here (this matches reality)
|
|
|
+set-environment -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.config/tmux/plugins"
|
|
|
+
|
|
|
+# TPM + other plugins
|
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
|
set -g @plugin 'christoomey/vim-tmux-navigator'
|
|
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
|
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
|
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
|
|
-
|
|
|
-set -g @tmux_power_theme 'gold'
|
|
|
+set -g @plugin 'wfxr/tmux-power'
|
|
|
set -g @plugin 'wfxr/tmux-net-speed'
|
|
|
|
|
|
-# set vi-mode
|
|
|
-set-window-option -g mode-keys vi
|
|
|
-# keybindings
|
|
|
-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
|
|
|
-
|
|
|
-bind '"' split-window -v -c "#{pane_current_path}"
|
|
|
-bind % split-window -h -c "#{pane_current_path}"
|
|
|
-
|
|
|
-
|
|
|
+# tmux-power options (must be BEFORE sourcing)
|
|
|
+set -g @tmux_power_theme 'gold'
|
|
|
set -g @tmux_power_show_upload_speed true
|
|
|
set -g @tmux_power_show_download_speed true
|
|
|
set -g @tmux_power_show_web_reachable true
|
|
|
-# set -g @tmux_power_right_arrow_icon ''
|
|
|
-# set -g @tmux_power_left_arrow_icon ''
|
|
|
set -g @tmux_power_upload_speed_icon ''
|
|
|
set -g @tmux_power_download_speed_icon ''
|
|
|
set -g @tmux_power_prefix_highlight_pos 'R'
|
|
|
|
|
|
-run '~/.tmux/plugins/tpm/tpm'
|
|
|
+# TPM init
|
|
|
+run '~/.config/tmux/plugins/tpm/tpm'
|
|
|
+
|