Skip to content

Instantly share code, notes, and snippets.

@shreeve
Last active January 6, 2023 00:30
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 shreeve/c751769ea46b34c1c30b97fa2762770b to your computer and use it in GitHub Desktop.
Save shreeve/c751769ea46b34c1c30b97fa2762770b to your computer and use it in GitHub Desktop.
Config file for tmux
# =============================================================================
# .tmux.conf
#
# Author: Steve Shreeve <steve.shreeve@gmail.com>
# Date: Jan 5, 2023
# =============================================================================
# curl -so ~/.tmux.conf https://gist.githubusercontent.com/shreeve/c751769ea46b34c1c30b97fa2762770b/raw/.tmux.conf
#
# For iTerm2, make sure to check "use Powerline Glyphs" in order to render special chars
#
# Reference: https://github.com/New-Bamboo/Hermes/blob/master/hermes/tmux.conf
# Reference: https://gist.github.com/MohamedAlaa/2961058
# set prefix
unbind C-]
set -g prefix C-]
# quick reload
unbind r
bind r source-file ~/.tmux.conf
# window navigation
unbind C-p
unbind C-n
unbind C-[
unbind C-]
bind C-p previous-window
bind C-n next-window
bind C-[ previous-window
bind C-] next-window
# horizontal and vertical splits
unbind |
unbind _
bind | split-window -h
bind _ split-window
# allow passthrough to outer terminal
set -g allow-passthrough on
# enable activity alerts
set -g visual-activity off
setw -g monitor-activity off
# act like vi
setw -g mode-keys vi
# defaults
set -g default-terminal "screen-256color"
set -g default-command $SHELL
# enable the mouse
set -g mouse on
# make tmux more responsive
set -s escape-time 1
# start window/pane index at 1
set -g base-index 1
set -g pane-base-index 1
set -g pane-border-style fg=colour245
set -g pane-active-border-style fg=colour39
set -g message-style fg=colour16,bg=colour221,bold
# override default colors
set -g status-fg white
set -g status-bg colour234
# status bar
set -g status-left-length 32
set -g status-left "#[fg=colour235,bg=colour252,bold] 🖥 #h #[fg=colour252,bg=colour238,nobold]#[fg=colour245,bg=colour238,bold] 👤 #(whoami) #[fg=colour238,bg=colour234,nobold]"
set -g window-status-format "#[fg=colour234,bg=colour238]#[fg=colour245,bg=colour238] #I  #W #[fg=colour238,bg=colour234,nobold]"
set -g window-status-current-format "#[fg=colour234,bg=colour39]#[fg=white,bg=colour39,noreverse,bold] #I  #W #[fg=colour39,bg=colour234,nobold]"
set -g status-right-length 150
set -g status-right "#[bg=default] #[fg=colour72]#[fg=brightwhite,bg=colour72] #(date +'%d %b %y @ %H:%M') #[reverse] #h "
set -g status-interval 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment