-
Notifications
You must be signed in to change notification settings - Fork 13
/
.tmux.conf
120 lines (103 loc) · 3.35 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
#Prefix is Ctrl-a
set -g prefix C-a
bind C-a send-prefix
unbind C-b
unbind '"'
unbind %
#set -g default-terminal "tmux"
#set -ga terminal-overrides ",xterm-termite:Tc"
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",alacritty:RGB"
## Vi bindings
setw -g mode-keys vi
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
bind-key -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi 'C-l' select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l
bind-key -n C-\\ split-window -v
bind-key -n C-q split-window -h
bind q kill-pane
# resize panes with vim movement keys
bind -r H resize-pane -L 6
bind -r J resize-pane -D 6
bind -r K resize-pane -U 6
bind -r L resize-pane -R 6
#### COLOUR
tm_icon=" "
tm_color_fg=colour7
tm_color_active=colour12
tm_color_inactive=colour15
tm_color_feature=colour4
tm_active_border_color=colour7
tm_inactive_border_color=colour15
tm_color_music=colour5
tm_color_date='#282C34'
tm_color_time='#282C34'
#tm_color_battery=colour3
tm_color_volume=colour10
# uncomment to display colours
#colour1
#colour2
#colour3
#colour4
#colour5
#colour6
#colour7
#colour8
#colour9
#colour10
#colour11
#colour12
#colour13
#colour14
#colour15
set-option -g history-limit 50000
set -g mouse on
#set -g status-left-length 32
#set -g status-right-length 250
set -g status-interval 5
set-option -g renumber-windows on
# default statusbar colors
#set-option -g status-bg '#282C34'
#set-option -g status-fg $tm_color_active
# default window title colors
#set -g window-status-format "#I #W"
# active window title colors
#set-window-option -g window-status-current-format "#[bold]#I #W"
set-window-option -g pane-base-index 1
set -g base-index 1
set -g renumber-windows on
set-option -g allow-rename off
# pane number display
#set-option -g display-panes-active-colour $tm_color_active
#set-option -g display-panes-colour $tm_color_inactive
# clock
#set-window-option -g clock-mode-colour $tm_color_active
tm_music="#[fg=$tm_color_music]#(~/dotfiles/scripts/cmus.sh)"
tm_date="#[fg=$tm_color_date] %Y-%m-%d %R"
#tm_battery="#[fg=$tm_color_battery]#(~/dotfiles/scripts/battery.sh)"
#tm_session_name="#[fg=$tm_color_feature,bold]#S $tm_icon"
#tm_volume="#[fg=$tm_color_volume]#(~/dotfiles/scripts/volume.sh) "
set -g @onedark_date_format "#[fg=$tm_color_date] %Y-%m-%d"
set -g @onedark_time_format "#[fg=$tm_color_time]%R"
set -g @onedark_widgets $tm_music
#set -g status-left $tm_session_name' '
#set -g status-right $tm_music' '$tm_date
# Tmux Plugin Manager (TPM) Settings
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'jayywolff/tmux-onedark-theme'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'