forked from chaselambda/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
executable file
·114 lines (86 loc) · 3.13 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# remap prefix to Control + Space
set -g prefix C-Space
unbind C-b
bind Space send-prefix
# quick pane cycling
#unbind ^A
#bind ^A select-pane -t :.+
# Make mouse useful in copy mode
setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
# TODO have a way to let me click in copy mode
#setw -g mode-mouse copy-mode
# Allow xterm titles in terminal window, terminal scrolling with scrollbar, and setting overrides of C-Up, C-Down, C-Left, C-Right
set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
# Scroll History
set -g history-limit 30000
# Set ability to capture on start and restore on exit window data when running an application
setw -g alternate-screen on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
set -s escape-time 50
# vim mode!!
setw -g mode-keys vi
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
#bind-key -t vi-copy 'y' copy-selection
bind-key -t vi-copy y copy-pipe 'xclip -in -selection clipboard'
# get rid of password prompts: http://spin.atomicobject.com/2012/01/28/less-perplexing-terminal-multiplexing-with-tmux/
set -g update-environment -r
# Update window title
set -g set-titles on
set -g set-titles-string '#T - #I:#W'
# 256 color support
set -g default-terminal "screen-256color"
# Show activity in background windows
setw -g monitor-activity on
# Start window numbers from 1
set -g base-index 1
# Key bindings
bind C-d detach # the same as d so you don't have to depress Ctrl
unbind r
bind r source-file ~/.tmux.conf \; display-message "Configuration reloaded."
bind C-Space last-window
bind C-c command-prompt -p command: "new-window -n '%1' '%1'"
# Pane movement
# http://unix.stackexchange.com/questions/14300/tmux-move-window-to-pane
#bind-key j command-prompt -p "join pane from window:" "join-pane -s '%%'"
#bind-key s command-prompt -p "send pane to window:" "join-pane -t '%%'"
# Message bar
set -g message-attr bright
set -g message-bg black
set -g message-fg blue
set -g display-time 2000
set -g display-panes-time 2000
# Window mode bar
setw -g mode-bg white
setw -g mode-fg black
# Status bar
set -g status-bg black
set -g status-fg white
set -g status-interval 10
set -g status-left-length 50
set -g status-left '#[fg=green][#I:#P #W] #(whoami)@#(hostname -s) '
set -g status-right "{#[bold,fg=cyan]#(uptime | awk -F: '{print $(NF\\)}' | sed s/' '//)#[nobold,fg=default]} {#[bold,fg=cyan]%a %m/%d %H:%M%p#[nobold,fg=default]}"
# Terminal title bar
set -g set-titles-string "#I:#P - #W - #T"
# pane selection
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D
bind -n M-H resize-pane -L
bind -n M-L resize-pane -R
bind -n M-K resize-pane -U
bind -n M-J resize-pane -D
# Full screen pane!
bind -n M-F resize-pane -Z
bind -n M-o last-pane
# remap pane splitting.
# A new pane should run from the current directory of the previous pane
bind-key | split-window -h -c '#{pane_current_path}'
bind-key \ split-window -v -c '#{pane_current_path}'
# external yank/paste
bind C-y run "tmux save-buffer - | xclip -selection c"