Skip to content

Instantly share code, notes, and snippets.

@barthr
Created October 21, 2018 20:39
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 barthr/c178c5bfb763b0db50c2c5594533b2aa to your computer and use it in GitHub Desktop.
Save barthr/c178c5bfb763b0db50c2c5594533b2aa to your computer and use it in GitHub Desktop.
Tmux con from mac
set -g default-terminal "screen-256color"
set-window-option -g xterm-keys on
set-window-option -g mode-keys vi
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
# THEME
## Colors
black='colour16'
white='colour255'
gray='colour236'
dark_gray='colour236'
yellow='colour215'
light_purple='colour141'
dark_purple='colour61'
left_sep=''
right_sep=''
right_alt_sep=''
set-option -g status on
set-option -g status-left-length 100
set-option -g status-right-length 100
set-option -g status-bg "${dark_gray}"
set-option -g pane-active-border-fg "${dark_purple}"
set-option -g pane-border-fg "${dark_purple}"
set-option -g message-bg "${gray}"
set-option -g message-fg "${white}"
set-option -g message-command-bg "${gray}"
set-option -g message-command-fg "${white}"
set-option -g status-left " #I #[fg=${dark_gray},reverse]${right_sep} "
set-option -g status-left-style "fg=${white},bg=${dark_purple},bold"
set-option -g status-right "${left_sep}#[bg=${black},reverse] %Y-%m-%d %H:%M "
set-option -g status-right-style "fg=${light_purple},bg=${dark_gray}"
set-window-option -g window-status-activity-style "fg=${white},bg=${gray}"
set-window-option -g window-status-separator ''
set-window-option -g window-status-format ' #I #W '
set-window-option -g window-status-style "fg=${white},bg=${dark_gray}"
set-window-option -g window-status-current-format \
"#[fg=${black}] #I ${right_alt_sep} #W #[fg=${dark_gray},reverse]"
set-window-option -g window-status-current-style "fg=${dark_gray},bg=${light_purple}"
# END THEME
# PLUGINS GO HERE!!!
run '~/dotfiles/tpm/tpm'
# UTF is great, let us use that
set -g utf8
set-window-option -g utf8 on
# Tmux should be pretty, we need 256 color for that
set -g default-terminal "screen-256color"
set-option -g mouse on
# Tmux uses a 'control key', let's set it to 'Ctrl-a'
# Reason: 'Ctrl-a' is easier to reach than 'Ctrl-b'
set -g prefix C-a
unbind C-b
bind -n C-k send-keys -R \; send-keys C-l \; clear-history
# command delay? We don't want that, make it short
set -sg escape-time 1
# set-option -g default-command "reattach-to-user-namespace -l zsh"
# Set the numbering of windows to go from 1 instead
# of 0 - silly programmers :|
set-option -g base-index 1
setw -g pane-base-index 1
# Allow us to reload our Tmux configuration while
# using Tmux
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Getting interesting now, we use the vertical and horizontal
# symbols to split the screen
bind | split-window -h
bind - split-window -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment