Skip to content

Instantly share code, notes, and snippets.

@w0ltage
Created January 30, 2025 17:19
Show Gist options
  • Save w0ltage/60ed6053668c9194cd026d2bf0c4af32 to your computer and use it in GitHub Desktop.
Save w0ltage/60ed6053668c9194cd026d2bf0c4af32 to your computer and use it in GitHub Desktop.
Optimal tmux config
unbind r
bind r source-file $HOME/.config/tmux/tmux.conf
set-option -g status-position top
set -g prefix C-b
set -g mouse on
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Split windows vertically via '-' and horizontal via '='
unbind-key %
unbind-key '"'
bind-key = split-window -h -c '#{pane_current_path}'
bind-key - split-window -v -c '#{pane_current_path}'
# Set bell/ring enabled
set-window-option -g visual-bell off
set-window-option -g bell-action any
# Don't keep windows around after they exit
set -g remain-on-exit off
# Count windows from 1
set -g base-index 1
setw -g pane-base-index 1
# Automatically renumber windows when some closes
set -g renumber-windows on
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'kubil7y/tmux_statusbar'
# Other examples
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin '[email protected]:user/plugin'
# set -g @plugin '[email protected]:user/plugin'
# GRUVBOX
# https://github.com/kubil6y/tmux_statusbar.git
# bg:#32302f,#282828,#1d2021
# fg: #ebdbb2,#e0e0e0,#fffbf6
# highlight #fe8019,#e0def4,#d79921,#f6c177
MESSAGE_BG="#1d2021"
MESSAGE_FG="#eddbb2"
BG="#1d2021"
FG="#eddbb2"
HIGHLIGHT="#fabd2f"
# rose pine
#MESSAGE_BG="#26233a"
#MESSAGE_FG="#e0def4"
#BG="#191724"
#FG=white
#HIGHLIGHT="#e0def4"
# Title
set -g set-titles on
set -g set-titles-string '#(whoami)@#H - (#S:#W.#P)'
# Panes
set -g pane-border-style fg=default
set -g pane-active-border-style fg=$HIGHLIGHT,bg=default
set -g display-panes-time 1000
set -g display-panes-colour $FG
set -g display-panes-active-colour $HIGHLIGHT
# Mode
set -g mode-style bg=$HIGHLIGHT,fg=$BG
# Windows
setw -g window-status-style bg=default,fg=$FG,dim
setw -g window-status-current-style bg=default,fg=$MESSAGE_FG,bold
# Base index (start counting from 1)
set -g base-index 1
setw -g pane-base-index 1
# Status Bottom
set -g status-position bottom
# Status Colors
set-option -g status-style bg=default,fg=$FG
# Status contents
set -g status-left ' TMUX 🦅 '
set -g status-right '%b %d %Y %l:%M %p'
# Message
set -g message-style fg=$MESSAGE_FG,bg=$MESSAGE_BG,bright
# vim: set syntax=tmux:
# Add space between bar and prompt
set -Fg 'status-format[1]' '#{status-format[0]}'
set -g 'status-format[0]' ''
set -g status 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment