Skip to content

Instantly share code, notes, and snippets.

@OJ
Created August 19, 2025 04:35
Show Gist options
  • Select an option

  • Save OJ/3ae81caea16732fce477ce102a7e8028 to your computer and use it in GitHub Desktop.

Select an option

Save OJ/3ae81caea16732fce477ce102a7e8028 to your computer and use it in GitHub Desktop.
tmux config
# change the prefix from 'C-b' to 'C-a'
# (remap capslock to CTRL for easy access)
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# start with window 1 (instead of 0)
set -g base-index 1
# start with pane 1
set -g pane-base-index 1
# split panes using | and -, make sure they open in the same path
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# open new windows in the current path
bind c new-window -c "#{pane_current_path}"
# reload config file
bind r source-file ~/.tmux.conf
unbind p
bind p previous-window
bind C-h select-pane -L
bind C-l select-pane -R
bind C-k select-pane -U
bind C-j select-pane -D
bind h select-window -p
bind l select-window -n
# shorten command delay
set -sg escape-time 1
# don't rename windows automatically
set -g allow-rename off
# mouse control (clickable windows, panes, resizable panes)
set -g mouse on
# Use Alt-vim keys without prefix key to switch panes
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D
# enable vi mode keys
set-window-option -g mode-keys vi
# set default terminal mode to 256 colors
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# allow focus events to get through to applications running in tmux
set -g focus-events on
# Design Tweaks
# -------------
# loud or quiet?
set -g visual-activity on
set -g visual-bell on
set -g visual-silence off
setw -g monitor-activity off
set -g bell-action none
# modes
setw -g clock-mode-colour yellow
setw -g mode-style 'fg=black bg=red bold'
# panes
set -g pane-border-style 'fg=red'
set -g pane-active-border-style 'fg=yellow'
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'fg=red'
set -g status-left '#{?client_prefix,#[fg=green],#[fg=red]} '
set -g status-left-length 10
set -g status-right-style 'fg=black bg=yellow'
set -g status-right '#[reverse]#[noreverse]%Y-%m-%d %H:%M#[reverse]#[noreverse]'
setw -g window-status-current-style 'fg=black bg=red bold'
setw -g window-status-current-format '#[reverse]#[noreverse]#I #W #F#[reverse]#[noreverse]'
setw -g window-status-style 'fg=red'
setw -g window-status-separator ''
setw -g window-status-format ' #I #[fg=white]#W #[fg=yellow]#F '
setw -g window-status-bell-style 'fg=yellow bg=red bold'
# messages
set -g message-style 'fg=yellow bg=black bold'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment