From a19f1de2bec0aaa8abcdb351d5ad0b88b7c1846b Mon Sep 17 00:00:00 2001 From: srdusr Date: Wed, 25 Jan 2023 23:23:27 +0200 Subject: Fixed formatting --- .config/tmux/tmux.conf | 62 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 25 deletions(-) (limited to '.config/tmux') diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index c7c30f4..300a0fd 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -39,16 +39,21 @@ set -g mouse on # Focus events, allow supported requests from applications to passthrough/run in tmux set-option -g focus-events on -# Aggresive resizing, useful when using "grouped sessions" and multi-monitor setup -setw -g aggressive-resize on - # Update the TERM variable of terminal emulator when creating a new session or attaching a existing session set -g update-environment 'DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM' -## Popup scratch session + +#―――――――――――――――――――――――――――――――――――――――――― + +### Window Movement/Control ### + +# Aggressive resizing, useful when using "grouped sessions" and multi-monitor setup +setw -g aggressive-resize on + +# Popup scratch session #bind -n M-g display-popup -E "tmux new-session -A -s scratch" -## Toggle popup scratch session +# Toggle popup scratch session bind-key -n M-g if-shell -F '#{==:#{session_name},scratch}' { detach-client } { @@ -134,7 +139,7 @@ bind-key j command-prompt -p "send pane to:" "join-pane -t '%%'" #―――――――――――――――――――――――――――――――――――――――――― -### Copy/Paste ### +### Copy Mode (Copy/Paste) ### # Set Vi copy mode, use [ to enter copy mode setw -g mode-keys vi # `:list-keys -T copy-mode-vi` to confirm @@ -149,6 +154,7 @@ if-shell -b 'echo $XDG_SESSION_TYPE | grep -q x11' "\ bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard > /dev/null'; \ bind-key C-M-v run 'xclip -out -selection clipboard | tmux load-buffer - ; tmux paste-buffer'" +# Wayland support if-shell -b 'echo $XDG_SESSION_TYPE | grep -q wayland' "\ bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'wl-copy'; \ bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'wl-copy'; \ @@ -208,7 +214,7 @@ bind b source-file ~/.config/tmux/tmux.conf #―――――――――――――――――――――――――――――――――――――――――― -### list of plugins ### +### Plugin Install ### set -g @plugin "tmux-plugins/tpm" #set -g @plugin "tmux-plugins/tmux-sensible" @@ -220,31 +226,37 @@ set -g @plugin "christoomey/vim-tmux-navigator" #―――――――――――――――――――――――――――――――――――――――――― -### Plugins settings ### +### Plugins Settings ### # Plugin to save and restore tmux sessions after restart -# * Save with: prefix + Ctrl-s -# * Restore with: prefix + Ctlr-r - # restore vim and nvim sessions as well - # for vim +# * Save with: + Ctrl-s +# * Restore with: + Ctlr-r +# Change default save and restore keybindings + set -g @resurrect-save "W" # + W + set -g @resurrect-restore "E" # + E + +# Restore vim and nvim sessions as well +# For vim: set -g @resurrect-strategy-vim "session" - # for neovim +# For neovim: set -g @resurrect-strategy-nvim "session" + # Automatic restore -# set -g @continuum-restore "on" -# Change default save and restore keybindings - set -g @resurrect-save "W" - set -g @resurrect-restore "E" -#set -g @continuum-boot "on" -## Restore Panes + #set -g @continuum-restore "on" + #set -g @continuum-boot "on" + +# Restore Panes set -g @resurrect-capture-pane-contents "on" -# This a hook for tmux-resurrect which tells it to kill session 0 before restoring the panels -set -g @resurrect-hook-pre-restore-pane-processes "tmux switch-client -n && tmux kill-session -t=0" -# plugin uninstall - # Delete or comment out the plugin in .tmux.conf. - # Press + alt + u to remove the plugin. + +# This is a hook for tmux-resurrect which tells it to kill session 0 before restoring the panels + set -g @resurrect-hook-pre-restore-pane-processes "tmux switch-client -n && tmux kill-session -t=0" + +# Plugin uninstall + # Delete or comment out the plugin in .tmux.conf. + # Press + alt + u to remove the plugin. + # TMUX plugin manager (keep at the bottom of tmux.conf) -#run -b "~/.tmux/plugins/tpm/tpm" + #run -b "~/.tmux/plugins/tpm/tpm" run -b "~/.config/tmux/plugins/tpm/tpm" -- cgit v1.2.3