aboutsummaryrefslogtreecommitdiff
path: root/.config/tmux
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-01-25 23:23:27 +0200
committersrdusr <trevorgray@srdusr.com>2023-01-25 23:23:27 +0200
commita19f1de2bec0aaa8abcdb351d5ad0b88b7c1846b (patch)
tree44ae2e075bdd2aaf5c33d0acf6be0c08c80551d6 /.config/tmux
parentffd2404eff77118630b1ab92af9a075941b02200 (diff)
downloaddotfiles-a19f1de2bec0aaa8abcdb351d5ad0b88b7c1846b.tar.gz
dotfiles-a19f1de2bec0aaa8abcdb351d5ad0b88b7c1846b.zip
Fixed formatting
Diffstat (limited to '.config/tmux')
-rw-r--r--.config/tmux/tmux.conf62
1 files changed, 37 insertions, 25 deletions
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 <prefix>[ to enter copy mode
setw -g mode-keys vi # `<prefix>: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: <Prefix> + Ctrl-s
+# * Restore with: <Prefix> + Ctlr-r
+# Change default save and restore keybindings
+ set -g @resurrect-save "W" # <Prefix> + W
+ set -g @resurrect-restore "E" # <Prefix> + 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 <prefix> + 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 <prefix> + 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"