-
Notifications
You must be signed in to change notification settings - Fork 2
/
.tmux.conf
120 lines (94 loc) · 3.97 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
# Plugins {{{1
# <c-b>I to install!!
set -g @plugin 'tmux-plugins/tmux-battery'
# prefix y
set -g @plugin 'tmux-plugins/tmux-yank'
# prefix u
set -g @plugin 'tmux-plugins/tmux-urlview'
# prefix + ctrl-f - simple file search
# prefix + ctrl-g - jumping over git status files (best used after git status command)
# prefix + alt-h - jumping over SHA-1/SHA-256 hashes (best used after git log command)
# prefix + ctrl-u - url search (http, ftp and git urls)
# prefix + ctrl-d - number search (mnemonic d, as digit)
# prefix + alt-i - ip address search
# prefix + / - regex search
# n - jumps to the next match
# N - jumps to the previous match
# it's annoying
# set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @batt_color_status_primary_charged '#aa2ac9'
set -g @batt_color_status_primary_charging '#0aaac9'
set -g @batt_color_charge_primary_tier8 '#00aa00'
set -g @batt_color_charge_primary_tier7 '#55aa00'
set -g @batt_color_charge_primary_tier6 '#55aa00'
set -g @batt_color_charge_primary_tier5 '#aaaa00'
set -g @batt_color_charge_primary_tier4 '#aa8000'
set -g @batt_color_charge_primary_tier3 '#aa4000'
set -g @batt_color_charge_primary_tier2 '#aa2000'
set -g @batt_color_charge_primary_tier1 '#aa0000'
set -g @plugin 'xamut/tmux-network-bandwidth'
# prefix * - end the process running in the current pane with kill -9
set -g @plugin 'tmux-plugins/tmux-cowboy'
# Mappings {{{1
# don't detach using d
unbind d
bind-key C-d detach
# Let's make it use something reasonable
bind-key v split-window -h
bind-key d split-window -v
# Sessions I use often
bind-key C-q new-session -As QuickSpell
bind-key C-m new-session -As MagicSpell
bind-key C-j new-session -As JournalSpell
# Vim-like
bind-key h select-pane -L
bind-key l select-pane -R
bind-key k select-pane -U
bind-key j select-pane -D
# fuck using pgup
bind-key C-u copy-mode
# clear history, useful for output from builds
bind-key C-h clear-history
# reload config file
bind r source-file ~/.tmux.conf
# Functional {{{1
# Terminal type configuration
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ',*256col*:Tc,*:Ss=\E[%p1%d q:Se=\E[ q'
# Don't delay escapes
set -s escape-time 0
set -g status-interval 1
# Move around in copy mode via VI keys
set -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection # Begin selection in copy mode.
bind-key -T copy-mode-vi 'C-v' send -X rectangle-toggle # Begin selection in copy mode.
bind-key -T copy-mode-vi 'y' send -X copy-selection # Yank selection in copy mode.
set -g wrap-search off
set -g mouse off
# large history
set-option -g history-limit 65536
# Automatically set window title
setw -g automatic-rename
# Design {{{1
set-option -g visual-activity on
set-option -g visual-bell on
setw -g mode-style "bold reverse fg=colour5"
set -g pane-border-style "hidden fg=colour8"
set -g pane-active-border-style "hidden bg=default fg=colour12 bold"
set -g status-position top
set -g status-justify centre
set -g status-style hidden
set -g status-left '#[bold]#[bg=default,fg=default] #{?client_prefix,#[fg=colour15]#[bg=colour8],#[bg=default]#[fg=colour8]} #T '
set -g status-right '#[bold]#{?client_prefix,#[fg=colour15]#[bg=colour8],#[bg=default]#[fg=colour8]} #S %a %m/%d %T #{battery_color_fg}#[bg=default] #{battery_icon_charge} #{battery_percentage}#[bg=default] '
set -g status-right-length 100
set -g status-left-length 100
setw -g window-status-style hidden
setw -g window-status-format '#{?client_prefix,#[fg=colour0]#[bg=colour8],#[fg=colour8]#[bg=default]} #I# #W#[fg=colour8]#F#[bg=default] '
setw -g window-status-current-format '#{?client_prefix,#[fg=colour15]#[bg=colour12]#[bold],#[fg=colour12]#[bold]#[bg=default]} #I:#W#F '
set -g message-style "fg=colour0 bg=colour12"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# Other {{{1
# set-option -g trigger-highlight "error|fail|fatal" colour9 1
# set-option -g trigger-highlight "note" colour96 1
# set-option -g trigger-highlight "warning" colour93 1