From 2ebe2274e9874c209c40874570b1216364909906 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Thu, 8 Apr 2021 17:54:44 +0200 Subject: [PATCH] Update tmux configuration --- tmux.conf | 41 ++++++++++++++++++++++------------------- zshrc | 1 + 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/tmux.conf b/tmux.conf index da213fa..6eeb691 100644 --- a/tmux.conf +++ b/tmux.conf @@ -38,30 +38,33 @@ bind-key M-h resize-pane -L bind-key M-l resize-pane -R # Vim style pane selection -bind h select-pane -L -bind j select-pane -D -bind k select-pane -U -bind l select-pane -R +bind-key h select-pane -L +bind-key j select-pane -D +bind-key k select-pane -U +bind-key l select-pane -R # Use Alt-vim keys without prefix key to switch panes -bind -n M-h select-pane -L -bind -n M-j select-pane -D -bind -n M-k select-pane -U -bind -n M-l select-pane -R +bind-key -n M-h select-pane -L +bind-key -n M-j select-pane -D +bind-key -n M-k select-pane -U +bind-key -n M-l select-pane -R # Use Alt-arrow keys without prefix key to switch panes -bind -n M-Left select-pane -L -bind -n M-Right select-pane -R -bind -n M-Up select-pane -U -bind -n M-Down select-pane -D +bind-key -n M-Left select-pane -L +bind-key -n M-Right select-pane -R +bind-key -n M-Up select-pane -U +bind-key -n M-Down select-pane -D # Shift arrow to switch windows -bind -n S-Left previous-window -bind -n S-Right next-window -bind -n C-S-Left swap-window -t -1\; select-window -t -1 -bind -n C-S-Right swap-window -t +1\; select-window -t +1 +bind-key -n S-Left previous-window +bind-key -n S-Right next-window +bind-key -n C-S-Left swap-window -t -1\; select-window -t -1 +bind-key -n C-S-Right swap-window -t +1\; select-window -t +1 -bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' +# TODO: this breaks stuff, why? +#bind-key -n C-[ copy-mode -bind -n C-S-K send-keys -R \; clear-history -bind r source-file ~/.tmux.conf \; display "Reloading config..." +bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' + +bind-key -n C-S-K send-keys -R \; clear-history +bind-key r source-file ~/.tmux.conf \; display "Reloading config..." diff --git a/zshrc b/zshrc index 499512d..04defc8 100644 --- a/zshrc +++ b/zshrc @@ -84,6 +84,7 @@ alias sk="setkeys" alias sysc="systemctl" alias tm="tmux attach" alias tmd="tmux new -s default || tmux attach -t default" +alias tmls="tmux list-sessions" alias tms="tmuxsess" alias wg="sudo wg" alias wgdown="sudo wgdown"