From ca77549c5642dd241c8c3b8613ea4fbecec7376f Mon Sep 17 00:00:00 2001 From: goodhumored Date: Wed, 31 Jul 2024 00:30:12 +0300 Subject: [PATCH] tmux resurrect, continuum and vim navigator --- .gitmodules | 9 +++++++++ .tmux.conf | 22 ++++++++++------------ .tmux/plugins/tmux-continuum | 1 + .tmux/plugins/tmux-resurrect | 1 + .tmux/plugins/vim-tmux-navigator | 1 + 5 files changed, 22 insertions(+), 12 deletions(-) create mode 160000 .tmux/plugins/tmux-continuum create mode 160000 .tmux/plugins/tmux-resurrect create mode 160000 .tmux/plugins/vim-tmux-navigator diff --git a/.gitmodules b/.gitmodules index 323e94b..404f8b6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,12 @@ [submodule ".tmux/plugins/tmux-yank"] path = .tmux/plugins/tmux-yank url = https://git::@github.com/tmux-plugins/tmux-yank +[submodule ".tmux/plugins/tmux-continuum"] + path = .tmux/plugins/tmux-continuum + url = https://git::@github.com/tmux-plugins/tmux-continuum +[submodule ".tmux/plugins/tmux-resurrect"] + path = .tmux/plugins/tmux-resurrect + url = https://git::@github.com/tmux-plugins/tmux-resurrect +[submodule ".tmux/plugins/vim-tmux-navigator"] + path = .tmux/plugins/vim-tmux-navigator + url = https://git::@github.com/christoomey/vim-tmux-navigator diff --git a/.tmux.conf b/.tmux.conf index 18a14b9..00c8bf3 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -45,24 +45,12 @@ set -g @override_copy_command 'xclip -i -selection clipboard' set -g @yank_selection 'clipboard' set -as terminal-features ',*:clipboard' -# Vim style pane selection -bind h select-pane -L -bind j select-pane -D -bind k select-pane -U -bind l select-pane -R - # 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 -# 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 - # Shift arrow to switch windows bind -n S-Left previous-window bind -n S-Right next-window @@ -71,6 +59,15 @@ bind -n S-Right next-window bind -n M-H previous-window bind -n M-L next-window +# vim tmux navigator +set -g @plugin 'christoomey/vim-tmux-navigator' + +set -g @plugin 'tmux-plugins/tmux-resurrect' # persistant tmux sessions +set -g @plugin 'tmux-plugins/tmux-continuum' # auto-save sessions + +set -g @resurrect-capture-pane-contents 'on' +set -g @continuum-restore 'on' + # Dracula theme # available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, tmux-ram-usage, network, network-bandwidth, network-ping, ssh-session, attached-clients, network-vpn, weather, time, mpc, spotify-tui, playerctl, kubernetes-context, synchronize-panes set -g @plugin 'dracula/tmux' @@ -91,5 +88,6 @@ set -g @dracula-show-left-sep \uE0C0 # for right symbol (can set any symbol you like as separator) set -g @dracula-show-right-sep \uE0B2 + # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run -b '~/.tmux/plugins/tpm/tpm' diff --git a/.tmux/plugins/tmux-continuum b/.tmux/plugins/tmux-continuum new file mode 160000 index 0000000..0698e8f --- /dev/null +++ b/.tmux/plugins/tmux-continuum @@ -0,0 +1 @@ +Subproject commit 0698e8f4b17d6454c71bf5212895ec055c578da0 diff --git a/.tmux/plugins/tmux-resurrect b/.tmux/plugins/tmux-resurrect new file mode 160000 index 0000000..cff343c --- /dev/null +++ b/.tmux/plugins/tmux-resurrect @@ -0,0 +1 @@ +Subproject commit cff343cf9e81983d3da0c8562b01616f12e8d548 diff --git a/.tmux/plugins/vim-tmux-navigator b/.tmux/plugins/vim-tmux-navigator new file mode 160000 index 0000000..5b3c701 --- /dev/null +++ b/.tmux/plugins/vim-tmux-navigator @@ -0,0 +1 @@ +Subproject commit 5b3c701686fb4e6629c100ed32e827edf8dad01e