-
Notifications
You must be signed in to change notification settings - Fork 4
/
dot_tmux.conf
149 lines (117 loc) · 4.38 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# start with window 1 (instead of 0)
set -g base-index 1
# due to weechat
# see: https://github.com/GermainZ/weechat-vimode/blob/master/FAQ.md#esc-key-not-being-detected-instantly
set -sg escape-time 0
set -g renumber-windows on # reorder windows when deleting..
# start with pane 1
set -g pane-base-index 1
# modify prefix
unbind C-b
set -g prefix C-x
bind C-x send-prefix
# source config file
bind R source-file ~/.tmux.conf
# allow terminal scrolling
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g default-terminal "screen-256color"
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind P paste-buffer
# use mouse in copy mode
setw -g mouse on
# history
set -g history-limit 100000
# splitting and current path (same to binding c
unbind %
bind h split-window -h -c "#{pane_current_path}"
unbind '"'
bind v split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# with mouse (click on pretty little boxes)
# set -g mouse-select-window on
# colon :
bind : command-prompt
# clear scroll-back
# bind C-l send-keys 'C-l'
# bind C-k send-keys 'clear && tmux clear-history';
bind -n C-k clear-history
# resize panes like vim
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10
# disable sound bell
set -g bell-action none
# disable visual bell
set -g visual-bell off
# panes
# set -g mouse-select-pane on
# set -g mouse-resize-pane on
# include some current environment variables
set-option -ga update-environment " SSH_AUTH_SOCK"
# To install tpm
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'xamut/tmux-weather'
set -g @plugin 'tmux-plugins/tmux-online-status'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-maildir-counter'
set -g @plugin 'mattdavis90/base16-tmux'
set -g @colors-base16 'gruvbox-dark-hard'
# statusbar formatting
set-option -g status-left "#{session_name} "
set-option -g status-right "📩 P: #{maildir_counter_1}, W: #{maildir_counter_2} | #{prefix_highlight} #{battery_icon} #{battery_percentage} | %d-%m-%Y %H:%M:%S | Online: #{online_status}| #{weather} | #(gitmux -cfg ~/.gitmux.conf '#{pane_current_path}') "
set-option -wg window-status-current-format " #{window_index} #{window_name} "
set-option -wg window-status-format " #{window_index} #{window_name} "
# set mail dirs
set -g @maildir_counters '~/mail/personal/inbox/new|~/mail/personal/work/new'
set -g @prefix_highlight_fg 'black'
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_copy_mode_attr 'fg=#bdae93,bg=#3c3836,bold'
set -g @prefix_highlight_show_sync_mode 'on'
set -g @prefix_highlight_sync_mode_attr 'fg=black,bg=green'
# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run ~/.tmux/plugins/tpm/tpm
# theme overwrite
# set statusbar update interval
set-option -g status-interval 1
# window separators
set-option -wg window-status-separator ""
# monitor window changes
set-option -wg monitor-activity on
set-option -wg monitor-bell on
set-option -g status-style "bg=terminal,fg=terminal"
# default window title colors
set-option -wg window-status-style bg="#3C3836",fg="#7C6F64"
# colors for windows with activity
set-option -wg window-status-activity-style bg="#3C3836",fg="#A89984"
# colors for windows with bells
set-option -wg window-status-bell-style bg="#3C3836",fg="#FE8019"
# active window title colors
set-option -wg window-status-current-style bg="#A89984",fg="#3C3836"
# pane border
set-option -g pane-active-border-style fg="#FE8019"
set-option -g pane-border-style fg="#3C3836"
# pane number display
set-option -g display-panes-active-colour "#FE8019"
set-option -g display-panes-colour "#3C3836"
# clock
set-option -wg clock-mode-colour "#FE8019"
# copy mode highlighting
%if #{>=:#{version},3.2}
set-option -wg copy-mode-match-style "bg=#A89984,fg=#3C3836"
set-option -wg copy-mode-current-match-style "bg=#FE8109,fg=#3C3836"
%endif
set -g status-right-length 150