forked from r00k/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
108 lines (82 loc) · 2.69 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
###########################
# Configuration
###########################
#
set-window-option -g xterm-keys on
# use 256 term for pretty colors
set -g default-terminal "screen-256color"
# increase scroll-back history
set -g history-limit 15000
# use vim key bindings
setw -g mode-keys vi
# Enable mouse
set -g mouse on
# decrease command delay (increases vim responsiveness)
set -sg escape-time 1
# increase repeat time for repeatable commands
set -g repeat-time 1000
# re-number windows when one is closed
set -g renumber-windows on
# Start window numbering at 1
set -g base-index 1
# This is to make some commands (such as terminal-notifier) to work inside tmux
# https://github.com/julienXX/terminal-notifier/issues/115#issuecomment-104214742
set -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL -l"
###########################
# Key Bindings
###########################
# tmux prefix
# Use the backtix `
# Type backtix twice to type the actual character
unbind C-b
set -g prefix `
bind ` send-prefix
bind-key L last-window
# Move around panes in VIM style
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# force a reload of the config kile
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Enable screen-like C-a C-a moving to last window
bind-key C-a last-window
# Go to beginning of line
bind a send-prefix
###########################
# Status Bar
###########################
# set refresh interval for status bar
set -g status-interval 30
# center the status bar
set -g status-justify left
set -g status-right 'B: #{battery_icon} #{battery_percentage} #{battery_remain} | I: #{online_status} | %a %d/%h %H:%M'
###########################
# Copying
###########################
set-option -g status-key vi
set-window-option -g mode-keys vi
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'V' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel pbcopy
###########################
# Colors
###########################
# color status bar
set -g status-bg colour235
set -g status-fg white
# highlight current window
# set-window-option -g window-status-current-fg black
# set-window-option -g window-status-current-bg green
# set color of active pane
# set -g pane-border-fg colour235
# set -g pane-border-bg black
# set -g pane-active-border-fg green
# set -g pane-active-border-bg black
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-online-status'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'