-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
123 lines (104 loc) · 3.15 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
119
120
121
122
# TO RELOARD THIS FILE ENTER IN CONSOLE: tmux source-file ~/.tmux.conf
#
# Setting the prefix from C-b to C-a
# # START:prefix
set -g prefix C-a
# # END:prefix
#
# # Free the original Ctrl-b prefix keybinding
# # START:unbind
unbind C-b
# # END:unbind
#
# #setting the delay between prefix and command
# # START:delay
set -s escape-time 1
# # END:delay
#
# # Ensure that we can send Ctrl-A to other apps
# # START:bind_prefix
bind C-a send-prefix
# # END:bind_prefix
#
# # Set the base index for windows to 1 instead of 0
# # START:index
set -g base-index 1
# # END:index
#
# # Set the base index for panes to 1 instead of 0
# # START:panes_index
setw -g pane-base-index 1
# # END:panes_index
#
# # Reload the file with Prefix r
# # START:reload
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# # END:reload
#
# # splitting panes
# # START:panesplit
bind | split-window -h
bind - split-window -v
# # END:panesplit
#
# # moving between panes
# # START:paneselect
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# # END:paneselect"
# 256 color
set -g default-terminal "xterm-256color"
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
# Automatically set window title
setw -g automatic-rename on
# Allows for faster key repetition
set -g repeat-time 0
# copy selection color
setw -g mode-fg black
setw -g mode-bg green
# alert message line
set -g message-fg black
set -g message-bg green
# status line
set -g status-bg colour86
set -g status-fg black
set -g status-left " "
set -g status-right "#[fg=white,bg=black] [#S]#[fg=red,bright] [ #[fg=cyan]#H #[fg=red,bright]] #[fg=yellow,bright]%Y.%m.%d #[fg=green]%H:%M #[default]#[fg=magenta,bright]#[default] "
set -g status-right-length 100
setw -g window-status-current-fg blue
setw -g window-status-current-bg black
setw -g window-status-current-format " [#I#F] #W "
setw -g window-status-format "[#I#F#W]"
# border
set -g pane-border-fg cyan
set -g pane-border-bg black
set -g pane-active-border-fg green
set -g pane-active-border-bg black
# enable mouse support for switching panes/windows
setw -g mouse on
# set-option -g -q mouse on
bind-key -T root PPage if-shell -F "#{alternate_on}" "send-keys PPage" "copy-mode -e; send-keys PPage"
bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "select-pane -t =; send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "select-pane -t =; send-keys -M" "select-pane -t =; send-keys -M"
#setw -g aggressive-resize on
set -g history-limit 1000000
# vim copy selection
bind-key ESCAPE copy-mode
#bind paste key
bind-key p paste-buffer
# vim key map
bind \; command-prompt
# bind : to command-prompt like vim
# this is the default in tmux already
bind : command-prompt
# vi-style controls for copy mode
setw -g mode-keys vi
#work with mac osx clipbpard
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer"
bind C-p new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
bind C-j last-window \; swap-pane -s tmp.1 \; kill-window -t tmp