-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
114 lines (93 loc) · 3.25 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
# command prefix (like screen)
set -g prefix C-a
bind C-a send-prefix
# basic settings
set-window-option -g mode-keys vi # vi key
set-option -g status-keys vi
set-window-option -g utf8 on # utf8 support
set-window-option -g mode-mouse off # disable mouse
# copy mode to escape key
unbind [
bind Escape copy-mode
# move tmux copy buffer into x clipboard
bind-key C-y save-buffer /tmp/tmux-buffer \; run-shell "cat /tmp/tmux-buffer | xclip"
# splitting and cycling
set-option -g mouse-select-pane off
unbind %
bind + split-window -h # horizontal split
unbind '"'
bind _ split-window -v # vertical split
bind C-j previous-window
bind C-k next-window
# window title
set-option -g set-titles on
set-option -g set-titles-string '#S:#I.#P #W' # window number,program name,active (or not)
set-window-option -g automatic-rename on # auto name
# messages
#set-window-option -g mode-bg magenta
#set-window-option -g mode-fg black
#set-option -g message-bg magenta
#set-option -g message-fg black
# No visual activity
set -g visual-activity off
set -g visual-bell off
#next tab
bind-key -n C-right next
#previous tab
bind-key -n C-left prev
# status bar
set-option -g status-utf8 on
set-option -g status-justify right
set-option -g status-bg black
set-option -g status-fg white
set-option -g status-interval 5
set-option -g status-left-length 30
set-option -g status-left '#[fg=magenta]» #[fg=blue,bold]#T#[default]'
set-option -g status-right '#[fg=cyan]»» #[fg=blue,bold]###S #[fg=magenta]%R %m-%d#(acpi | cut -d ',' -f 2)#[default]'
set-option -g visual-activity on
set-window-option -g window-status-current-fg white
set-window-option -g window-status-format '#F#I:#W'
set-window-option -g window-status-current-attr bright
set-option -g status-justify centre
set-window-option -g window-status-current-format '#[fg=red,bold,bright](#[fg=white]#F#I:#W#[fg=red,bold,bright])#[default]'
# clock
set-window-option -g clock-mode-colour cyan
set-window-option -g clock-mode-style 24
# Split the window with C-v and C-b
bind-key -n C-v split-window
bind-key -n C-b split-window -h
# Vim-like bindings to resize panes
bind-key -n C-h resize-pane -L 2
bind-key -n C-l resize-pane -R 2
bind-key -n C-j resize-pane -D 2
bind-key -n C-k resize-pane -U 2
# Start indexing at 1 instead of 0
set-option -g base-index 1
# enable wm window titles
set-option -g set-titles on
################################# Sessions
## qGitFilterBranch session
## Start a session with vim open on the file list
#new-session -s qGB -n src 'zsh'
#send-keys -t qGB:1 'qgfb&&cd qGitFilterBranch' C-m
#send-keys -t qGB:1 'make clean&&make' C-m
#send-keys -t qGB:1 C-l
#send-keys -t qGB:1 'vim .' C-m
#
## In this session, create a new window named build
#new-window -d -t qGB:2 -n build 'zsh'
#send-keys -t qGB:2 'qgfb' C-m
#send-keys -t qGB:2 'workon qgb' C-m
#send-keys -t qGB:2 C-l
#send-keys -t qGB:2 'll' C-m
#send-keys -t qGB:2 'python -m "distutils2.run" install_dist&&qGitFilterBranch'
## Distutils2 session
# Start a new session with vim open on the file list and a splitted window in orig_d2
new-session -s d2 -n ORIGINAL 'zsh'
send-keys -t d2:1 'd2' C-m
send-keys -t d2:1 'vim .' C-m
split-window -t d2:1 -h
send-keys -t d2:1 'd2' C-m
send-keys -t d2:2 C-l
send-keys -t d2:2 'll' C-m
#set-window-option -t qGB:2 monitor-activity on