aboutsummaryrefslogtreecommitdiff
path: root/src/config/files/shell/.tmux.conf
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/files/shell/.tmux.conf')
-rw-r--r--src/config/files/shell/.tmux.conf28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/config/files/shell/.tmux.conf b/src/config/files/shell/.tmux.conf
index 2896f30..0fa8ec6 100644
--- a/src/config/files/shell/.tmux.conf
+++ b/src/config/files/shell/.tmux.conf
@@ -53,8 +53,34 @@ set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-option -g word-separators "!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~"
+set-option -g renumber-windows on
+
+bind '"' split-window -c "#{pane_current_path}"
+bind % split-window -h -c "#{pane_current_path}"
+unbind -T copy-mode-vi MouseDragEnd1Pane
+# Linux only
+# Linux only
+set -g mouse on
+bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
+bind -n WheelDownPane select-pane -t= \; send-keys -M
+bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
+bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
+bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
+bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
+bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
+
+# To copy, left click and drag to highlight text in yellow,
+# once you release left click yellow text will disappear and will automatically be available in clibboard
+# # Use vim keybindings in copy mode
+setw -g mode-keys vi
+# Update default binding of `Enter` to also use copy-pipe
+unbind -T copy-mode-vi Enter
+bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
+bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
+set -g default-terminal "xterm-256color"
+set -ga terminal-overrides ",xterm-256color:Tc"
+
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-strategy-nvim 'session'
run '~/.tmux/plugins/tpm/tpm'
-