-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
118 lines (97 loc) · 2.67 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
#################### General Preferences for tmux ####
# set to vi-mode
setw -g mode-keys vi
# start window indexing at one instead of zero
set -g base-index 1
# window title
set -g set-titles on
set -g set-titles-string '#W' # program name
setw -g automatic-rename on # auto name
# History
set -g history-limit 5000
# Color of the border of the active window
set-option -g pane-active-border-fg green
#################### Session Preferences ####
new-session -s tmux
splitw -h -l 106
#splitw -v -p 70 "ncmpcpp"
#swap-pane -U
#select-pane -R
#################### General important bindings ####
# Set the prefix to C-a.
unbind C-b
set -g prefix C-a
bind C-a send-prefix
#################### adjust bindings for use with Bone http://wiki.neo-layout.org/wiki/Bone
### copy mode: jhlk replaces hjkl
unbind -t vi-copy j
bind -t vi-copy j cursor-left
unbind -t vi-copy h
bind -t vi-copy h cursor-down
unbind -t vi-copy l
bind -t vi-copy l cursor-up
unbind -t vi-copy k
bind -t vi-copy k cursor-right
### as well in vi-edit table…
unbind -c -t vi-edit j
bind -c -t vi-edit j cursor-left
unbind -c -t vi-edit k
bind -c -t vi-edit k cursor-right
unbind -c -t vi-edit l
bind -c -t vi-edit l history-down
### and in vi-choice table…
unbind -c -t vi-choice h
bind -t vi-choice h down
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind j select-pane -L
bind h select-pane -D
bind l select-pane -U
bind k select-pane -R
# swap-pane bindings
bind-key -r "<" swap-pane -t -1
bind-key -r ">" swap-pane -t +1
#################### Windows & Panes: Creation, Splitting, Handling, & more ####
### Windows ####
# screen c
unbind c
bind c new-window
# next window: o
unbind o
bind o next-window
# kill K
unbind K
bind K confirm-before "kill-window"
### Panes ###
# More straight forward key bindings for window splitting
unbind |
bind | split-window -h
bind - split-window -v
# next pane: n, C-n
unbind C-n
bind C-n select-pane -t :.+
unbind n
bind n select-pane -t :.+
# last pane: C-a, a
unbind C-a
bind C-a last-pane
unbind a
bind a last-pane
### Mouse options ###
set -g mouse on
set -g mouse-utf8 on
set -g @yank_selection 'primary --secondary --clipboard'
# Copy tmux buffer to Clipboard
bind > send-keys 'Enter' \; run "tmux save-buffer - | xsel -i -p"
#### tmux powerline
source '/home/jakob/.tmuxline'
set -g status-interval 10
### tmux Plugin Manager (TPM) https://github.com/tmux-plugins/tpm
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-copycat \
tmux-plugins/tmux-yank \
tmux-plugins/tmux-open \
'
# Initializes tmux plugin manager.
# Keep this line at the very bottom of tmux.conf.
run-shell '~/.tmux/plugins/tpm/tpm'