-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
158 lines (119 loc) · 4.88 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
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
150
151
152
153
154
155
156
157
158
# Basic color support setting
# refer this commit https://github.com/EdmundsEcho/dotfiles/commit/14c5a7d4fb599a4ffa4650de2042a39926cd7556#diff-0aaf8ca3708e1c3e0398ec5fc5e738c3b3e556af19a7e836af62d41c4bd36f8dR46-R50
set -g default-terminal screen-256color
set -sa terminal-overrides ',alacritty:RGB'
set -as terminal-overrides ",*256col*:Tc"
set -as terminal-overrides ",xterm*:Tc"
set -as terminal-overrides ",*256col*:RGB"
set -as terminal-overrides ",xterm*:RGB"
set -as terminal-overrides ",*:U8=0"
setw -g xterm-keys on
set -s focus-events on
# Set default Tmux prefix to ctrl-a
set -g prefix C-a
unbind C-b
bind-key C-a send-prefix
# Keybindng for splitting windows
unbind %
bind | split-window -h
unbind '"'
bind - split-window -v
# Keybinding for refreshing tmux config easily
unbind r
bind r source-file ~/.tmux.conf
# Keybinding for resizing tmux panes
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r l resize-pane -R 5
bind -r h resize-pane -L 5
# Keybinding for maximizing tmux pane
bind -r m resize-pane -Z
# Enable mouse in tmux
set -g mouse on
# Configure vim movements for tmux's copy mode
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection # start selecting text with "v"
# bind-key -T copy-mode-vi 'y' send -X copy-selection # copy text with "y"
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel
bind P paste-buffer
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode after dragging with mouse
#bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
#bind C-v run "tmux set-buffer "$(xclip -o -sel clipboard)"; tmux paste-buffer"
# Default bar color
set-option -g status-style bg='#1b1c36',fg='#ecf0c1'
# Active Pane
set -g pane-active-border-style "fg=#5ccc96"
# Inactive Pane
set -g pane-border-style "fg=#686f9a"
# Active window
set-option -g window-status-current-style bg='#686f9a',fg='#ffffff'
# Message
set-option -g message-style bg='#686f9a',fg='#ecf0c1'
set-option -g message-command-style bg='#686f9a',fg='#ecf0c1'
# When Commands are run
set -g message-style "fg=#0f111b,bg=#686f9a"
set -s escape-time 0
set-option -g focus-events on
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux sessions after computer restart
set -g @plugin 'christoomey/vim-tmux-navigator' # for navigating panes and vim/nvim with Ctrl-hjkl
set -g @plugin 'tmux-plugins/tmux-continuum' # automatically saves sessions for you every 15 minutes
set -g @plugin 'tmux-plugins/tmux-yank' # tmux to system clipboard
# set -g @plugin 'jimeh/tmux-themepack'
set -g @plugin 'tmux-plugins/tmux-yank'
# Theme pack not working with current visual tweaks set
# set -g @themepack 'powerline/default/cyan' # use this theme for tmux
set -g @resurrect-capture-pane-contents 'on' # allow tmux-ressurect to capture pane contents
set -g @continuum-restore 'on' # enable tmux-continuum functionality
set -g @plugin 'sainnhe/tmux-fzf'
TMUX_FZF_PREVIEW=0
TMUX_FZF_LAUNCH_KEY="C-f"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# Visual tweaks
color_background="#2f3242"
color_background_light="#333645"
color_black="colour8"
color_red="colour1"
color_red_light="colour9"
color_green="colour2"
color_green_light="colour10"
color_yellow="colour3"
color_yellow_light="colour11"
color_blue="colour4"
color_blue_light="colour12"
color_magenta="colour5"
color_magenta_light="colour13"
color_cyan="colour6"
color_cyan_light="colour14"
color_white="colour7"
color_white_light="colour15"
color_grey="colour250"
# panes
set -g pane-active-border-style fg="$color_green"
set -g pane-border-style fg="$color_background"
# status line
set -g status-justify left
set -g status-style fg="$color_white",bg="$color_background"
set -g status-interval 1
set -g status-position top
set -g status-left "#[bg=$color_background]#[fg=$color_green] #S #[bg=$color_background]"
set -g status-right "#[fg=$color_black]%H:%M:%S #[fg=$color_background]#{prefix_highlight} #(/bin/bash $HOME/code/kube-tmux/kube.tmux 250 red cyan)"
set -g status-left-length 200
set -g status-right-length 200
# messaging
set -g message-style bg="$color_yellow",fg="$color_black"
set -g message-command-style bg=black,fg=blue
# window mode
setw -g mode-style bg="$color_green",fg="$color_background"
# window status
setw -g window-status-current-style bg="$color_blue_light"
setw -g window-status-current-format " #[fg=$color_background]#W#[fg=$color_black]#F "
setw -g window-status-style fg="$color_black"
setw -g window-status-format "#[fg=$color_blue]#I#[fg=$color_black]:#[fg=$color_black]#W#[fg=$color_green]#F"
setw -g window-status-bell-style fg="$color_red_light",bg="$color_black"
set -g message-style fg="$color_green",bg="$color_background"