-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_tmux.conf
130 lines (98 loc) · 3.59 KB
/
dot_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
123
124
125
126
127
128
# Make sure the prefix key combination is set to C-a, while unbinding C-b
# for other commands.
set -g prefix C-a
unbind C-b
# Loads the config file with `C-a r'
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Sets the time tmux waits fr a keystroke after pressing C-a.
set -sg escape-time 2
# Base indices for panes and windows begin from zero by default.
# Change that to 1.
set -g base-index 1
setw -g pane-base-index 1
# Configures tmux to send the prefix when pressing the C-a combination
# twice consecutively
bind C-a send-prefix
# Set the vertical and horizontal window-splitting
# operations to `C-a |' and `C-a -'
bind | split-window -h
bind - split-window -v
# Change panes within a window
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Scroll through list of windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Change the size of panes
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
# Enable mouse selection
set -g mouse on
#set -g mouse-select-pane on
#set -g mouse-resize-pane on
#set -g mouse-select-window on
#setw -g mode-mouse on
set -g terminal-overrides 'bash*:smcup@:rmcup@'
# To display things in 256 colors
set -g default-terminal "screen-256color"
# Status bar colours
set -g status-fg white
set -g status-bg black
# Set the colour of the active window to red, and the inactive window to cyan
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
# Customizing the colours of pane-dividers.
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow
# Customizing the command line
set -g message-fg green
set -g message-bg black
set -g message-attr bright
# Status bar
# session-name in green, current window number in yellow, current pane in cyan
set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S | #[fg=white] [#[fg=yellow]#I, #[fg=cyan]#P#[fg=white]]"
set -g status-left-attr bright
set -g status-utf8 on
# status-bar refresh time
set -g status-interval 3
# Centering the window list
set -g status-justify centre
# To be notified when something happens in one of
# the other windows in our session.
setw -g monitor-activity on
set -g visual-activity on
# Copy the current buffer to the system clipboard.
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
# Temporarily maximize a pane to see its contents more clearly
unbind Up
bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
unbind Down
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
# Add battery status in the status-right area.
set -g status-right "#[fg=cyan]%R | #[fg=magenta]#(upower -i /org/freedesktop/UPower/devices/battery_BAT1 | egrep 'percentage' | awk '{print \"Batt: \" $2}') | #[fg=yellow]#(iw wlan0 link | egrep 'SSID')"
# Brighten the status-right area
set -g status-right-attr bright
set -g default-shell /bin/zsh
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
#set -g @plugin 'tmux-plugins/tmux-resurrect'
#set -g @plugin 'tmux-plugins/tmux-copycat'
#set -g @plugin 'tmux-plugins/tmux-yank'
# TPM examples:
#set -g @plugin 'github_username/plugin_name'
#set -g @plugin '[email protected]/user/plugin'
#set -g @plugin '[email protected]/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'