Skip to content

Instantly share code, notes, and snippets.

@twardnw
Created May 1, 2018 17:15
Show Gist options
  • Save twardnw/ae5db2c01b4e3d5b9269b75e599e0d7c to your computer and use it in GitHub Desktop.
Save twardnw/ae5db2c01b4e3d5b9269b75e599e0d7c to your computer and use it in GitHub Desktop.
tmux conf that makes it behave more like screen
# bind to Ctrl-a
set-option -g prefix C-a
# more intuitive split bindings
unbind % # Remove default binding since we’re replacing
bind | split-window -h
bind - split-window -v
# set up status bar
set -g status-bg black
set -g status-fg white
set -g status-justify centre
set -g status-right-length 60
set -g status-left-length 60
set -g status-left '⣿ #[fg=green]#H #[fg=white]⡇'
set -g status-right '⡇ #[fg=yellow]%H:%M #[fg=white]⣿'
setw -g window-status-current-format ' #W ###I '
setw -g window-status-format ' #W ###I '
## message text colors
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
# 'last window' binding (Ctrl-a x2)
bind-key C-a last-window
# Highlight active window
set-window-option -g window-status-current-bg red
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
# Automatically set window title
setw -g automatic-rename
# start window numbering at 1
set -g base-index 1
# edit configuration
bind e new-window -n '~/.tmux.conf' '${EDITOR:-vim} ~/.tmux.conf && tmux source ~/.tmux.conf && tmux display "~/.tmux.conf sourced"'
# reload configuration
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
# 24 hour clock
setw -g clock-mode-style 24
# mouse mode (click between panes/windows)
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment