-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtmux.conf
More file actions
111 lines (82 loc) · 3.41 KB
/
tmux.conf
File metadata and controls
111 lines (82 loc) · 3.41 KB
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
set-option -g default-command "reattach-to-user-namespace -l /usr/local/bin/fish"
set-option -sg escape-time 2
set -g default-terminal screen-256color
unbind C-b
set -g prefix C-Space
bind Space send-prefix
bind Space copy-mode
bind C-Space copy-mode
unbind [
bind Escape copy-mode
bind v split-window -c "#{pane_current_path}" -h
bind h split-window -c "#{pane_current_path}" -v
# resize pane with arrow keys
unbind Left
unbind Right
unbind Down
unbind Up
bind -r Left resize-pane -L 2
bind -r Right resize-pane -R 2
bind -r Down resize-pane -D 2
bind -r Up resize-pane -U 2
# Smart pane switching with awareness of vim splits
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# window switching
bind -n C-Right next-window
bind -n C-Left previous-window
# re-source conf
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# disable automatic renaming of windows
set-window-option -g automatic-rename on
set-option -g default-terminal "screen-256color"
set-option -g status-keys vi
set-option -g bell-action any
set-option -g visual-bell on
set -g history-limit 10000
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
#bind-key -Tcopy-mode-vi 'v' send -X begin-selection
#bind-key -Tcopy-mode-vi 'y' send -X copy-selection
#bind-key -Tcopy-mode-vi Escape send -X cancel
#bind-key -Tcopy-mode-vi V send -X rectangle-toggle
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -Tcopy-mode-vi Escape send -X cancel
# Colours ----------------------------------------------------------------------
# default statusbar colors
set-option -g status-bg colour235
set-option -g status-fg colour235
# default window title colors
set-window-option -g window-status-fg colour220
set-window-option -g window-status-bg colour220
# active window title colors
set-window-option -g window-status-current-fg colour226
set-window-option -g window-status-current-bg colour226
# pane border
set-option -g pane-border-fg colour235
set-option -g pane-border-bg colour235
set-option -g pane-active-border-fg colour25
set-option -g pane-active-border-bg colour25
# message text
set-option -g message-bg colour235
set-option -g message-fg colour166
# pane number display
set-option -g display-panes-active-colour colour213
set-option -g display-panes-colour colour166
# Statusbar --------------------------------------------------------------------
setw -g window-status-format '#[bg=colour33,fg=colour236,bold] #I #[bg=colour236,fg=colour154,bold] #W '
setw -g window-status-current-format '#[bg=colour33,fg=colour236,bold] #I #[bg=colour154,fg=colour236,bold] #W '
setw -g window-status-activity-attr none
setw -g window-status-activity-fg default
setw -g window-status-activity-bg default
set -g status-left ''
#set -g status-right '#[bg=colour238] #(~/.local/bin/battery -o tmux)#[bg=colour238] #[bg=white,fg=colour240] %H:%M #[bg=colour240,fg=white] %d/%m/%Y '
set -g status-right ''
set -g status on