summaryrefslogtreecommitdiff
path: root/dotfiles/system/.tmux.conf
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-05-08 18:49:34 -0500
committerCraig Jennings <c@cjennings.net>2025-05-08 18:51:59 -0500
commit000e00871830cd15de032c80e2b62946cf19445c (patch)
tree794a7922750472bbe0e024042d6ba84f411fc3e0 /dotfiles/system/.tmux.conf
parentfe302606931e4bad91c4ed6df81a4403523ba780 (diff)
adding missing dotfiles and folders
- profile.d/ - bashrc - authinfo.gpg - .zsh/
Diffstat (limited to 'dotfiles/system/.tmux.conf')
-rw-r--r--dotfiles/system/.tmux.conf88
1 files changed, 88 insertions, 0 deletions
diff --git a/dotfiles/system/.tmux.conf b/dotfiles/system/.tmux.conf
new file mode 100644
index 0000000..ea3bc0d
--- /dev/null
+++ b/dotfiles/system/.tmux.conf
@@ -0,0 +1,88 @@
+# note: refresh the list of plugins = prefix + capital I
+
+# enable mouse support
+set -g mouse on
+
+# enabling passthrough for kitty image rendering
+set -g allow-passthrough on
+
+# make scrolling with wheels work
+bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
+bind -n WheelDownPane select-pane -t= \; send-keys -M
+
+# list of plugins
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-open'
+set -g @plugin 'tmux-plugins/tmux-logging'
+set -g @plugin 'tmux-plugins/tmux-yank'
+set -g @plugin 'tmux-plugins/tmux-sessionist'
+set -g @plugin 'MunifTanjim/tmux-mode-indicator'
+set -g @plugin 'MunifTanjim/tmux-suspend'
+set-option -g @plugin 'b0o/tmux-autoreload'
+
+# yank to the clipboard when selecting with the mouse
+set -g @yank_selection_mouse 'clipboard'
+
+# plugin Settings
+set -g @mighty-scroll-interval 3
+set -g @mighty-scroll-by-line 'man fzf'
+set -g @mighty-scroll-select-pane off
+
+# put tmux mode indicator on right
+set -g status-right '%Y-%m-%d %H:%M #{tmux_mode_indicator}'
+
+# gruvbox compatible colours
+set -g status-fg colour0
+set -g status-bg colour15
+
+# number the panes and match keyboard order
+set -g base-index 1
+set -g pane-base-index 1
+set -g renumber-windows on
+
+# address vim mode switching delay (http://superuser.com/a/252717/65504)
+set -s escape-time 0
+
+# tmux messages are displayed for 4 seconds
+set -g display-time 4000
+
+# upgrade $TERM
+set -g default-terminal "screen-256color"
+
+# prefix r reloads config
+bind r source-file ~/.tmux.conf \; display "tmux config reloaded"
+
+# keep path with new window
+bind c new-window -c "#{pane_current_path}"
+
+# split window horizontally
+bind-key "|" split-window -h -c "#{pane_current_path}"
+bind-key "\\" split-window -fh -c "#{pane_current_path}"
+
+# split window vertically
+bind-key "-" split-window -v -c "#{pane_current_path}"
+bind-key "_" split-window -fv -c "#{pane_current_path}"
+
+# easier and faster switching between next/prev window
+bind C-p previous-window
+bind C-n next-window
+
+# prefix shift + W moves to last window
+# note: prefix shift S moves to last session with sessionist plugin
+bind W last-window
+
+# increase scrollback buffer
+set-option -g history-limit 50000
+
+# don't allow suspending client
+unbind-key C-z
+
+# emacs key bindings in tmux command prompt (prefix + :)
+set -g status-keys emacs
+
+# install tmux plugins automatically when tmux is started
+if "test ! -d ~/.tmux/plugins/tpm" \
+ "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
+
+# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
+run '~/.tmux/plugins/tpm/tpm'