108 lines
5.1 KiB
Plaintext
108 lines
5.1 KiB
Plaintext
# List of plugins
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
set -g @plugin 'o0th/tmux-nova'
|
|
|
|
|
|
# Defaults
|
|
set -g mouse on
|
|
|
|
set -g prefix2 C-a # GNU-Screen compatible prefix
|
|
bind C-a send-prefix -2
|
|
|
|
# reload configuration
|
|
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
|
|
set -g default-terminal "tmux-256color"
|
|
set -s set-clipboard on
|
|
set -s extended-keys always
|
|
set -s extended-keys-format csi-u
|
|
bind-key -n C-S-[ previous-window
|
|
bind-key -n C-S-] next-window
|
|
bind-key -n "M-{" previous-window
|
|
bind-key -n "M-}" next-window
|
|
set -as terminal-features ",xterm-kitty:RGB"
|
|
set -as terminal-features ",xterm-kitty:clipboard"
|
|
set -as terminal-features ",xterm-kitty:extkeys"
|
|
set -as terminal-features ",xterm:RGB"
|
|
set -as terminal-features ",xterm-ghostty:RGB"
|
|
set -as terminal-features ",xterm-ghostty:clipboard"
|
|
set -as terminal-features ",xterm-ghostty:extkeys"
|
|
set -as terminal-features ",xterm-256color:RGB"
|
|
set -as terminal-features ",xterm-256color:extkeys"
|
|
set -as terminal-features ",xterm-kitty:hyperlinks"
|
|
set -as terminal-features ",xterm-ghostty:hyperlinks"
|
|
set -as terminal-features ",xterm-256color:hyperlinks"
|
|
set -g allow-passthrough on
|
|
set-window-option -g mode-keys vi
|
|
|
|
# Copy selections by writing OSC 52 directly to the pane tty. This avoids the
|
|
# broken tmux load-buffer -w path seen under mosh, and works across macOS,
|
|
# Linux, FreeBSD, and OpenBSD with $HOME/.local/bin/yank-osc52.
|
|
bind-key -n MouseDrag1Pane if-shell -F '#{mouse_any_flag}' 'send-keys -M' 'copy-mode -M'
|
|
bind-key -n MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel '$HOME/.local/bin/yank-osc52 > #{pane_tty}'
|
|
bind-key -n DoubleClick1Pane select-pane -t = \; copy-mode -H \; send-keys -X select-word \; run-shell -b 'sleep 0.2; tmux send-keys -X -t "#{pane_id}" copy-pipe-and-cancel "$HOME/.local/bin/yank-osc52 > #{pane_tty}"'
|
|
bind-key -n TripleClick1Pane select-pane -t = \; copy-mode -H \; send-keys -X select-line \; run-shell -b 'sleep 0.2; tmux send-keys -X -t "#{pane_id}" copy-pipe-and-cancel "$HOME/.local/bin/yank-osc52 > #{pane_tty}"'
|
|
bind-key -T copy-mode-vi Space send-keys -X begin-selection
|
|
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
|
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
|
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel '$HOME/.local/bin/yank-osc52 > #{pane_tty}'
|
|
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel '$HOME/.local/bin/yank-osc52 > #{pane_tty}'
|
|
bind-key -T copy-mode-vi WheelUpPane select-pane \; send-keys -N 1 -X scroll-up
|
|
bind-key -T copy-mode-vi WheelDownPane select-pane \; send-keys -N 1 -X scroll-down
|
|
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel '$HOME/.local/bin/yank-osc52 > #{pane_tty}'
|
|
bind-key -T copy-mode-vi DoubleClick1Pane send-keys -X select-word \; run-shell -b 'sleep 0.2; tmux send-keys -X -t "#{pane_id}" copy-pipe-and-cancel "$HOME/.local/bin/yank-osc52 > #{pane_tty}"'
|
|
bind-key -T copy-mode-vi TripleClick1Pane send-keys -X select-line \; run-shell -b 'sleep 0.2; tmux send-keys -X -t "#{pane_id}" copy-pipe-and-cancel "$HOME/.local/bin/yank-osc52 > #{pane_tty}"'
|
|
|
|
# Nova Config
|
|
set -g @nova-nerdfonts true
|
|
set -g @nova-nerdfonts-left
|
|
#set -g @nova-nerdfonts-left
|
|
#set -g @nova-nerdfonts-right
|
|
set -g @nova-nerdfonts-right
|
|
set -g @nova-status-style-bg "default"
|
|
set -g @nova-status-style-fg "terminal"
|
|
|
|
set -g @nova-segment-mode "#{?client_prefix,Ω,ω}"
|
|
set -g @nova-segment-mode-colors "#50fa7b #282a36"
|
|
|
|
set -g @nova-segment-session " #S"
|
|
set -g @nova-segment-session-colors "#6272a4 #f8f8f2"
|
|
|
|
set -g @nova-segment-whoami "#(whoami)@#h"
|
|
set -g @nova-segment-whoami-colors "#50fa7b #282a36"
|
|
|
|
set -g @nova-pane "#W"
|
|
set -g window-status-separator ""
|
|
|
|
set -g @nova-rows 0
|
|
set -g @nova-segments-0-left "mode"
|
|
set -g @nova-segments-0-right "session whoami"
|
|
|
|
# -- display -------------------------------------------------------------------
|
|
|
|
set -g base-index 1 # start windows numbering at 1
|
|
setw -g pane-base-index 1 # make pane numbering consistent with windows
|
|
|
|
setw -g automatic-rename on # rename window to reflect current program
|
|
set -g renumber-windows on # renumber windows when a window is closed
|
|
|
|
set -g set-titles on # set terminal title
|
|
# Title = session name (shown as kitty tab title); append @host when the
|
|
# session is attached over SSH, e.g. "reviews@mini".
|
|
set -g set-titles-string "#{?SSH_CONNECTION,#S@#h,#S}"
|
|
|
|
set -g display-panes-time 800 # slightly longer pane indicators display time
|
|
set -g display-time 1000 # slightly longer status messages display time
|
|
|
|
set -g status-interval 10 # redraw status line every 10 seconds
|
|
|
|
|
|
|
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
|
run '~/.tmux/plugins/tpm/tpm'
|
|
|
|
# Nova renders this separator with @nova-status-style-bg as a foreground.
|
|
# With bg=default that becomes black on light themes, so keep only this
|
|
# active-tab edge explicit while the rest of the line remains theme-native.
|
|
set-window-option -g window-status-current-format "#[fg=#6272a4,bg=default]#[fg=#f8f8f2,bg=#6272a4] #W #[fg=#6272a4,bg=default]"
|