Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 183 lines (141 sloc) 5.69 KB
set -g default-terminal "screen-256color"
# set -g default-terminal "xterm-256color"
set-option -g default-shell /bin/zsh
# Set misc settings.
set-window-option -g mode-keys vi
set-window-option -g status-keys vi
set-window-option -g alternate-screen off
set-option -g set-titles on
set-option -g status-left '#h:'
set-option -g terminal-overrides 'rxvt-unicode*:sitm@,ritm@'
# set-option -g default-path '/Users/timothy'
# As of 1.9, default-path option has been removed.
# Fix: E353: Nothing in register *
# Src: http://stackoverflow.com/questions/25684945/pasting-in-vim-on-tmux-returns-this-error-e353-nothing-in-register
# Install: reattach-to-user-namespace
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Set key for remote tmux session.
bind-key b send-prefix
# default statusbar colors.
set-option -g status-bg yellow
set-option -g status-fg yellow
set-option -g status-attr default
# Set default window title colors.
set-window-option -g window-status-fg brightblue
set-window-option -g window-status-bg default
# set-window-option -g window-status-attr dim
# Set active window title colors.
set-window-option -g window-status-current-fg brightred
set-window-option -g window-status-current-bg default
# set-window-option -g window-status-current-attr bright
# Set pane border.
set-option -g pane-border-fg colour240
set-option -g pane-active-border-fg brightgreen
# Set message text.
set-option -g message-bg black
set-option -g message-fg brightred
# Set pane number display.
set-option -g display-panes-active-colour blue
set-option -g display-panes-colour brightred
# Set clock option(s).
# set-window-option -g clock-mode-colour green #green
# Set mouse settings.
# The following settings are incompatible with tmux 2.1
# I did the upgrade on December 8, 2015, at 5 AM
# set -g mode-mouse off
# set -g mouse-resize-pane off
# set -g mouse-select-pane off
# set -g mouse-select-window off
# Now this works on tmux 2.1
# Hmmm, this does not work either, commented to be tested next time.
# mouse off
# Set hjkl to switch panes.
bind k selectp -U
bind j selectp -D
bind h selectp -L
bind l selectp -R
# Set HJKL to resize panes.
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# Set window, pane index to 1 from default 0.
set-option -g base-index 1
setw -g pane-base-index 1
##
# Set statusbar settings.
##
set-option -g status on # turn the status bar on
set -g status-interval 2 # set update frequencey (default 15 seconds)
# set -g status-utf8 on # set utf-8 for the status bar # this returns /Users/timothy/.tmux.conf:86: unknown option: status-utf8
# set -g status-justify centre # center window list for clarity
# set-option -g status-position top # position the status bar at top of screen
# Set 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
set-option -g status-fg 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 brightblue
set-window-option -g window-status-bg colour236
set-window-option -g window-status-attr dim
set-window-option -g window-status-current-fg brightred
set-window-option -g window-status-current-bg colour236
set-window-option -g window-status-current-attr bright
# Set status-left options.
set -g status-left-length 70
set -g status-left "#[fg=black,bg=white] #S #[bg=colour245] #[bg=colour240] #[bg=colour237] "
# Set status options.
set -g window-status-separator ""
# set -g window-status-style "#[fg=colour144,bg=colour237]"
set -g window-status-style "none"
set -g window-status-format " #I:[#W] "
set -g window-status-current-format "#[fg=colour144,bg=colour237] #I: [#W] "
# Get path/project.
# pwd=$(echo pwd)
# if git -C $pwd rev-parse --git-dir > /dev/null 2>&1; then
# echo yes
# else
# echo no
# fi
# Set status-right options.
set -g status-right-length 60
# set -g status-right "path: #{pane_current_path} #[fg=colour144,bg=colour237] %d %b %Y ::%l:%M %p #(tmux-mem-cpu-load --colors -i 1) #[default]"
set -g status-right "#[fg=colour144,bg=colour237] %d %b %Y ::%l:%M %p #(tmux-mem-cpu-load --colors -i 1) #[default] "
# Don't rename windows automatically.
set-option -g allow-rename off
# Reload tmux configuration file.
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..."
# Toggle pause/play for mpc player using run-shell instead of send-keys.
bind m run-shell "mpc toggle 1>/dev/null; tmux display-message \"$(mpc status | sed -n 2p | awk '{print $1}') $(mpc current)\""
# More options for mpd, mpc.
# bind M run-shell "bash ~/.bin/mpc.sh 1>/dev/null;"
# Set focused panes.
# http://stackoverflow.com/a/33562182
# http://stackoverflow.com/a/33553372
# This works on tmux 2.1 and above.
# https://www.reddit.com/r/tmux/comments/3paqoi/tmux_21_has_been_released/
set -g pane-active-border-style fg=colour63,bg=default
set -g pane-border-style fg=colour235,bg=default
# setw -g window-active-style 'bg=black'
# setw -g window-style 'bg=#101010'
##
# Tmux Plugin Manager.
# List of plugins.
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'seebi/tmux-colors-solarized'
# Tmux resurrect.
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Resurrect vim.
set -g @resurrect-strategy-vim 'session'
# Resurrect ncmpcpp.
set -g @resurrect-processes 'vim ncmpcpp'
# Tmux colors solarized.
# Options: 256, dark, light
set -g @colors-solarized 'dark'
# Tmux mem-cpu load.
set -g @plugin 'thewtex/tmux-mem-cpu-load'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf).
run '~/.tmux/plugins/tpm/tpm'
You can’t perform that action at this time.