Skip to content

Instantly share code, notes, and snippets.

@joshlarsen
Last active July 4, 2022 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshlarsen/165516bbff5022b2b9e250ad989145b5 to your computer and use it in GitHub Desktop.
Save joshlarsen/165516bbff5022b2b9e250ad989145b5 to your computer and use it in GitHub Desktop.
tmux config
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# color terminal
set -g default-terminal "xterm-256color"
# Disable mouse mode
set -g mouse off
# switch panes using Option-arrow without prefix
# Option Left & Right won't work by default in macOS as they are used to
# move between words in the terminal
bind-key -n M-Left select-pane -L
bind-key -n M-Right select-pane -R
bind-key -n M-Up select-pane -U
bind-key -n M-Down select-pane -D
######### Colors ###########
# Status update interval
set -g status-interval 1
# Basic status bar colors
set -g status-style fg=colour7
set -g status-style bg=colour235
# Left side of status bar
set -g status-left-style fg=colour243
set -g status-left-length 41
set -g status-left "#[fg=colour232,bg=#589DF6,nobold] #S #[fg=colour24,bg=colour240,nobold]#[fg=colour250,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour111,nobold]"
# Right side of status bar
set -g status-right-style bg=colour233
set -g status-right-style fg=colour243
set -g status-right-length 150
set -g status-right "#[fg=colour235,bg=colour32]#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour250,bg=colour240] %d-%b-%y #[fg=colour24,bg=colour240]#[fg=colour232,bg=#589DF6,nobold] #H "
# Window status
set -g window-status-format " #I:#W#F "
set -g window-status-current-format "#[fg=#589DF6,bg=colour235]#[fg=#589DF6,nobold] #I:#W#F #[fg=#589DF6,bg=colour235,nobold]"
# Current window status
set -g window-status-current-style bg=colour249
set -g window-status-current-style fg=colour111
# Window with activity status
set -g window-status-activity-style fg=colour245
set -g window-status-activity-style bg=colour250
# Window separator
set -g window-status-separator ""
# Window status alignment
set -g status-justify centre
# Pane border
set -g pane-border-style fg=colour238
set -g pane-border-style bg=default
# Active pane border
set -g pane-active-border-style bg=default
set -g pane-active-border-style fg=color166
# Pane number indicator
set -g display-panes-colour colour250
set -g display-panes-active-colour colour245
# Clock mode
set -g clock-mode-colour colour24
set -g clock-mode-style 12
# Message
set -g message-style bg=colour7
set -g message-style fg=colour239
# Command message
set -g message-command-style bg=colour233
set -g message-command-style fg=colour250
# Mode
set -g mode-style bg=colour250
set -g mode-style fg=colour231
# Resize using arrow keys directions - Ctrl-b, then Option Arrow
# Option Left & Right won't work by default in macOS as they are used to
# move between words in the terminal
bind -r M-Left resize-pane -L 2
bind -r M-Right resize-pane -R 2
bind -r M-Down resize-pane -D 2
bind -r M-Up resize-pane -U 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment