summaryrefslogtreecommitdiff
path: root/arch/tmux/.config
diff options
context:
space:
mode:
authorsteven-na <noreply.github@stvnc.dev>2026-04-26 11:58:32 -0700
committersteven-na <noreply.github@stvnc.dev>2026-04-26 11:58:32 -0700
commit4b309f0a5555b5fed5a65ee425dcb6da15421f5b (patch)
treeb923f4f76df6205ee3099d9bf8072209ff9e8256 /arch/tmux/.config
Initial commit.
Diffstat (limited to 'arch/tmux/.config')
m---------arch/tmux/.config/tmux/plugins/tmux-resurrect0
m---------arch/tmux/.config/tmux/plugins/tmux-sensible0
m---------arch/tmux/.config/tmux/plugins/tmux-yank0
m---------arch/tmux/.config/tmux/plugins/tpm0
m---------arch/tmux/.config/tmux/plugins/vim-tmux-navigator0
-rw-r--r--arch/tmux/.config/tmux/tmux.conf119
6 files changed, 119 insertions, 0 deletions
diff --git a/arch/tmux/.config/tmux/plugins/tmux-resurrect b/arch/tmux/.config/tmux/plugins/tmux-resurrect
new file mode 160000
+Subproject cff343cf9e81983d3da0c8562b01616f12e8d54
diff --git a/arch/tmux/.config/tmux/plugins/tmux-sensible b/arch/tmux/.config/tmux/plugins/tmux-sensible
new file mode 160000
+Subproject 25cb91f42d020f675bb0a2ce3fbd3a5d96119ef
diff --git a/arch/tmux/.config/tmux/plugins/tmux-yank b/arch/tmux/.config/tmux/plugins/tmux-yank
new file mode 160000
+Subproject acfd36e4fcba99f8310a7dfb432111c242fe739
diff --git a/arch/tmux/.config/tmux/plugins/tpm b/arch/tmux/.config/tmux/plugins/tpm
new file mode 160000
+Subproject 99469c4a9b1ccf77fade25842dc7bafbc8ce994
diff --git a/arch/tmux/.config/tmux/plugins/vim-tmux-navigator b/arch/tmux/.config/tmux/plugins/vim-tmux-navigator
new file mode 160000
+Subproject e41c431a0c7b7388ae7ba341f01a0d217eb3a43
diff --git a/arch/tmux/.config/tmux/tmux.conf b/arch/tmux/.config/tmux/tmux.conf
new file mode 100644
index 0000000..38e15a9
--- /dev/null
+++ b/arch/tmux/.config/tmux/tmux.conf
@@ -0,0 +1,119 @@
+# ── Prefix ────────────────────────────────────────────────────────────────────
+unbind C-b
+set -g prefix C-Space
+bind C-Space send-prefix
+
+# ── Core settings ─────────────────────────────────────────────────────────────
+set -g default-terminal "tmux-256color"
+set -as terminal-overrides ",*:Tc"
+set -as terminal-features ",*:RGB"
+set -g default-shell /usr/bin/fish
+set -g mouse on
+set -g base-index 1
+set -g pane-base-index 1
+set -g renumber-windows on
+set -g history-limit 50000
+set -sg escape-time 0
+set -g focus-events on
+set -g mode-keys emacs
+
+# ── Splits (open in current directory) ───────────────────────────────────────
+unbind %
+unbind '"'
+bind v split-window -h -c "#{pane_current_path}"
+bind h split-window -v -c "#{pane_current_path}"
+
+# ── Pane navigation (Ctrl+arrow, no prefix — vim-tmux-navigator aware) ───────
+# Checks if the active pane is running nvim; if so passes the key to nvim,
+# otherwise switches tmux panes. Neovim needs matching keybinds — see comment
+# at the bottom of this file.
+is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
+ | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
+
+bind -n C-Left if-shell "$is_vim" 'send-keys C-Left' 'select-pane -L'
+bind -n C-Down if-shell "$is_vim" 'send-keys C-Down' 'select-pane -D'
+bind -n C-Up if-shell "$is_vim" 'send-keys C-Up' 'select-pane -U'
+bind -n C-Right if-shell "$is_vim" 'send-keys C-Right' 'select-pane -R'
+
+# ── Pane resize (Prefix + Shift+arrow, repeatable) ───────────────────────────
+bind -r S-Up resize-pane -U 5
+bind -r S-Down resize-pane -D 5
+bind -r S-Left resize-pane -L 5
+bind -r S-Right resize-pane -R 5
+
+# ── Window navigation (Alt+arrow, no prefix needed) ──────────────────────────
+bind -n M-Left previous-window
+bind -n M-Right next-window
+
+# ── Sesh: fuzzy session + directory picker ────────────────────────────────────
+bind S display-popup -E -w 80% -h 70% \
+ "sesh connect \$(sesh list | fzf \
+ --height 100% \
+ --reverse \
+ --border \
+ --border-label ' sesh ' \
+ --prompt ' ' \
+ --no-sort)"
+
+# ── Reload config ─────────────────────────────────────────────────────────────
+bind r source-file ~/.config/tmux/tmux.conf \; display " config reloaded"
+
+# ── Pane transparency — empty style lets ghostty background show through ───────
+set -g window-style ''
+set -g window-active-style ''
+
+# ── Status bar ────────────────────────────────────────────────────────────────
+set -g status on
+set -g status-position bottom
+set -g status-interval 1
+set -g status-left-length 99
+set -g status-right-length 99
+set -g status-justify centre
+set -g status-style "bg=default,fg=default"
+
+# Left: session name + nvim lualine left sections (mode, branch, diff)
+set -g status-left "#[fg=colour4,bold] #S #[default] #(cat #{socket_path}-\#{session_id}-vimbridge)"
+set -g status-left-length 80
+# Right: nvim lualine right sections (encoding, filetype, progress, location)
+set -g status-right '#(cat #{socket_path}-\#{session_id}-vimbridge-R)'
+set -g status-right-length 120
+
+# Window list
+set -g window-status-format " #I #W "
+set -g window-status-current-format "#[fg=colour4,bold,reverse] #I #W "
+set -g window-status-separator ""
+
+# ── Borders ───────────────────────────────────────────────────────────────────
+# colour4 = wallust accent (updates automatically when ghostty palette changes)
+set -g pane-border-style "fg=colour0"
+set -g pane-active-border-style "fg=colour4"
+set -g pane-border-lines single
+
+# ── Popups / messages ─────────────────────────────────────────────────────────
+set -g message-style "bg=colour4,fg=colour0,bold"
+set -g popup-border-style "fg=colour4"
+set -g popup-border-lines rounded
+
+
+# ── Plugins ───────────────────────────────────────────────────────────────────
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-sensible'
+set -g @plugin 'christoomey/vim-tmux-navigator'
+set -g @plugin 'tmux-plugins/tmux-yank'
+set -g @plugin 'tmux-plugins/tmux-resurrect'
+
+# Disable vim-tmux-navigator's default C-h/j/k/l bindings (using arrows instead)
+set -g @vim-tmux-navigator-no-wrap 1
+set -g @vim_tmux_navigator_no_mappings 1
+
+run '~/.tmux/plugins/tpm/tpm'
+
+# vim-tmux-navigator binds C-h to select-pane -L after TPM loads.
+# Unbind it here so Ctrl+Backspace (which sends C-h) passes through to the shell.
+unbind -n C-h
+
+# ── Neovim keybinds (add to your nvim config when ready) ─────────────────────
+# vim.keymap.set({'n','t'}, '<C-Left>', '<Cmd>TmuxNavigateLeft<CR>')
+# vim.keymap.set({'n','t'}, '<C-Down>', '<Cmd>TmuxNavigateDown<CR>')
+# vim.keymap.set({'n','t'}, '<C-Up>', '<Cmd>TmuxNavigateUp<CR>')
+# vim.keymap.set({'n','t'}, '<C-Right>', '<Cmd>TmuxNavigateRight<CR>')