Skip to content

Instantly share code, notes, and snippets.

@AlbertoBarrago
Created June 22, 2026 07:46
Show Gist options
  • Select an option

  • Save AlbertoBarrago/3fdfdb874aecf5b6e77e52d90a318a96 to your computer and use it in GitHub Desktop.

Select an option

Save AlbertoBarrago/3fdfdb874aecf5b6e77e52d90a318a96 to your computer and use it in GitHub Desktop.
tmux config — Ghostty + Neovim setup (TPM, resurrect, continuum, battery)
# ============================================================================
# Tmux Config - Modern Setup 2026
# ============================================================================
# True color support
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"
# Better prefix (Ctrl+A invece di Ctrl+B)
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Split windows più intuitivi
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# Navigate panes vim-style
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Mouse support
set -g mouse on
# Start windows/panes at 1
set -g base-index 1
setw -g pane-base-index 1
# Renumber windows when closed
set -g renumber-windows on
# No delay for escape key
set -sg escape-time 0
# Increase scrollback
set -g history-limit 50000
# Status bar
set -g status-style 'bg=#1e1e2e fg=#cdd6f4'
set -g status-left '#[fg=#89b4fa bold] #S #[fg=#6c7086]│ '
set -g status-right '#[fg=#a6e3a1]#{battery_icon} #{battery_percentage} #[fg=#89b4fa]%H:%M '
set -g status-left-length 30
set -g status-right-length 40
set -g status-interval 5
# Window status
setw -g window-status-current-format '#[fg=#89b4fa bold] #I #W '
setw -g window-status-format '#[fg=#6c7086] #I #W '
# Reload config
bind r source-file ~/.tmux.conf \; display "Config reloaded!"
# Vi mode
setw -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
# Fix colors in nvim/vim
set-option -sa terminal-overrides ',xterm-256color:RGB'
# ============================================================================
# Plugins (TPM)
# ============================================================================
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-battery'
# tmux-continuum: salva la sessione ogni 15 minuti e la ripristina all'avvio
set -g @continuum-restore 'on'
set -g @continuum-save-interval '15'
# tmux-resurrect: salva anche i processi nvim
set -g @resurrect-strategy-nvim 'session'
# tmux-battery: icone
set -g @batt_icon_charge_tier8 ''
set -g @batt_icon_charge_tier7 ''
set -g @batt_icon_charge_tier6 ''
set -g @batt_icon_charge_tier5 ''
set -g @batt_icon_charge_tier4 ''
set -g @batt_icon_charge_tier3 ''
set -g @batt_icon_charge_tier2 ''
set -g @batt_icon_charge_tier1 ''
set -g @batt_icon_status_charging ''
run '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment