mirror of https://github.com/nirenjan/dotfiles.git
Add tmux configuration file
This is still a work-in-progress. However, it has most of the necessary options and key bindings.vimbundler
parent
ca75dd5f02
commit
84f5b39b2c
|
@ -0,0 +1,168 @@
|
|||
# Switch prefix to use C-a instead of C-b
|
||||
unbind-key C-b
|
||||
set -g prefix C-a
|
||||
bind-key a send-prefix
|
||||
|
||||
# Use 256 color mode
|
||||
set-option -g default-terminal "screen-256color"
|
||||
|
||||
# Set the Esc/Alt disambiguation timeout to 50ms
|
||||
# The default is 500ms, which makes vim kind of painful
|
||||
set-option -sg escape-time 50
|
||||
|
||||
# Enable mouse mode
|
||||
set-option -g mode-mouse on
|
||||
#set-option -g mouse-resize-pane on
|
||||
set-option -g mouse-select-pane on
|
||||
set-option -g mouse-select-window on
|
||||
set-option -g mouse-utf8 on
|
||||
|
||||
# Scrollback buffer
|
||||
set-option -g history-limit 100000
|
||||
|
||||
# Default settings
|
||||
set-option -g default-command "/bin/bash"
|
||||
#set-option -g default-path "~"
|
||||
set-option -g default-shell "/bin/bash"
|
||||
|
||||
# Display timeout
|
||||
set-option -g display-time 1500
|
||||
|
||||
# Start numbering from 1
|
||||
# (because 0 is just too far away!)
|
||||
set-option -g base-index 1
|
||||
set-option -g pane-base-index 1
|
||||
|
||||
# Status bar
|
||||
set-option -g status on
|
||||
set-option -g status-interval 2
|
||||
set-option -g status-bg colour8
|
||||
set-option -g status-fg colour7
|
||||
|
||||
# Status bar - right
|
||||
# <username> <host> <date/time> <stardate>
|
||||
set-option -g status-right "#[fg=magenta]#F #I:#P "
|
||||
set-option -ga status-right "#[fg=blue]#(whoami) "
|
||||
set-option -ga status-right "#[fg=green]#h "
|
||||
set-option -ga status-right "#[fg=yellow]%a %F %R "
|
||||
set-option -ga status-right "#[fg=red]#(~/bin/stardate)"
|
||||
# Status bar - right length
|
||||
set-option -g status-right-length 60
|
||||
|
||||
set-window-option -g window-status-current-bg red
|
||||
|
||||
# Pane highlighting
|
||||
set-option -g pane-active-border-fg green
|
||||
|
||||
# Terminator style pane switching
|
||||
# OSX Terminal.app, enable Use option as meta key
|
||||
# and delete the key bindings for Option Cursor left & Option Cursor right
|
||||
#
|
||||
# nirenjan: I don't use these because I find using the Option left & right to
|
||||
# move between words more useful than shorter keys to select panes
|
||||
# bind-key -n M-Left select-pane -L
|
||||
# bind-key -n M-Right select-pane -R
|
||||
# bind-key -n M-Up select-pane -U
|
||||
# bind-key -n M-Down select-pane -D
|
||||
|
||||
# Ion3 style window switching
|
||||
# OSX Terminal.app, enable Use option as meta key
|
||||
#
|
||||
# nirenjan: I don't care for these either. Nice to have, but only marginally.
|
||||
# bind-key -n M-0 select-window -t :0
|
||||
# bind-key -n M-1 select-window -t :1
|
||||
# bind-key -n M-2 select-window -t :2
|
||||
# bind-key -n M-3 select-window -t :3
|
||||
# bind-key -n M-4 select-window -t :4
|
||||
# bind-key -n M-5 select-window -t :5
|
||||
# bind-key -n M-6 select-window -t :6
|
||||
# bind-key -n M-7 select-window -t :7
|
||||
# bind-key -n M-8 select-window -t :8
|
||||
# bind-key -n M-9 select-window -t :9
|
||||
|
||||
# Window switching
|
||||
bind-key C-a last-window
|
||||
|
||||
# Use vi style key bindings
|
||||
set-option -g mode-keys vi
|
||||
set-option -g status-keys vi
|
||||
|
||||
# Pane logging, a-la screen's C-a H
|
||||
bind-key H \
|
||||
pipe-pane -o 'cat >> ~/tmux_logs/tmux_log.#I-#P' \;\
|
||||
display-message 'Toggled logging to ~/tmux_logs/tmux_log.#I-#P'
|
||||
|
||||
|
||||
# Defaults
|
||||
# bind-key C-b send-prefix
|
||||
# bind-key C-o rotate-window
|
||||
# bind-key C-z suspend-client
|
||||
# bind-key Space next-layout
|
||||
# bind-key ! break-pane
|
||||
# bind-key " split-window
|
||||
# bind-key # list-buffers
|
||||
# bind-key $ command-prompt -I #S "rename-session '%%'"
|
||||
# bind-key % split-window -h
|
||||
# bind-key & confirm-before -p "kill-window #W? (y/n)" kill-window
|
||||
# bind-key ' command-prompt -p index "select-window -t ':%%'"
|
||||
# bind-key ( switch-client -p
|
||||
# bind-key ) switch-client -n
|
||||
# bind-key , command-prompt -I #W "rename-window '%%'"
|
||||
# bind-key - delete-buffer
|
||||
# bind-key . command-prompt "move-window -t '%%'"
|
||||
# bind-key 0 select-window -t :0
|
||||
# bind-key 1 select-window -t :1
|
||||
# bind-key 2 select-window -t :2
|
||||
# bind-key 3 select-window -t :3
|
||||
# bind-key 4 select-window -t :4
|
||||
# bind-key 5 select-window -t :5
|
||||
# bind-key 6 select-window -t :6
|
||||
# bind-key 7 select-window -t :7
|
||||
# bind-key 8 select-window -t :8
|
||||
# bind-key 9 select-window -t :9
|
||||
# bind-key : command-prompt
|
||||
# bind-key ; last-pane
|
||||
# bind-key = choose-buffer
|
||||
# bind-key ? list-keys
|
||||
# bind-key D choose-client
|
||||
# bind-key L switch-client -l
|
||||
# bind-key [ copy-mode
|
||||
# bind-key ] paste-buffer
|
||||
# bind-key c new-window
|
||||
# bind-key d detach-client
|
||||
# bind-key f command-prompt "find-window '%%'"
|
||||
# bind-key i display-message
|
||||
# bind-key l last-window
|
||||
# bind-key n next-window
|
||||
# bind-key o select-pane -t :.+
|
||||
# bind-key p previous-window
|
||||
# bind-key q display-panes
|
||||
# bind-key r refresh-client
|
||||
# bind-key s choose-session
|
||||
# bind-key t clock-mode
|
||||
# bind-key w choose-window
|
||||
# bind-key x confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
||||
# bind-key { swap-pane -U
|
||||
# bind-key } swap-pane -D
|
||||
# bind-key ~ show-messages
|
||||
# bind-key PPage copy-mode -u
|
||||
# bind-key -r Up select-pane -U
|
||||
# bind-key -r Down select-pane -D
|
||||
# bind-key -r Left select-pane -L
|
||||
# bind-key -r Right select-pane -R
|
||||
# bind-key M-1 select-layout even-horizontal
|
||||
# bind-key M-2 select-layout even-vertical
|
||||
# bind-key M-3 select-layout main-horizontal
|
||||
# bind-key M-4 select-layout main-vertical
|
||||
# bind-key M-5 select-layout tiled
|
||||
# bind-key M-n next-window -a
|
||||
# bind-key M-o rotate-window -D
|
||||
# bind-key M-p previous-window -a
|
||||
# bind-key -r M-Up resize-pane -U 5
|
||||
# bind-key -r M-Down resize-pane -D 5
|
||||
# bind-key -r M-Left resize-pane -L 5
|
||||
# bind-key -r M-Right resize-pane -R 5
|
||||
# bind-key -r C-Up resize-pane -U
|
||||
# bind-key -r C-Down resize-pane -D
|
||||
# bind-key -r C-Left resize-pane -L
|
||||
# bind-key -r C-Right resize-pane -R
|
Loading…
Reference in New Issue