dotfiles

My opinionated dotfiles
git clone git://git.erethon.com/dotfiles
Log | Files | Refs

.tmux.conf (2711B)


      1 ##################### Bindings #####################
      2 # Use C-a as bind-key
      3 unbind C-b
      4 set -g prefix C-a
      5 
      6 # Use C-a a for nested tmux sessions
      7 bind-key a send-prefix
      8 
      9 # Use C-a C-a to go to last active window
     10 bind-key C-a last-window
     11 
     12 # Shortcut to reload tmux config file
     13 bind r source-file ~/.tmux.conf
     14 
     15 # Pane navigation based on vi's hjkl
     16 bind-key -r j select-pane -D
     17 bind-key -r k select-pane -U
     18 bind-key -r H select-pane -L
     19 bind-key -r L select-pane -R
     20 
     21 # Window navigation using h/l
     22 bind-key -r l next-window
     23 bind-key -r h previous-window
     24 
     25 # Vim-like pane resizing
     26 bind-key -r '=' resize-pane -U 5
     27 bind-key -r '-' resize-pane -D 5
     28 bind-key -r '<' resize-pane -L 5
     29 bind-key -r '>' resize-pane -R 5
     30 
     31 # Prompt to open a man page on new pane
     32 bind-key m command-prompt -p "[ man page ]" "split-window 'exec man %%'"
     33 bind-key M command-prompt -p "[ man page ]" "split-window -h 'exec man %%'"
     34 
     35 # Vertical split with ^A' instead of ^A%
     36 # Also open new panes in the working dir
     37 bind-key "'" split-window -h -c "#{pane_current_path}"
     38 bind-key '"' split-window -v -c "#{pane_current_path}"
     39 
     40 # Open new windows in the working dir
     41 bind-key "c" new-window -c "#{pane_current_path}"
     42 # Use 'C-a C' to open a new window in ~
     43 bind-key "C" new-window
     44 
     45 # Use 'C-a v' to enter copy mode
     46 bind-key v copy-mode
     47 
     48 # Use 'v' and 'y' to select and copy text
     49 #bind-key -t vi-copy 'v' begin-selection
     50 #bind -t vi-copy y copy-pipe 'xclip -in > /dev/null'
     51 
     52 # Use 'p' to paste text
     53 bind-key p paste-buffer
     54 
     55 # Use 'A' to go to the last used session
     56 bind-key A switch-client -l
     57 
     58 # Unbind arrow keys
     59 unbind Left
     60 unbind Down
     61 unbind Up
     62 unbind Right
     63 
     64 ##################### Settings #####################
     65 # Vi bindings :D
     66 setw -g mode-keys vi
     67 
     68 # Rename terminals
     69 set -g set-titles on
     70 set -g set-titles-string '#(whoami)@#h --  #S'
     71 
     72 # Status bar customization
     73 set -g status-bg colour241
     74 set -g status-fg white
     75 set -g status-interval 60
     76 set -g status-left-length 90
     77 set -g status-right-length 60
     78 set -g status-left "#[fg=Green]#(whoami)#[fg=white]::#[fg=yellow]#h "
     79 set -g status-justify left
     80 set -g status-right 'Session: #[fg=Cyan]#S - #[fg=white]Uptime:#[fg=Cyan]\
     81 #(uptime | cut -d" " -f 5-6 | tr -d ,) - #[fg=white]Date: #[fg=Cyan]%a %d \
     82 %b %R'
     83 
     84 # Set TERM to screen-256color
     85 set -g default-terminal "screen-256color"
     86 
     87 # Start counting windows/panes from 1 and not 0
     88 set -g base-index 1
     89 set -g pane-base-index 1
     90 
     91 # Save 10k lines of history per pane
     92 set -g history-limit 10000
     93 
     94 # Don't wait on escape keypress
     95 set -g escape-time 0
     96 
     97 ##################### Plugins #####################
     98 # enable copycat
     99 #run-shell ~/bin/tmux-copycat/copycat.tmux
    100 
    101 # enable urlview plugin, urlview is needed for this
    102 #run-shell ~/bin/tmux-urlview/urlview.tmux