# .tmux.conf # Author: bo@kbct.de ################ # keybindings # # Set prefix to ^a (like screen) unbind ^b set -g prefix ^a bind a send-prefix set -g repeat-time 300 # set window's title unbind A bind A command-prompt "rename-window %%" # new window like screen unbind ^C bind ^C new-window # next/prev window # -n: without prefix bind -n f11 previous-window bind -n f12 next-window bind -n M-j previous-window bind -n M-k next-window # move window left/right bind -n M-J swap-window -t :- bind -n M-K swap-window -t :+ # swap-windows -t :- # swap-windows -t :+ bind-key C-q confirm kill-server bind-key Escape copy-mode set -s escape-time 150 set -g display-panes-time 2000 # C-a q # reload conf unbind r bind r source ~/.tmux.conf # small vertical split unbind - bind - split-window -l 17 # resize pane with arrow keys # -r: can be repeated without pressing prefix # again (500ms after last '-r' action or prefix) unbind Left unbind Right unbind Down unbind Up bind -r Left resize-pane -L 2 bind -r Right resize-pane -R 2 bind -r Down resize-pane -D 2 bind -r Up resize-pane -U 2 # change pane focus with (shift-) tab bind -r Tab select-pane -t :.+ bind -r BTab select-pane -t :.- # window select menu unbind * bind * choose-window # vi-style controls setw -g mode-keys vi # in copy mode set -g status-keys vi # in the status line ################ # colors # # statusbar set -g status-attr underscore set -g status-bg black set -g status-fg yellow # invert active window colors + bright set-window-option -g window-status-current-attr reverse,bright #set-window-option -g window-status-current-attr underscore # only uptime # BUG! tmux doesnt use the related closing bracket, it uses the first one found! (found in tmux1.2) #set status-left "#(uptime | sed 's/.*\(up.*days\), \([0-9]\{1,2\}\).*/\1, \2 hours/')" #set -g status-left "#[underscore]#(uptime | awk '{ print \"uptime: \" $3 \" \" $4 \" \" $5 }' | sed 's/,//g')" set -g status-left "#[underscore]#(uptime | sed 's/^.*averages: \\\\\\(.*\\\\\\)$/\\\\\\1/')" set -g status-left-length 40 # default is 10, kinda small... # Date and Time: Wed, 08.12.10, 16:12:41 set -g status-right "#[underscore]%a, %d.%m.%y, %H\:%M\:%S " # update status every second set -g status-interval 1 set -g status-justify centre # warnings and tmux cmd set -g message-attr default set -g message-bg red set -g message-fg white # mark all panes with a small white line set -g pane-border-bg black set -g pane-border-fg white # active ones with a big line set -g pane-active-border-bg white set -g pane-active-border-fg black ################ # misc # # als notiz: wenn putty mal rumspackt #set -g terminal-overrides "xterm*:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@" setw -g monitor-activity set -g visual-activity on set -g visual-bell off #set -g bell-action any # scrollback lines set -g history-limit 5000 ################ # init session # # window index begins at 1 set -g base-index 1 # -d: doesnt make the new window active new -s main #new session neww -d neww -d #switchc -t0 #attach-session -t main #select-window -t main:1