Skip to content

Instantly share code, notes, and snippets.

@jerieljan
Last active July 1, 2025 02:19
Show Gist options
  • Save jerieljan/9b14ebdac3cf488ac29ab65141c82044 to your computer and use it in GitHub Desktop.
Save jerieljan/9b14ebdac3cf488ac29ab65141c82044 to your computer and use it in GitHub Desktop.
My personal tmux.conf.

README

This is my personal tmux.conf file.

What it does

It's better appreciated if you look at the preview here

Essentials

  • Sets the terminal/tab/window title to display session, window, pane, program, and host info.
  • Forces 256-color support in tmux for better colors.
  • Monitors activity in inactive panes (on by default), so you get notified (e.g., color/bell) if other panes have output.
  • Alt/Option + Arrow keys allow fast pane switching.
  • Tabs/windows are numbered starting from 1 (not 0).
  • Longer scrollback/history is enabled (up to 100,000 lines).

Mouse Support

  • Mouse support is enabled, letting you click to select panes, resize, scroll, and change tabs/windows.
  • Scroll wheel over a pane either scrolls or triggers pane/copy mode, depending on if text is selected.

Design/Appearance

  • Colors and styles are customized heavily for a modern look (with Tailwind-inspired palettes).
  • Status bar is at the bottom, left-justified.
  • Clock mode & selection/copy mode are custom colored.
  • Pane borders are colored (inactive is dark, active is red).
  • Status bar uses gray-blue colors: easy on the eyes, good contrast.
  • Left side: shows the name of the current tmux session.
  • Right side: shows the time and the host name.
  • Tabs (windows):
    • Selected tab: rounded, bold, highly visible.
    • Normal tab: muted, with a minimalist divider.
    • Tabs with activity/bell: colored amber/yellow for urgency.
  • Messages (showing command output, errors) are styled in bold with prominent contrast.

Other Notables

  • Suitable for both local and SSH/multi-host work (shows host in status bar).
  • Encourages using tmux in 256-color mode for a richer experience.
  • Designed for readability and productivity, especially when using many panes/windows.
# tmux Config by jerieljan
#########################################################
# #
# ,d #
# 88 #
# MM88MMM 88,dPYba,,adPYba, 88 88 8b, ,d8 #
# 88 88P' "88" "8a 88 88 `Y8, ,8P' #
# 88 88 88 88 88 88 )888( #
# 88, 88 88 88 "8a, ,a88 ,d8" "8b, #
# "Y888 88 88 88 `"YbbdP'Y8 8P' `Y8 #
#########################################################
################
## ESSENTIALS ##
################
# Set terminal title bar format.
set-option -g set-titles on
set-option -g set-titles-string 'tmux #S:#I.#P #W [#H]' # <window>:<tab>.<pane> <program> [host]
# Use 256 colors.
# You'll want to add in `alias tmux="tmux -2"` on your bashrc/zshrc too.
# set -g default-terminal "screen-256color" # For older versions (< 2.1)
set -g default-terminal "xterm-256color"
# set -g default-terminal "tmux-256color" # For newer versions
# Some defaults on bel / flash behavior.
setw -g monitor-activity on # Enabling this will trigger a color change and bell when changes are detected in a different pane.
# set -g visual-activity on # Enabling this will flash the statusbar instead of playing the PC tone / bell.
# Enable pane switching with Opt/Alt+ArrowKeys
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Start tab counts on index 1 instead of zero.
set -g base-index 1
# Enable longer scrollback / history.
set -g history-limit 100000
######################
## MOUSE SUPPORT ##
######################
## Depending on your environment, you may want to enable/disable this since tmux
## will complain if you're running on a headless system.
# Enable mouse support.
set -g mouse on
# Move between tabs using the mousewheel.
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
######################
### DESIGN CHANGES ###
######################
## This section is best viewed in vim since it'll indicate
## colour codes if it's enabled there.
# Modes
set -g clock-mode-colour colour5
setw -g mode-style fg=colour1,bg=colour23,bold
# Panes
set -g pane-border-style fg=colour23
set -g pane-active-border-style fg=colour9
# Status Bar - Position
set -g status-position bottom
set -g status-justify left
# Status Bar - General
# Color Info: Tailwind Slate 300 + 700
set -g status-style fg="#cbd5e1",bg="#334155",dim
set -g status-right-length 50
set -g status-left-length 20
# Status Bar Contents
## There are multiple options here.
# :: Left Padding - Current Session Name
set -g status-left ' #S :: '
# :: Complete Date
# set -g status-right '#[fg=colour233,bg=colour8,bold] %Y-%m-%d #[fg=colour233,bg=colour8,bold] %H:%M:%S '
# :: Hostname + Time
set -g status-right '#[none] %H:%M #[bold] #h '
# Window / Tab Contents
## These affect the looks of the tabs, and how they behave when they're selected or not.
# Selected
# Color Info: Tailwind Slate 800 + 400
setw -g window-status-current-style fg="#1e293b",bg="#94a3b8",bold
setw -g window-status-current-format '[#I‣#W]'
# Normal
# Color Info: Tailwind Slate 300 + 600
setw -g window-status-style fg="#cbd5e1",bg="#475569",none
setw -g window-status-format '|#I᠅#W|'
# Activity and Bell
# Color Info: Tailwind Amber 300 + 600
setw -g window-status-bell-style fg="#fcd34d",bg="#d97706",bold
setw -g window-status-activity-style fg="#fcd34d",bg="#d97706",bold
# Messages
set -g message-style fg=colour255,bg=colour238,bold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment