-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
115 lines (85 loc) · 3.42 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
# TO INSTALL plugins
# F1 + r
# F1 + I
unbind r
unbind F3
#set-environment -g PATH "/usr/local/bin:/bin:/usr/bin"
bind r source-file ~/.tmux.conf
set -g prefix F1
set -g mouse on
# place status on top
set-option -g status-position top
# limit max history
set-option -g history-limit 30000
# update window name to match directory
set-option -g status-interval 5
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
# open new window in same directory
bind + new-window -c "#{pane_current_path}"
bind '|' split-window -h -c "#{pane_current_path}"
bind '-' split-window -v -c "#{pane_current_path}"
#set -g pane-active-border-style "bg=default,fg=colour166"
#set -g pane-border-style "bg=default,fg=colour245"
#set -g pane-border-lines "double"
# Navigation between panes
# https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
bind-key -n 'C-Left' if-shell "$is_vim" 'send-keys C-Left' 'select-pane -L'
bind-key -n 'C-Down' if-shell "$is_vim" 'send-keys C-Down' 'select-pane -D'
bind-key -n 'C-Up' if-shell "$is_vim" 'send-keys C-Up' 'select-pane -U'
bind-key -n 'C-Right' if-shell "$is_vim" 'send-keys C-Right' 'select-pane -R'
bind-key -T copy-mode-vi 'C-Left' select-pane -L
bind-key -T copy-mode-vi 'C-Down' select-pane -D
bind-key -T copy-mode-vi 'C-Up' select-pane -U
bind-key -T copy-mode-vi 'C-Right' select-pane -R
bind-key -n C-S-Left previous-window
bind-key -n C-S-Right next-window
bind-key * send-keys -R \; clear-history
set -g @plugin 'alexwforsythe/tmux-which-key'
# set -g @plugin 'omerxx/tmux-sessionx'
# set -g @sessionx-bind 't'
# set -g @sessionx-tree-mode 'on'
# set -g @sessionx-preview-location 'right'
# set -g @sessionx-preview-ratio '50%'
# set -g @sessionx-window-height '40%'
# set -g @sessionx-window-width '50%'
#
# Allow copy-pasting from tmux
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @yank_selection_mouse 'clipboard'
# Pesist sessions in case of reboot
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin '2kabhishek/tmux2k'
set -g @tmux2k-theme 'default'
# set the left and right plugin sections
set -g @tmux2k-left-plugins "weather"
set -g @tmux2k-right-plugins "battery time"
set -g @tmux2k-fixed-location "Tallinn"
# to set window list alignment (centre by default)
set -g @tmux2k-window-list-alignment 'left'
set -g @tmux2k-icons-only false
set -g @tmux2k-show-powerline true
#set -g @tmux2k-left-sep # alternate right status bar sep
set -g @tmux2k-right-sep ' '
# to customize plugin colors
# set -g @tmux2k-[plugin-name]-colors "[background] [foreground]"
set -g @tmux2k-window-colors "bg_main blue" # set cpu plugin bg to red, fg to black
set -g @tmux2k-battery-colors "bg_main white" # set cpu plugin bg to red, fg to black
set -g @tmux2k-time-colors "bg_main white" # set cpu plugin bg to red, fg to black
# to enable compact window list size
set -g @tmux2k-compact-windows true
# change refresh rate
set -g @tmux2k-refresh-rate 5
# weather scale
set -g @tmux2k-show-fahrenheit false
# 24 hour time
set -g @tmux2k-military-time true
# network interface to watch
set -g @tmux2k-network-name "wlo1"
# Plugin manager
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
run '~/.tmux/plugins/tpm/tpm'