From 2f01d992523232c027f183befb8c13f916e6fe6f Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Mon, 30 Sep 2024 07:44:01 +0200 Subject: [PATCH] Update tmux.conf --- tmux.conf | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tmux.conf b/tmux.conf index e5fb18e..824b839 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1,6 +1,7 @@ # Plugind set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'thewtex/tmux-mem-cpu-load' +set -g @plugin 'tmux-plugins/tmux-yank' # Install `tpm` if needed. if "test ! -d ~/.tmux/plugins/tpm" \ @@ -9,6 +10,14 @@ if "test ! -d ~/.tmux/plugins/tpm" \ # Activate the plugins. run -b "~/.tmux/plugins/tpm/tpm" +set -g mouse on + +# Start windows and panes at 1, not 0 +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 + # VIM and FZF navigation bindings is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" is_fzf="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?fzf$'" @@ -18,6 +27,10 @@ bind -n C-k run "($is_vim && tmux send-keys C-k) || ($is_fzf && tmux send-keys C bind -n C-l run "($is_vim && tmux send-keys C-l) || tmux select-pane -R" bind -n 'C-\' if-shell "$is_vim" "send-keys C-\\" "select-pane -l" +# Split pane bindings +bind '"' split-window -v -c "#{pane_current_path}" +bind % split-window -h -c "#{pane_current_path}" + set-option -g status-position bottom set-option -g default-terminal "screen-256color" set-option -sa terminal-features ',xterm-256color:RGB' @@ -43,5 +56,4 @@ set -g window-active-style 'bg=default,fg=white' set -g pane-border-style 'bg=default,fg=#0c0c0c' set -g pane-active-border-style 'bg=default,fg=#afd787' -set -g mouse on -set -g mouse-select-pane on +