tmux.conf (3507B)
1 # Tmux configuration file 2 # Documented by Vincent Demeester. 3 # Note that I am using bepo keyboard (that why key binding might be a 4 # little weird for you). 5 # First thing first, quickly reload $HOME/.tmux.conf 6 #bind o source-file ~/.tmux.conf; display "tmux configuration reloaded." 7 set -g history-limit 500000 8 # Be sure to deactive the mode 9 # set -g mode-mouse off 10 # By default tmux adds a small delay when sending commands. 11 # Reducing this delay by setting escape-time. 12 set -sg escape-time 1 13 bind v paste-buffer 14 # Vim-behavior for moving between panes 15 bind c select-pane -L 16 bind t select-pane -D 17 bind s select-pane -U 18 bind r select-pane -R 19 # Re-binding new-window and kill-pane to something more bepo-ish 20 bind x new-window 21 unbind c 22 bind y kill-pane 23 # Re-binding list-of-session 24 bind u list-sessions 25 # Vim-behavior for moving between windows 26 bind -r C-t select-window -t :- 27 bind -r C-s select-window -t :+ 28 # Vim-behavior for resizing panes 29 bind -r C resize-pane -L 5 30 bind -r T resize-pane -D 5 31 bind -r S resize-pane -U 5 32 bind -r R resize-pane -R 5 33 # vi-mode for copy. 34 set -g mode-key vi 35 # `PREFIX`-`ESCAPE` for going into copy mode 36 bind-key ESCAPE copy-mode 37 bind-key b copy-mode 38 # Rebinding some vi-copy keys in a more bepoish fashion. 39 #bind-key -Tvi-copy 'v' begin-selection 40 #bind-key -Tvi-copy 'y' copy-selection 41 #bind-key -Tvi-copy 'C' top-line 42 #bind-key -Tvi-copy 'T' scroll-down 43 #bind-key -Tvi-copy 'S' scroll-up 44 #bind-key -Tvi-copy 'R' bottom-line 45 #bind-key -Tvi-copy 'c' cursor-left 46 #bind-key -Tvi-copy 't' cursor-down 47 #bind-key -Tvi-copy 's' cursor-up 48 #bind-key -Tvi-copy 'r' cursor-right 49 # Telling childs that this is a 256 terminal multiplexer 50 set -g default-terminal "screen-256color" 51 # Maximizing/Restoring panes (useful for *a lot* of workflows) 52 unbind Up 53 bind Up new-window -d -n tmp \; swap-pane -s tmp \; select-window -t tmp 54 unbind Down 55 bind Down last-window \; swap-pane -s tmp \; kill-window -t tmp 56 # Recording pane content to a file. (This is crasy !) 57 bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log" 58 59 # titles 60 # set -g show -g says 61 set -g set-titles on 62 set -g set-titles-string "tmux - #S:#I.#P (#W)" 63 # Set window notifications 64 setw -g monitor-activity on 65 set -g visual-activity on 66 # Rather than constraining window size to the maximum size of any client 67 # connected to the *session*, constrain window size to the maximum size of any 68 # client connected to *that window*. Much more reasonable. 69 setw -g aggressive-resize on 70 # binding 71 bind-key C-a last-window 72 bind-key C-r command-prompt 'rename-window %%' 73 bind-key '"' split-window -v -c '#{pane_current_path}' 74 bind-key '%' split-window -h -c '#{pane_current_path}' 75 76 # Custom status line 77 set-option -g status-left '-- #[fg=colour253]#S - ' 78 set-window-option -g window-status-format '#[fg=colour244]#I/#[fg=colour253] #W ' 79 set-window-option -g window-status-current-format '#[fg=colour244]#I/#[fg=colour253,bg=colour238] #W ' 80 set-option -g status-right '#[fg=colour250] %Y-%m-%d #[fg=colour254]%H.%M' 81 set-option -g status-bg colour234 82 set-option -g status-fg colour007 83 set-option -g status-position top 84 85 # Custom split colours 86 set -g pane-active-border-style bg=colour234,fg=colour234 87 set -g pane-border-style bg=colour234,fg=colour234 88 89 # loud or quiet? 90 set-option -g visual-activity off 91 set-option -g visual-bell on 92 set-option -g visual-silence off 93 set-window-option -g monitor-activity on 94 set-option -g bell-action none 95 96 bind m switch-client -l 97 bind M command-prompt -p 'switch session:' "run \"tm.sh '%%'\""