-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
122 lines (101 loc) · 4.12 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
# Setting the prefix from `C-b` to `C-a`.
# By remapping the `CapsLock` key to `Ctrl`,
# you can make triggering commands more comfottable!
set -g prefix C-a
# Free the original `Ctrl-b` prefix keybinding.
unbind C-b
# Ensure that we can send `Ctrl-a` to other apps.
bind C-a send-prefix
# Reload the file with Prefix r.
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Moving between panes.
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind M choose-window "join-pane -s "%%""
bind N choose-window "join-pane -t "%%""
# Moveing between windows.
# Provided you've mapped your `CAPS LOCK` key to the `CTRL` key,
# you can now move between panes without moving your hands off the home row.
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Pane resizing.
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Log output to a text file on demand.
bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"
# Vimlike copy mode.
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
# Setting new window with current path
bind-key c new-window -c '#{pane_current_path}'
bind-key - split-window -c '#{pane_current_path}'
bind-key | split-window -h -c '#{pane_current_path}'
# for mac <- and ->
bind-key -n M-Left previous-window
bind-key -n M-Right next-window
# Setting the delay between prefix and command.
set -sg escape-time 1
# Set the base index for windows to 1 instead of 0.
set -g base-index 1
# Set the base index for panes to 1 instead of 0.
setw -g pane-base-index 1
# Mouse support - set to on if you want to use the mouse.
#set -g mode-mouse off
#set -g mouse-resize-pane off
#set -g mouse-select-pane off
#set -g mouse-select-window off
# Set the default terminal mode to 256color mode.
set -g default-terminal "screen-256color"
# Enable activity alerts.
set -g monitor-activity on
set -g visual-activity on
# Pane colors.
set -g pane-border-fg blue
set -g pane-border-bg black
set -g pane-active-border-fg red
set -g pane-active-border-bg black
# Command / message line.
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# Enable vi keys.
setw -g mode-keys vi
## scroll limit
set -g history-limit 10000
# Status bar
set -g status-bg 'colour235'
set -g message-command-fg 'colour222'
set -g status-justify 'centre'
set -g status-left-length '100'
set -g status 'on'
set -g message-bg 'colour238'
set -g status-right-length '100'
set -g status-right-attr 'none'
set -g message-fg 'colour222'
set -g message-command-bg 'colour238'
set -g status-attr 'none'
set -g status-utf8 'on'
set -g status-left-attr 'none'
setw -g window-status-fg 'colour121'
setw -g window-status-attr 'none'
setw -g window-status-activity-bg 'colour235'
setw -g window-status-activity-attr 'none'
setw -g window-status-activity-fg 'colour154'
setw -g window-status-separator ''
setw -g window-status-bg 'colour235'
set -g status-left '#[fg=colour232,bg=colour154] #S #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #W #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] #(whoami) '
set -g status-right '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] %r %a %Y #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #h #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour232,bg=colour154] #(rainbarf --battery --remaining --no-rgb) '
setw -g window-status-format '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[default] #I #W #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
setw -g window-status-current-format '#[fg=colour235,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #I #W #F #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]'
#set-option default-path "$PWD"
set-option -g default-command "reattach-to-user-namespace -l zsh"
# plugin resurrect
run-shell ~/.tmux/tmux-resurrect/resurrect.tmux