-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
146 lines (120 loc) · 5.3 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
# good things to remember:
# show-options -gw # show window options current setting
# show-options -g # show options current setting
# remap prefix
unbind C-b
set-option -g prefix C-f
bind-key C-f send-prefix
# use vi copy mode (?)
setw -g mode-keys vi
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
set -g set-clipboard on
set -ag terminal-overrides "vte*:XT:Ms=\\E]52;c;%p2%s\\7,xterm*:XT:Ms=\\E]52;c;%p2%s\\7"
# split panes using - and |
bind | split-window -h
bind - split-window -v
unbind '"'
unbind '%'
# reload config file
bind r source-file ~/.tmux.conf
# don't automatically rename windows
set-option -g allow-rename off
# change panes with vim key bindings
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# change panes with alt-vim keys directly
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
set -sg escape-time 0
# do not spawn login shells, inhibits conda
set -g default-command "${SHELL}"
# enable mouse scrolling in panes
set-option -g mouse on
# customise colours
set-option -g status-bg black
set-option -g status-fg green
# # for local work
set-option -g status-left " #{session_name} | #{weather_symbol}. #{weather_temperature} | "
# set-option -g status-right "RAM:#{ram_percentage} CPU:#{cpu_percentage} GPU:#{gpu_percentage} GRAM:#{gram_percentage} | #{window_index}:#{pane_index} #(whoami)@#{host_short} | %H:%M %d-%b-%y #{tmux_mode_indicator}"
set-option -g status-right "#{spotify_info} | RAM:#{ram_percentage} CPU:#{cpu_percentage} GPU:#{gpu_percentage} GRAM:#{gram_percentage} | #{window_index}:#{pane_index} #(whoami)@#{host_short} | %H:%M %d-%b-%y #{tmux_mode_indicator}"
# set-option -g status-right "#{spotify_info} | RAM:#{ram_percentage} CPU:#{cpu_percentage} GPU:#{gpu_percentage} GRAM:#{gram_percentage} | \"#{=21:pane_title}\" %H:%M %d-%b-%y #{tmux_mode_indicator}"
set-option -g status-right-length 200
# for ssh:ing
# set-option -g status-left ""
# set-option -g status-right "\"#{=21:pane_title}\" %H:%M %d-%b-%y"
set -g focus-events on
# bind M-r set -g status-left "#{weather_symbol}. #{weather_temperature} |" \; set -g status-right "#{spotify_info} | RAM:#{ram_percentage} CPU:#{cpu_percentage} GPU:#{gpu_percentage} GRAM:#{gram_percentage} | \"#{=21:pane_title}\" %H:%M %d-%b-%y" \; set -g status-right-length 200
bind M-l set-option -g status-left " #{session_name} |" \; set-option -g status-right "\"#{=21:pane_title}\" %H:%M %d-%b-%y"
# set default directory for new windows in this session to current directory:
bind M-w attach-session -c "#{pane_current_path}"
setw -g window-status-current-style 'fg=colour2 bg=colour0'
# tmux-mode-indicator
# prompt to display when tmux prefix key is pressed
set -g @mode_indicator_prefix_prompt ' WAIT '
# prompt to display when tmux is in copy mode
set -g @mode_indicator_copy_prompt ' COPY '
# prompt to display when tmux has synchronized panes
set -g @mode_indicator_sync_prompt ' SYNC '
# prompt to display when tmux is in normal mode
set -g @mode_indicator_empty_prompt ' TMUX '
# style values for prefix prompt
set -g @mode_indicator_prefix_mode_style 'bg=blue,fg=black'
# style values for copy prompt
set -g @mode_indicator_copy_mode_style 'bg=yellow,fg=black'
# style values for sync prompt
set -g @mode_indicator_sync_mode_style 'bg=red,fg=black'
# style values for empty prompt
set -g @mode_indicator_empty_mode_style 'bg=black,fg=green'
setenv DISPLAY ":1"
# Toggle mouse on with prefix m
bind m set -g mouse on \;\
display 'Mouse: ON'
# Toggle mouse off with prefix M
bind M set -g mouse off \;\
display 'Mouse: OFF'
set-option -sa terminal-overrides ',xterm-256color:RGB'
# for tmux-logging
set -g history-limit 50000
set -g @logging-path "/home/raz/.tmux-logging"
set -g @screen-capture-path "/home/raz/.tmux-logging"
set -g @save-complete-history-path "/home/raz/.tmux-logging"
# set -g @default_clear_history_key="" # Alt-c
# make C-f after prefix (which currently is C-f) pass through a C-f keystroke instead of copycat file search
set -g @copycat_file_search 'C-t'
#unbind -T prefix C-f
bind -T prefix C-f send-keys C-f
set -g @fpp-key 'x'
# for vim
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-capture-pane-contents 'on'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'feqzz/tmux-spotify-info'
set -g @plugin 'feqzz/tmux-weather-info-yr'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
set -g @plugin 'tmux-plugins/tmux-fpp'
set -g @plugin 'imomaliev/tmux-keyboard-layout'
set -g @plugin 'andersondanilo/tmuxp-fzf'
# set -g @plugin "arcticicestudio/nord-tmux"
# other plugin conf
set -g @open-S 'https://www.google.com/search?q='
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]:user/plugin'
# set -g @plugin '[email protected]:user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'