# HG changeset patch # User Tomas Zeman # Date 1357133346 -3600 # Node ID 3600c419f516e58a6e98c389e76b005e3c62f43a # Parent 9432d03db25234a2e3b991914ebc5524827da4d7 config/.tmux.conf: more screen-like bindings diff -r 9432d03db252 -r 3600c419f516 config/.tmux.conf --- a/config/.tmux.conf Tue Jan 01 22:42:02 2013 +0100 +++ b/config/.tmux.conf Wed Jan 02 14:29:06 2013 +0100 @@ -2,29 +2,43 @@ set -g set-titles on # based on http://blog.hawkhost.com/2010/07/02/tmux-%e2%80%93-the-terminal-multiplexer-part-2/ +# + http://helpful.knobs-dials.com/index.php/Screen_and_tmux -# prefix opt -set-option -g prefix C-a -#set-option -g prefix ` +set -g history-limit 10000 + +### Key bindings ### -# last window hotkey which allows you to quickly switch between the current window and last window that was active -bind-key C-a last-window +# prefix +unbind C-b +set -g prefix ` +bind-key ` send-prefix +# quick reload of this config into the current tmux (useful while fiddling with it) +bind r source-file ~/.tmux.conf + +# panes unbind % # Remove default binding since we’re replacing +unbind '"' bind | split-window -h bind - split-window -v +bind-key ^i select-pane -t :.+ # cycle between panes in window -# Set status bar +bind-key A command-prompt "rename-window '%%'" +bind-key '"' choose-window +bind-key k confirm-before -p "kill-pane #W? (y/n)" kill-pane +bind-key K confirm-before -p "kill-window #W? (y/n)" kill-window + +### Style ### +set -g status-utf8 on set -g status-bg green set -g status-fg black -set -g status-left "#[fg=grey]#H:#S" +set -g status-left-length 30 # allow more length, for longer hostnames +set -g status-left "#[fg=yellow,bg=green]#H:#S " +set -g window-status-current-bg green +set -g window-status-current-fg yellow +set -g status-right "#[fg=black,bg=green]%F %T" -# Highlight active window -set-window-option -g window-status-current-fg yellow - -#set -g status-right "#[fg=yellow]#(uptime | cut -d, -f 2-) %Y-%m-%d %c:%s" set -g status-interval 1 -set -g status-right "#[fg=yellow]%F %T" # Set window notifications setw -g monitor-activity on @@ -35,3 +49,10 @@ # mode keys setw -g mode-keys vi + +# switch to pane via mouse +set -g mouse-select-pane on + +# how long to show pane numbers (C-a q). +# Default is too fast to scan the screen. +set display-panes-time 2000 # (which is 2sec)