#--------------------------------------------------------------- # file: ~/.tmux.conf # author: jason ryan - http://jasonwryan.com/ # vim:nu:ai:si:et:ts=4:sw=4:fdm=indent:fdn=1:ft=conf: #--------------------------------------------------------------- #~/.tmux.conf - tmux terminal multiplexer config # Based heavily on Thayer Wiliams' (http://cinderwick.ca) # set prefix key to ctrl+t unbind C-b set -g prefix C-t # reload config without killing server bind r source-file ~/.tmux.conf # more intuitive keybindings for splitting unbind % bind h split-window -v unbind '"' bind v split-window -h # set vi keys unbind [ bind Escape copy-mode setw -g mode-keys vi # send the prefix to client inside window (ala nested sessions) bind-key a send-prefix # toggle last window like screen bind-key C-b last-window # confirm before killing a window or the server bind-key k confirm kill-window bind-key K confirm kill-server # toggle statusbar bind-key b set-option status # ctrl+left/right cycles thru windows bind-key -n C-right next bind-key -n C-left prev # open a man page in new window bind m command-prompt "split-window 'exec man %%'" # quick view of processes bind '~' split-window "exec htop" # scrollback buffer n lines set -g history-limit 5000 # listen for activity on all windows set -g bell-action any # on-screen time for display-panes in ms set -g display-panes-time 2000 # start window indexing at one instead of zero set -g base-index 1 # enable wm window titles set -g set-titles on # disable auto renaming # setw -g automatic-rename off # border colours set -g pane-active-border-bg default # wm window title string (uses statusbar variables) set -g set-titles-string "tmux:#I [ #W ]" # session initialization new -d -s0 -nTTYtter 'ttytter' setw -t0:0 neww -d -nvifm 'vifm' setw -t0:1 neww -d -nncmpcpp 'ncmpcpp' setw -t0:2 selectw -t 0 # statusbar -------------------------------------------------------------- set -g status-interval 1 set -g status-justify centre # center align window list set -g status-left-length 20 set -g status-left '#[fg=green] #H #[fg=black]• #[fg=green,bright]#(uname -r | cut -c 1-6)#[default]' set -g status-right '#[fg=blue,bright]Up#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=black]• #[fg=cyan,bright]#(cut -d " " -f 1-4 /proc/loadavg) ' # default statusbar colors set -g status-fg white set -g status-bg default set -g status-attr bright # default window title colors set-window-option -g window-status-fg white set-window-option -g window-status-bg default set-window-option -g window-status-attr dim # active window title colors set-window-option -g window-status-current-fg white set-window-option -g window-status-current-bg default set-window-option -g window-status-current-attr bright # command/message line colors set -g message-fg white set -g message-bg black set -g message-attr bright # show some useful stats but only when tmux is started # outside of Xorg, otherwise dwm statusbar shows these already #set -g status-right "" #set -g status-left "" #if '[ -z "$DISPLAY" ]' 'set -g status-left "[#[fg=green] #H #[default]]"' #if '[ -z "$DISPLAY" ]' 'set -g status-right "[ #[fg=magenta]#(cat /proc/loadavg | cut -d \" \" -f 1,2,3)#[default] ][ #[fg=cyan,bright]%a %Y-%m-%d %H:%M #[default]]"' #if '[ -z "$DISPLAY" ]' 'set -g status-right-length 50'