|
| 1 | +# Adapted from samabsalom/dotfiles for Linux, Home Assistant ingress, and tmux-only persistence. |
| 2 | + |
| 3 | +unbind C-b |
| 4 | +set-option -g prefix C-a |
| 5 | +bind-key C-a send-prefix |
| 6 | + |
| 7 | +set -g mouse on |
| 8 | +set-option -g allow-rename off |
| 9 | +set -g default-terminal "tmux-256color" |
| 10 | +set -ga terminal-overrides ",*256col*:Tc" |
| 11 | +set -s set-clipboard on |
| 12 | +set -g history-limit 10000 |
| 13 | +set -g base-index 1 |
| 14 | +setw -g pane-base-index 1 |
| 15 | +set -g default-shell /bin/zsh |
| 16 | +set -g default-command "/bin/zsh -l" |
| 17 | + |
| 18 | +bind | split-window -h -c "#{pane_current_path}" |
| 19 | +bind - split-window -v -c "#{pane_current_path}" |
| 20 | + |
| 21 | +bind h select-pane -L |
| 22 | +bind j select-pane -D |
| 23 | +bind k select-pane -U |
| 24 | +bind l select-pane -R |
| 25 | + |
| 26 | +bind -r H resize-pane -L 5 |
| 27 | +bind -r J resize-pane -D 5 |
| 28 | +bind -r K resize-pane -U 5 |
| 29 | +bind -r L resize-pane -R 5 |
| 30 | + |
| 31 | +bind c new-window -c "#{pane_current_path}" |
| 32 | +bind n next-window |
| 33 | +bind p previous-window |
| 34 | +bind S new-session |
| 35 | +bind X kill-session |
| 36 | +bind r source-file ~/.tmux.conf \; display-message "tmux config reloaded" |
| 37 | + |
| 38 | +set -g pane-border-style fg=colour238 |
| 39 | +set -g pane-active-border-style fg=colour51,bg=colour236 |
| 40 | + |
| 41 | +set -g status-position bottom |
| 42 | +set -g status-style bg=colour234,fg=colour137 |
| 43 | +set -g status-left-length 40 |
| 44 | +set -g status-right-length 100 |
| 45 | +set -g status-left '#[fg=colour233,bg=colour245,bold] #H #[fg=colour233,bg=colour241,bold] #S ' |
| 46 | +set -g status-right '#[fg=colour138,bg=colour235] #(hostname -I 2>/dev/null | awk "{print \\$1}" || echo "N/A") #[fg=colour233,bg=colour241,bold] #H #[fg=colour233,bg=colour245,bold] %d/%m %H:%M:%S ' |
| 47 | + |
| 48 | +setw -g window-status-style fg=colour138,bg=colour235 |
| 49 | +setw -g window-status-current-style fg=colour81,bg=colour238,bold |
| 50 | +setw -g window-status-format ' #I:#W#F ' |
| 51 | +setw -g window-status-current-format ' #I:#W#F ' |
| 52 | +setw -g window-status-separator "" |
| 53 | + |
| 54 | +set -g message-style bg=colour166,fg=colour232,bold |
| 55 | +set-option -g visual-activity off |
| 56 | +set-option -g visual-bell off |
| 57 | +set-option -g visual-silence off |
| 58 | +set-window-option -g monitor-activity off |
| 59 | +set-option -g bell-action none |
| 60 | + |
| 61 | +setw -g mode-keys vi |
| 62 | +bind-key -T copy-mode-vi v send-keys -X begin-selection |
| 63 | +bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel |
| 64 | +bind-key -T copy-mode-vi r send-keys -X rectangle-toggle |
0 commit comments