-
Notifications
You must be signed in to change notification settings - Fork 2
/
.tmux.conf
102 lines (79 loc) · 2.65 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
##################### Bindings #####################
# Use C-a as bind-key
unbind C-b
set -g prefix C-a
# Use C-a a for nested tmux sessions
bind-key a send-prefix
# Use C-a C-a to go to last active window
bind-key C-a last-window
# Shortcut to reload tmux config file
bind r source-file ~/.tmux.conf
# Pane navigation based on vi's hjkl
bind-key -r j select-pane -D
bind-key -r k select-pane -U
bind-key -r H select-pane -L
bind-key -r L select-pane -R
# Window navigation using h/l
bind-key -r l next-window
bind-key -r h previous-window
# Vim-like pane resizing
bind-key -r '=' resize-pane -U 5
bind-key -r '-' resize-pane -D 5
bind-key -r '<' resize-pane -L 5
bind-key -r '>' resize-pane -R 5
# Prompt to open a man page on new pane
bind-key m command-prompt -p "[ man page ]" "split-window 'exec man %%'"
bind-key M command-prompt -p "[ man page ]" "split-window -h 'exec man %%'"
# Vertical split with ^A' instead of ^A%
# Also open new panes in the working dir
bind-key "'" split-window -h -c "#{pane_current_path}"
bind-key '"' split-window -v -c "#{pane_current_path}"
# Open new windows in the working dir
bind-key "c" new-window -c "#{pane_current_path}"
# Use 'C-a C' to open a new window in ~
bind-key "C" new-window
# Use 'C-a v' to enter copy mode
bind-key v copy-mode
# Use 'v' and 'y' to select and copy text
#bind-key -t vi-copy 'v' begin-selection
#bind -t vi-copy y copy-pipe 'xclip -in > /dev/null'
# Use 'p' to paste text
bind-key p paste-buffer
# Use 'A' to go to the last used session
bind-key A switch-client -l
# Unbind arrow keys
unbind Left
unbind Down
unbind Up
unbind Right
##################### Settings #####################
# Vi bindings :D
setw -g mode-keys vi
# Rename terminals
set -g set-titles on
set -g set-titles-string '#(whoami)@#h -- #S'
# Status bar customization
set -g status-bg colour241
set -g status-fg white
set -g status-interval 60
set -g status-left-length 90
set -g status-right-length 60
set -g status-left "#[fg=Green]#(whoami)#[fg=white]::#[fg=yellow]#h "
set -g status-justify left
set -g status-right 'Session: #[fg=Cyan]#S - #[fg=white]Uptime:#[fg=Cyan]\
#(uptime | cut -d" " -f 5-6 | tr -d ,) - #[fg=white]Date: #[fg=Cyan]%a %d \
%b %R'
# Set TERM to screen-256color
set -g default-terminal "screen-256color"
# Start counting windows/panes from 1 and not 0
set -g base-index 1
set -g pane-base-index 1
# Save 10k lines of history per pane
set -g history-limit 10000
# Don't wait on escape keypress
set -g escape-time 0
##################### Plugins #####################
# enable copycat
#run-shell ~/bin/tmux-copycat/copycat.tmux
# enable urlview plugin, urlview is needed for this
#run-shell ~/bin/tmux-urlview/urlview.tmux