Skip to content

Instantly share code, notes, and snippets.

@mmpx12
Created July 30, 2025 12:36
Show Gist options
  • Select an option

  • Save mmpx12/b3c3a224624a8ea94e1081ffd59bd829 to your computer and use it in GitHub Desktop.

Select an option

Save mmpx12/b3c3a224624a8ea94e1081ffd59bd829 to your computer and use it in GitHub Desktop.
tmux conf
# ====================
# Terminal Configuration
# ====================
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
set -g default-command 'exec /bin/bash'
# ===============
# Mouse Behavior
# ==================
set -g mouse on
set -g focus-events on
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection
# Enhanced scrolling
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" \
"if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
# =================
# Window Navigation
# =================
bind p previous-window
bind n next-window
# ================
# History Settings
# ================
set -g history-limit 10000
bind-key : command-prompt -p "(tmux cmd)" {
run-shell "echo '%%' >> ~/.tmux_cmd_history" # Optional: save to file
new-window -n "tmux-cmd" "echo '%%' >> ~/.tmux_cmd_history; tmux wait-for -S cmd-done"
wait-for cmd-done
}
# ===================
# Status Bar Styling
# ===================
set -g status on
set -g status-interval 1
set -g status-justify left
set -g status-left-length 200
set -g status-right-length 200
# Color scheme
set -g message-command-style fg=cyan,bg=black
set -g message-style fg=green,bg=black
set -g status-style "bg=colour234,fg=#2bff00"
set -g window-status-style "bg=black,fg=green"
set -g window-status-current-style "fg=green"
# Status content
set -g status-left "#[fg=#2bff00,bg=black][ #[fg=#2bff00]#H #[fg=#2bff00]]=> "
set -g status-right "#[fg=#2bff00,bg=black][ %a %d/%m #[fg=white]%H:%M:%S #[fg=#2bff00]]"
# Window display
set -g window-status-format "#[fg=red,bg=black](#[fg=white]#I:#W#[fg=red])"
set -g window-status-current-format " #[bold,fg=green][#[nobold,fg=cyan]#I:#W#[bold,fg=green]]#[nobold]"
set -g window-status-separator " "
# ================
# Other Settings
# ================
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g display-panes-time 2000
set -g display-time 2000
bind-key r command-prompt -I "#W" "rename-window '%%'"
set -g pane-border-style fg=red
set -g pane-active-border-style fg=green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment