From 8fb440a727b68f14fefff45a85846b33e2f094f2 Mon Sep 17 00:00:00 2001 From: Artem Dolgiy Date: Tue, 31 Dec 2024 14:55:08 +0300 Subject: [PATCH] add tmux --- .config/tmux/tmux.conf | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index aa210f5..f28f968 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -14,11 +14,6 @@ ### GENERAL SETTINGS ### ######################## -set-option -g default-terminal "screen-256color" # Enable 256 colors in terminal -#set -g default-terminal 'tmux-256color' -#set -g default-terminal 'xterm-256color' -set -ga terminal-overrides ',*:Tc' # Enable TrueColors -set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' # Support cursor shape changes set -g base-index 1 # Start window numbering at 1 set -g pane-base-index 1 # Start pane numbering at 1 set -g aggressive-resize on # Automatically resize panes on window size change @@ -36,31 +31,7 @@ set-environment -g LC_CTYPE "ru_RU.UTF-8" # Set environment encoding for Russian #setw -g pane-border-status bottom # Border placement #setw -g pane-border-format '─' # Border style -######################### -### MOUSE KEYBINDINGS ### -######################### -# Open a new window with double-click on status bar -bind-key -n DoubleClick1Status new-window - - - -############################ -### KEYBOARD KEYBINDINGS ### -############################ - -bind-key 'v' copy-mode # 'prefix+v' to enable copy mode -bind-key -T copy-mode-vi 'v' send -X begin-selection # 'v' to start selecting in copy mode - - -# Manual save/restore bindings for tmux-resurrect -# 'prefix+F5' to save -bind-key -T prefix F5 run-shell \ - '~/.config/tmux/plugins/tmux-resurrect/scripts/save.sh && mv -f $(find ~/.local/share/tmux/resurrect -type f -name "tmux_resurrect_*.txt" -size +0c | sort | tail -1) ~/.local/share/tmux/resurrect/main.txt && tmux display-message "Environment saved manually!"' - -# 'prefix+F6' to load -bind-key -T prefix F6 run-shell \ - 'ln -sf ~/.local/share/tmux/resurrect/main.txt ~/.local/share/tmux/resurrect/last && ~/.config/tmux/plugins/tmux-resurrect/scripts/restore.sh' #################### ### PLUGINS LIST ### @@ -73,6 +44,14 @@ set -g @plugin 'arcticicestudio/nord-tmux' # Nord theme for tmux set -g @plugin 'tmux-plugins/tmux-resurrect' # Save and restore tmux env set -g @plugin 'tmux-plugins/tmux-continuum' # Automates save and restore actions of tmux-resurrect + +# Other examples: +# set -g @plugin 'github_username/plugin_name' +# set -g @plugin 'git@github.com:user/plugin' +# set -g @plugin 'git@bitbucket.com:user/plugin' + + + ###################### ### PLUGINS CONFIG ### ###################### @@ -100,3 +79,4 @@ run '~/.config/tmux/plugins/tpm/bin/install_plugins' # Initialize TPM (keep this line at very bottom of tmux.conf) run '~/.config/tmux/plugins/tpm/tpm' +