Skip to content

Instantly share code, notes, and snippets.

@sideseal
Created February 21, 2025 01:04
Show Gist options
  • Select an option

  • Save sideseal/05d4fb5fd7b5e788d2d0ac7e6ff2f32f to your computer and use it in GitHub Desktop.

Select an option

Save sideseal/05d4fb5fd7b5e788d2d0ac7e6ff2f32f to your computer and use it in GitHub Desktop.
my new tmux conf
# Colors!
set -g default-terminal "tmux-256color"
# Scrollback buffer size increase
set -g history-limit 100000
# Faster command sequences
set -s escape-time 10
# Increase repeat timeout
set -sg repeat-time 600
# Allow mouse control
set-option -g mouse on
# catch focus event
set -g focus-events on
# split panes using | and _
bind-key | split-window -h
bind-key _ split-window -v
unbind '"'
unbind %
# Clock
set-window-option -g clock-mode-colour "#aa5500"
# Fast Vim change!
set -s escape-time 0
# Use vim keybindings in copy mode
setw -g mode-keys vi
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
# UTF-8
set -q -g status-utf8 on
setw -q -g utf8 on
# No delay for escape key press
set -sg escape-time 0
# Start index from 1
set -g base-index 1
setw -g pane-base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
# Set terminal title
set -g set-titles on
# Activity
set -g monitor-activity on
set -g visual-activity off
# Resize pane size
bind-key -r J resize-pane -D 5
bind-key -r K resize-pane -U 5
bind-key -r H resize-pane -L 5
bind-key -r L resize-pane -R 5
# Swap pane
bind-key -r O swap-pane -D
# Synchronize-panes
bind-key y set-window-option synchronize-panes
# Pane navigation
bind Left select-pane -L # move left
bind Down select-pane -D # move down
bind Up select-pane -U # move up
bind Right select-pane -R # move right
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# reload tmux
bind-key r source-file ~/.tmux.conf \; display "Reloaded!"
# Move to last active window
bind Tab last-window
# Highlight the active window in the status bar.
# set-window-option -g window-status-current-bg yellow
# set-window-option -g window-status-current-fg black
# MISC
set -s focus-events on
# THEME
black='#000000'
yellow='#ffff00'
blue='#0A25AE'
set -g status-position bottom
set -g status-justify left
set -g status-style "bg=$yellow fg=$blue"
set -g window-status-current-style "fg=$yellow bg=$blue bold"
set -g window-status-current-format " #I:#W#F "
set -g status-interval 60
set -g status-left-length 30
set -g status-right-length 50
#set -g status-left "#[fg=$blue](#S) #(whoami)"
# set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'
set -g status-left ' '
set -g status-right "#[bg=$blue,fg=$yellow] %d/%m %H:%M:%S "
# Messages
set -g message-style "fg=$blue bg=$yellow bold"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment