Skip to content

Instantly share code, notes, and snippets.

@dadaphl
Created October 15, 2019 20:48
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 dadaphl/bc0a59a838544c8edaf405fff4afed13 to your computer and use it in GitHub Desktop.
Save dadaphl/bc0a59a838544c8edaf405fff4afed13 to your computer and use it in GitHub Desktop.
set -g default-command "reattach-to-user-namespace -l zsh"
#set-option -g status-utf8 on
unbind C-b
set -g prefix C-q
bind C-q send-prefix
#bind-key -n C-b send-prefix
set -g base-index 1
#set-window-option -g xterm-keys on
set-option -gw xterm-keys on
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
setw -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
#bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# setw -g mode-mouse on
# explicitly disable mouse control
#set -g mouse-utf8 on
set -g mouse on
bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -n WheelDownPane select-pane -t= \; send-keys -M
setw -g monitor-activity off
set-option -g visual-bell off
set-option -g visual-activity off
bind-key F set-option status
bind-key | split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind C new-window
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
bind-key M-j resize-pane -D
bind-key M-k resize-pane -U
bind-key M-h resize-pane -L
bind-key M-l resize-pane -R
bind-key -n Home resize-pane -L 5
bind-key -n End resize-pane -R 5
# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Use Alt-vim keys without prefix key to switch panes
#bind -n M-h select-pane -L
#bind -n M-j select-pane -D
#bind -n M-k select-pane -U
#bind -n M-l select-pane -R
# Use Alt-arrow keys without prefix key to switch panes
#bind -n M-Left select-pane -L
#bind -n M-Right select-pane -R
#bind -n M-Up select-pane -U
#bind -n M-Down select-pane -D
# Shift arrow to switch windows
#bind -n S-Left previous-window
#bind -n S-Right next-window
# No delay for escape key press
set -sg escape-time 0
# Reload tmux config
bind r source-file ~/.tmux.conf
# THEME
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
#set -g status-bg black
#set -g status-fg white
set -g window-status-current-bg red
set -g window-status-current-fg black
set -g window-status-current-attr bold
#set -g status-interval 30
#set -g status-left-length 30
#set -g status-right '#[fg=white]%H:%M#[default]'
## set -g status-right '#(rainbarf) #[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'
## set -g status-left '#[fg=green](#S) #(whoami)@#(hostname)'
#set -g status-right '#(rainbarf)'
# border colours
#set -g pane-border-style fg=default #magenta
#set -g pane-border-style bg=white#magenta
#set -g pane-active-border-style fg=red
#set -g pane-active-border-style bg=blue
# ----------------------
# Status Bar
# -----------------------
set-option -g status on # turn the status bar on
#set -g status-utf8 on # set utf-8 for the status bar
set -g status-interval 5 # set update frequencey (default 15 seconds)
set -g status-justify centre # center window list for clarity
# set-option -g status-position top # position the status bar at top of screen
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# set color for status bar
set-option -g status-bg colour235 #base02
#set-option -g status-fg yellow #yellow
set-option -g status-attr dim
# set window list colors - red for active and cyan for inactive
set-window-option -g window-status-fg colour236
set-window-option -g window-status-bg colour250
set-window-option -g window-status-attr dim
set-window-option -g window-status-current-fg colour236
set-window-option -g window-status-current-bg colour109
set-window-option -g window-status-current-attr bright
set-option -g pane-border-fg colour109
set-option -g pane-border-bg black
set-option -g pane-active-border-fg colour3
set-option -g pane-active-border-bg colour234
set -g status-bg colour236
set -g status-fg colour250
set -g status-left-length 70
set -g status-left "#S | #h"
# show session name, window & pane number, date and time on right side of
# status bar
set -g status-right-length 60
set -g status-right "%d %b · mx #(TZ=America/Mexico_City date | awk '{print $4}') · de #(TZ=Europe/Berlin date | awk '{print $4}') · jp #(TZ=Asia/Tokyo date | awk '{print $4}') #[bg=black]#[fg=white]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment