# Unicode powerline symbols used. Install nerd-fonts or sf-font repo. # r: reload tmux config. Remove all bindings, load defaults & prune those. bind-key r unbind-key -a \; source-file ~/.tmux/default-keys.conf \; source-file ~/.tmux.conf \; display-message 'Config reloaded.' unbind-key -T prefix M-Up unbind-key -T prefix M-Down unbind-key -T prefix M-Left unbind-key -T prefix M-Right unbind-key -T prefix C-Up unbind-key -T prefix C-Down unbind-key -T prefix C-Left unbind-key -T prefix C-Right unbind-key -T prefix Up unbind-key -T prefix Down unbind-key -T prefix Left unbind-key -T prefix Right unbind-key '"' unbind-key % # T: pull tmux plugin manager from git and install. bind-key T send-keys 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm; chmod go-rwx ~/.tmux' Enter # General tmux settings. # Remove DISPLAY so it is set on terminal reattach. set-option -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY" set-option -g default-shell '/bin/bash' set -g history-limit 50000 set -g default-terminal 'xterm-256color' set -g status-interval 15 set -g display-time 2000 # Fix explicit escape delay for vim (http://superuser.com/a/252717/65504) set -sg escape-time 0 # | -: vertical and horizontal pane splitting. bind-key | split-window -h bind-key - split-window -v # p+alt+arrow: panel resizing. bind-key -r -T prefix M-Up resize-pane -U bind-key -r -T prefix M-Down resize-pane -D bind-key -r -T prefix M-Left resize-pane -L bind-key -r -T prefix M-Right resize-pane -R # alt+arrow: select panel. bind-key -n M-Left select-pane -L bind-key -n M-Right select-pane -R bind-key -n M-Up select-pane -U bind-key -n M-Down select-pane -D # < >: move to window left or right. bind-key -r '<' previous-window bind-key -r '>' next-window # Enable mouse (clickable windows, panes, resizable panes). set -g mouse on # don't rename windows automatically. set-option -g automatic-rename off # Turn of visual alarms. set -g bell-action none set -g visual-activity off set -g visual-bell off set -g visual-silence off setw -g monitor-activity off # Start windows at 1 instead of 0. set -g base-index 1 set -g pane-base-index 1 # Theme CL241='colour241' CL239='colour239' CL238='colour238' CL237='colour237' CL235='colour235' CL222='colour222' CL154='colour154' CL121='colour121' CL010='colour10' CL009='colour9' # Set custom sysstat display. set -g @sysstat_mem_view_tmpl "#[fg=#{mem.color}]#{mem.used}#[bg=$CL237]/#{mem.total}" set -g @sysstat_cpu_view_tmpl '#[fg=#{cpu.color}]#{cpu.pused}#[default]' TEXT_1="#[fg=$CL010,bg=$CL241]" SEP_1="#[fg=$CL241,bg=$CL239]" TEXT_2="#[fg=$CL009,bg=$CL239]" SEP_2="#[fg=$CL239,bg=$CL237]" TEXT_3="#[fg=$CL235,bg=$CL237]" SEP_3="#[fg=$CL237,bg=$CL235]" HOST="$TEXT_1#H$SEP_1" LOAD="$TEXT_2 #{sysstat_loadavg}$SEP_2" CPU="$TEXT_3 #{sysstat_cpu}$SEP_3" MEM="$SEP_3$TEXT_3#{sysstat_mem} " DATE="$SEP_2$TEXT_2%Y-%m-%d " CLOCK="$SEP_1$TEXT_1%R" # Theme set -g clock-mode-style 24 set -g message-command-fg "$CL222" set -g message-command-bg "$CL238" set -g status 'on' set -g status-bg "$CL235" set -g status-attr 'none' set -g status-justify 'centre' set -g status-left-attr 'none' set -g status-left-length '100' set -g status-left "$HOST$LOAD$CPU" set -g status-right-attr 'none' set -g status-right-length '100' set -g status-right "$MEM$DATE$CLOCK" set -g pane-border-fg "$CL238" set -g pane-active-border-fg "$CL222" set -g message-fg "$CL222" set -g message-bg "$CL238" setw -g window-status-fg "$CL121" setw -g window-status-bg "$CL235" setw -g window-status-attr 'none' setw -g window-status-activity-fg "$CL154" setw -g window-status-activity-bg "$CL235" setw -g window-status-activity-attr 'none' setw -g window-status-separator '' # Pane scrollback indicator set -g mode-style fg=$CL222,bg=$CL235 # Standard window indicator setw -g window-status-format "#[fg=$CL121,bg=$CL235]#I|#W#[fg=$CL235,bg=$CL235]" # Active window indicator setw -g window-status-current-format "#[fg=$CL238,bg=$CL235]#[fg=$CL222,bg=$CL238]#{?window_zoomed_flag,,#I}|#W#[fg=$CL238,bg=$CL235]" # Plugin managment; reload with: crtl-b, shift-I set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'samoshkin/tmux-plugin-sysstat' run '~/.tmux/plugins/tpm/tpm'