-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_tmux.conf
118 lines (93 loc) · 2.77 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
115
116
117
118
# vim:filetype=tmux foldenable foldmethod=marker
# Use C-a instead of C-b
set -g prefix C-a
unbind-key C-b
# C-a C-a sends C-a
bind-key C-a send-prefix
# enable 256-color support, and italics in urxvt
set-option -g default-terminal "screen-it"
# actually remember history
set-option -g history-limit 1000000
# better numbering
set-option -g base-index 1 # start at one
set-option -g renumber-windows on # renumber after closing
set-window-option -g pane-base-index 1 # start panes at one as well
# default shell is zsh
set-option -g default-shell '/usr/bin/zsh'
set-option -g default-command '/usr/bin/zsh'
# resize to smallest client viewing session
set-window-option -g aggressive-resize on
# Keybindings {{{
# New windows get created where the cwd is
unbind %
bind \\ split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
bind c new-window -c '#{pane_current_path}'
# quick pane cycling
unbind C-n
bind C-n select-pane -t :.+
unbind C-p
bind C-p select-pane -t :.-
# change windows quickly
bind p previous-window
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf\; display-message "Config reloaded..."
set-window-option -g mode-keys vi
# paste mode
bind [ copy-mode
# bind -t vi-copy v begin-selection
# bind -t vi-copy y copy-selection
# bind -t vi-copy V rectangle-toggle
bind ] paste-buffer
# vim style bindings {{{
unbind h
unbind l # default: last-window. #-p = prev-window. Good enough
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
unbind J
unbind K
bind J swap-pane -D
bind K swap-pane -U
unbind C-h
unbind C-j
unbind C-k
unbind C-l # default: switch client.
bind C-h resize-pane -L
bind C-j resize-pane -D
bind C-k resize-pane -U
bind C-l resize-pane -R
unbind C-H
unbind C-J
unbind C-K
unbind C-L # default: switch client.
bind C-H resize-pane -L 5
bind C-J resize-pane -D 5
bind C-K resize-pane -U 5
bind C-L resize-pane -R 5
# }}}
# }}}
# Statusbar tweaks {{{
# better titles
set-option -g set-titles on
set-option -g set-titles-string "#T"
#Statusbar option
set-option -g status on
set-option -g status-interval 2
set-option -g status-justify "left"
set-option -g window-status-format "#[fg=white,bg=colour235] #I : #W "
set-option -g window-status-current-format "#[fg=colour16,bg=colour39] #I : #W "
set-option -g status-left-length 60
set-option -g status-left \
"#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour235,nobold]"
set-option -g status-right-length 90
set-option -g status-right \
"#[fg=colour245]| %R | %d %b #[fg=colour234,nobold]"\
"#[fg=colour254,bg=colour234,nobold] #(hostname --ip-address) "\
"#[fg=colour17,bg=colour254,bold] #h "
set-option -g status-style bg=colour235,fg=white
set-option -g message-style bg=colour235,fg=white
# }}}
setenv -gu VIRTUAL_ENV