33 lines
903 B
Bash
33 lines
903 B
Bash
if-shell -F '#{client_term} =~ "^(xterm-ghostty|xterm-256color)$"' \
|
|
'set -g default-terminal "xterm-256color"'
|
|
|
|
setw -g mouse on
|
|
|
|
# Large history
|
|
set -g history-limit 500000
|
|
|
|
# Bindings
|
|
bind C-Y set-window-option synchronize-panes
|
|
bind -n C-k clear-history
|
|
|
|
# Status pane
|
|
set -g status-right-length 100
|
|
set -g status-right "#(uname -r) • #(echo @FQDN | sed 's/\.neb\.jakehillion\.me//g') • #(date '+%d-%b-%y %H:%M')"
|
|
|
|
# New panes in the same directory
|
|
bind '"' split-window -c "#{pane_current_path}"
|
|
bind % split-window -h -c "#{pane_current_path}"
|
|
bind c new-window -c "#{pane_current_path}"
|
|
|
|
# Start indices at 1 to match keyboard
|
|
set -g base-index 1
|
|
setw -g pane-base-index 1
|
|
|
|
# Add clipboard support (OSC52)
|
|
set-option -g set-clipboard on
|
|
set-option -g allow-passthrough on
|
|
|
|
# Open a new session when attached to and one isn't open
|
|
# Must come after base-index settings
|
|
new-session
|