mirror of
https://github.com/fscotto/infra.git
synced 2026-07-29 16:20:01 +00:00
117 lines
4.1 KiB
Bash
117 lines
4.1 KiB
Bash
#=== BEHAVIOR ===#
|
|
|
|
unbind C-b
|
|
set -g prefix C-x
|
|
bind-key C-x send-prefix
|
|
|
|
set -g renumber-window on
|
|
set -g base-index 1
|
|
setw -g pane-base-index 1
|
|
set -g mouse on
|
|
set -g history-limit 50000
|
|
set -s escape-time 0
|
|
set -g focus-events on
|
|
set -g detach-on-destroy off
|
|
|
|
bind-key c new-window -c '#{pane_current_path}'
|
|
bind-key | split-window -h -c '#{pane_current_path}'
|
|
bind-key - split-window -v -c '#{pane_current_path}'
|
|
bind-key \" split-window -v -c '#{pane_current_path}'
|
|
bind-key % split-window -h -c '#{pane_current_path}'
|
|
bind-key r source-file ~/.tmux.conf \; display-message 'tmux configuration reloaded'
|
|
bind-key y setw synchronize-panes \; display-message 'synchronize-panes #{?pane_synchronized,on,off}'
|
|
bind-key -n M-Left select-pane -L
|
|
bind-key -n M-Right select-pane -R
|
|
bind-key -n M-Up select-pane -U
|
|
bind-key -n M-Down select-pane -D
|
|
bind-key -n M-H resize-pane -L 5
|
|
bind-key -n M-J resize-pane -D 5
|
|
bind-key -n M-K resize-pane -U 5
|
|
bind-key -n M-L resize-pane -R 5
|
|
|
|
# Session popup: Enter switches, Ctrl-k kills, Ctrl-n creates.
|
|
bind-key S display-popup -E -x "#{popup_centre_x}" -y "#{popup_centre_y}" -w 95% -h 95% "~/.tmux/bin/session-popup '#{pane_current_path}'"
|
|
|
|
#=== COPY MODE ===#
|
|
|
|
setw -g mode-keys vi
|
|
set -g set-clipboard on
|
|
set -g @yank_action 'copy-pipe-and-cancel'
|
|
set -g @override_copy_command '~/.tmux/bin/copy-to-clipboard'
|
|
bind-key -T copy-mode-vi v send -X begin-selection
|
|
bind-key -T copy-mode-vi C-v send -X rectangle-toggle
|
|
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel '~/.tmux/bin/copy-to-clipboard'
|
|
|
|
#=== TERMINAL ===#
|
|
|
|
set -g default-terminal "screen-256color"
|
|
set -ag terminal-features ',screen-256color:RGB,tmux*:RGB,alacritty:RGB,foot:RGB,xterm-256color:RGB,gnome*:RGB'
|
|
set -g allow-passthrough on
|
|
set -ga update-environment TERM
|
|
set -ga update-environment TERM_PROGRAM
|
|
|
|
#=== PLUGINS ===#
|
|
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
set -g @plugin 'b0o/tmux-autoreload'
|
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
|
|
|
#=== THEME: Ptyxis Linux Minimal ===#
|
|
|
|
set -g @linux_bg "#000000"
|
|
set -g @linux_fg "#d7d7d7"
|
|
set -g @linux_dim "#808080"
|
|
set -g @linux_sep "#303030"
|
|
set -g @linux_blue "#5555ff"
|
|
set -g @linux_green "#55ff55"
|
|
set -g @linux_yellow "#ffff55"
|
|
set -g @linux_red "#ff5555"
|
|
|
|
set -g status-position bottom
|
|
set -g status-style "bg=#{@linux_bg},fg=#{@linux_dim}"
|
|
set -g status-left-length 100
|
|
set -g status-right-length 80
|
|
set -g status-interval 5
|
|
|
|
set -g status-left ""
|
|
set -ga status-left "#[fg=#{@linux_green},bold] #S "
|
|
set -ga status-left "#[fg=#{@linux_sep}]·"
|
|
set -ga status-left "#[fg=#{@linux_dim}] #{pane_current_command} "
|
|
set -ga status-left "#[fg=#{@linux_sep}]·"
|
|
set -ga status-left "#[fg=#{@linux_fg}] #{=/-36/...:#{s|$USER|~|:#{b:pane_current_path}}} "
|
|
|
|
set -g status-right ""
|
|
set -ga status-right "#[fg=#{@linux_yellow}]#{?pane_synchronized, sync ,}"
|
|
set -ga status-right "#[fg=#{@linux_blue}]#{?window_zoomed_flag, zoom ,}"
|
|
set -ga status-right "#[fg=#{@linux_sep}]·"
|
|
set -ga status-right "#[fg=#{@linux_dim}] #H "
|
|
|
|
setw -g pane-border-status off
|
|
setw -g pane-active-border-style "fg=#{@linux_blue}"
|
|
setw -g pane-border-style "fg=#{@linux_sep}"
|
|
setw -g pane-border-lines single
|
|
|
|
set -g message-style "bg=#{@linux_blue},fg=#{@linux_bg},bold"
|
|
set -g message-command-style "bg=#{@linux_blue},fg=#{@linux_bg},bold"
|
|
set -g mode-style "bg=#{@linux_yellow},fg=#{@linux_bg},bold"
|
|
|
|
set -g window-status-format " #I:#W "
|
|
set -g window-status-style "bg=#{@linux_bg},fg=#{@linux_dim}"
|
|
set -g window-status-last-style "bg=#{@linux_bg},fg=#{@linux_fg}"
|
|
set -g window-status-activity-style "bg=#{@linux_bg},fg=#{@linux_yellow}"
|
|
set -g window-status-bell-style "bg=#{@linux_bg},fg=#{@linux_red},bold"
|
|
set -gF window-status-separator "#[fg=#{@linux_sep}]·"
|
|
set -g window-status-current-format " #I:#W "
|
|
set -g window-status-current-style "bg=#{@linux_bg},fg=#{@linux_green},bold"
|
|
|
|
#=== SESSION RESTORE ===#
|
|
|
|
set -g @continuum-restore 'on'
|
|
set -g @continuum-save-interval '15'
|
|
|
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
|
run '~/.tmux/plugins/tpm/tpm'
|