aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <eugene.triguba@paymentworks.com>2025-04-28 07:33:05 -0400
committerEugene Triguba <eugene.triguba@paymentworks.com>2025-04-28 07:33:05 -0400
commit192f52579eb5fd1f88f441798c05502d2849eb17 (patch)
tree42562c5193a52d922e7d63f7626a6c50d6ac496b
parenttweak ghostty option (diff)
downloaddotfiles-192f52579eb5fd1f88f441798c05502d2849eb17.zip
tweak tmux config
-rw-r--r--tmux/.config/tmux/tmux.conf138
1 files changed, 106 insertions, 32 deletions
diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf
index 7f5851e..91197bf 100644
--- a/tmux/.config/tmux/tmux.conf
+++ b/tmux/.config/tmux/tmux.conf
@@ -1,42 +1,108 @@
+# Resolve issue on macOS with homebrew installed tmux
+# where it is symlinked to /usr/local/bin but tmux wants
+# to look for the executable in /usr/bin when executing
+# `run` commands.
+#
+# https://github.com/tmux-plugins/tpm/issues/67#issuecomment-319561401
+set-environment -g PATH "/usr/local/bin:/bin:/usr/bin"
+
+######################################################
+#
+# Key Remappings
+#
+######################################################
+
+# Start from a blank slate. Unremap all default key bindings.
+# unbind-key -a
+
+
# Remap prefix from 'C-b' to 'C-a'
#
-# This works well if you remap the regular
-# Caps Lock key to Ctrl.
+# This works well if you remap the regular Caps Lock key to Ctrl.
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
-# More intuitive pane splits.
+# Remap pane splits.
#
-# Split panes using | for horizontal splits
-# and - for vertical splits
-bind | split-window -h
-bind - split-window -v
+# Split panes using | for horizontal splits and - for vertical splits
+bind-key | split-window -h
+bind-key - split-window -v
unbind '"'
unbind %
-# Enable faster pane switching
+bind-key r source-file ~/.config/tmux/tmux.conf
+bind-key x kill-pane
+
+######################################################
#
-# Switch panes using Alt-arrow without prefix
-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
+# Options
+#
+######################################################
-# Set terminal colors
-set-option -sa terminal-overrides ",xterm*:Tc"
+# Don't rename windows automatically.
+#
+# I often will use the `,` key to rename windows.
+# However, by default, tmux will update the window
+# title to the last executed command.
+set-option -g allow-rename off
# Enable mouse support (clickable windows, panes, resizable panes)
-set -g mouse on
+set-option -g mouse on
+
+# Set terminal colors
+# set-option -g default-terminal "screen-256color"
# Start windows and panes at 1, not 0
-set -g base-index 1
-set -g pane-base-index 1
+set-option -g base-index 1
+set-option -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
-# kill pane
-bind-key x kill-pane
+# Don't do anything when a 'bell' rings
+set-option -g visual-activity off
+set-option -g visual-bell off
+set-option -g visual-silence off
+set-window-option -g monitor-activity off
+set-option -g bell-action none
+
+######################################################
+#
+# Theme
+#
+######################################################
+
+# clock mode
+setw -g clock-mode-colour yellow
+
+# copy mode
+setw -g mode-style 'fg=black bg=red bold'
+
+set -g pane-border-style 'fg=red'
+set -g pane-active-border-style 'fg=yellow'
+
+# statusbar
+set -g status-position bottom
+set -g status-justify left
+set -g status-style 'fg=red'
+
+set -g status-left ''
+set -g status-left-length 10
+
+set -g status-right-style 'fg=black bg=yellow'
+set -g status-right '%Y-%m-%d %H:%M '
+set -g status-right-length 50
+
+setw -g window-status-current-style 'fg=black bg=red'
+setw -g window-status-current-format ' #I #W #F '
+
+setw -g window-status-style 'fg=red bg=black'
+setw -g window-status-format ' #I #[fg=white]#W #[fg=yellow]#F '
+
+setw -g window-status-bell-style 'fg=yellow bg=red bold'
+
+# messages
+set -g message-style 'fg=yellow bg=red bold'
# Pane resizing
# bind -n M-h resize-pane -L
@@ -67,23 +133,31 @@ bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# set -g @catppuccin_right_separator "█"
# set -g @catppuccin_left_separator "█"
#
-# TMUX_FZF_ORDER="session|window|pane|command|keybinding"
-# TMUX_FZF_OPTIONS="-p -w 90% -h 70% -m"
# # more options here: https://github.com/sainnhe/tmux-fzf/issues/6#issuecomment-578750879
# bind w run-shell -b "~/.config/tmux/plugins/tmux-fzf/scripts/window.sh switch"
+######################################################
+#
# Plugins
-set -g @plugin 'tmux-plugins/tpm'
-set -g @plugin 'tmux-plugins/tmux-sensible'
+#
+######################################################
+
+# Plugin manager
+set-option -g @plugin 'tmux-plugins/tpm'
+
+# 'Sensible' set of defaults
+set-option -g @plugin 'tmux-plugins/tmux-sensible'
+
+TMUX_FZF_ORDER="session|window|pane|command|keybinding"
+TMUX_FZF_OPTIONS="-p -w 90% -h 70% -m"
+set-option -g @plugin 'sainnhe/tmux-fzf'
+
+# Persist tmux sessions across system restarts
+set-option -g @plugin 'tmux-plugins/tmux-resurrect'
+set-option -g @plugin 'tmux-plugins/tmux-continuum'
+set -g @resurrect-strategy-nvim 'session'
-# set -g @plugin 'tmux-plugins/tpm'
-# set -g @plugin 'tmux-plugins/tmux-sensible'
-# set -g @plugin 'sainnhe/tmux-fzf'
# set -g @plugin 'christoomey/vim-tmux-navigator'
-# set -g @plugin 'oca159/catppuccin-tmux'
-# set -g @plugin 'tmux-plugins/tmux-resurrect'
-# set -g @plugin 'tmux-plugins/tmux-continuum'
-# set -g @resurrect-strategy-nvim 'session'
-#
+
run '~/.tmux/plugins/tpm/tpm'