-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_tmux.conf
140 lines (114 loc) · 4.3 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
# Finis coronat opus; Run at your own peril @silipwn;
# File : .tmux.conf
# License : BSD-3-Clause
# Author : silipwn <(contact at as-hw.in)>
# Date : 2019-09-22T18:10:24+0530
# Last-Modified: 2024-05-16T13:54:35-0400
# change the prefix from 'C-b' to 'C-a'
# (remap capslock to CTRL for easy access)
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# start with window 1 (instead of 0)
set -g base-index 1
# start with pane 1
set -g pane-base-index 1
# split panes using | and -, make sure they open in the same path
bind h split-window -h -c "#{pane_current_path}"
bind v split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# open new windows in the current path
bind c new-window -c "#{pane_current_path}"
# Add support for naming while creating the window
bind C command-prompt -p "window name:" "new-window -c '#{pane_current_path}'; rename-window '%%'"
# reload config file
bind r source-file ~/.tmux.conf
unbind p
bind p previous-window
# shorten command delay
set -sg escape-time 1
# don't rename windows automatically
set -g allow-rename off
# mouse control (clickable windows, panes, resizable panes)
set -g mouse on
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Windows
bind -n S-Right next-window
bind -n S-Left previous-window
# enable vi mode keys
set-window-option -g mode-keys vi
# set default terminal mode to 256 colors
# 2021-07-20T11:12:12+0530: silipwn: Support true colors in vim
# set -g default-terminal "tmux-256color"
set -g default-terminal "xterm-256color"
# 2022-02-01T08:44:56-0500: silipwn: This seems to cause problems in non standard terminals
# set -g default-terminal "xterm-kitty"
set -ag terminal-overrides ",xterm-256color:Tc"
# present a menu of URLs to open from the visible pane. sweet.
bind u capture-pane \;\
save-buffer /tmp/tmux-buffer \;\
split-window -l 10 "urlview /tmp/tmux-buffer"
######################
### DESIGN CHANGES ###
######################
# loud or quiet?
set -g visual-activity on
set -g visual-bell off
set -g visual-silence off
setw -g monitor-activity off
set -g bell-action any
# Remote copy
# allow OSC52 to set the clipboard
set -g set-clipboard on
set -g @extrakto_clip_tool_run "fg"
set -g @extrakto_clip_tool "osc52"
# modes
setw -g clock-mode-colour colour5
setw -g mode-style 'fg=colour1 bg=default bold'
# panes
set -g pane-border-style 'fg=colour1'
set -g pane-active-border-style 'bg=default fg=colour1 blink'
# statusbar
set -g status-position top
set -g status-justify centre
set -g status-style 'bg=default fg=colour1'
set -g status-left '#S on #H'
set -g status-right '#[fg=colour1,bg=default] %a %d %b %H:%M:%S '
# set -g status-right "#[fg=colour1]#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --interval 2)#[default]"
set -g status-right-length 50
set -g status-left-length 25
# windows
set -g window-active-style 'bg=default'
# set -g window-style 'fg=color247 bg=default'
setw -g window-status-current-style 'fg=colour196 bg=default bold'
setw -g window-status-current-format ' #I#[fg=colour1]:#[fg=colour76]#W#[fg=colour77]#F '
setw -g window-status-style 'fg=colour1 bg=default'
setw -g window-status-format ' #I#[fg=colour1]:#[fg=colour76]#W#[fg=colour77]#F '
setw -g window-status-bell-style 'fg=colour196 bg=default bold'
#set -g @themepack 'powerline/default/gray'
# messages
set -g message-style 'fg=colour196 bg=default bold'
set -g @yank_selection 'clipboard' # 'primary' or 'secondary' or 'clipboard'
set -g @extrakto_clip_tool "xsel --input --clipboard" # works better for nvim
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'laktak/extrakto'
#set -g @plugin 'thewtex/tmux-mem-cpu-load'
#set -g @plugin 'jimeh/tmux-themepack'
# Resurrect points
set -g @resurrect-processes 'man less more tail ranger htop vim dmesg'
# 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 -b '~/.tmux/plugins/tpm/tpm'