-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
134 lines (97 loc) · 3.68 KB
/
Copy path.tmux.conf
File metadata and controls
134 lines (97 loc) · 3.68 KB
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
unbind r
bind r source-file ~/.tmux.conf
set-option -s escape-time 11
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
set -gq allow-passthrough on
set -s escape-time 0
set -g status-interval 5
set-window-option -gq -g aggressive-resize on
unbind-key C-b
set -g prefix C-s
bind-key 'C-s' send-prefix
set -g set-titles on
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g mouse on
set-option -g default-shell /bin/zsh
set -g detach-on-destroy off
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
# keybinds
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
bind-key x kill-pane
bind-key c new-window -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind-key -r f run-shell "tmux neww ~/scripts/tmux-sessionizer"
bind-key n command-prompt "new-session -s '%%'"
unbind-key s
bind-key "s" display-popup -E -w 80% -h 70% -d '#{pane_current_path}' -T 'Sesh' -b 'rounded' tv sesh
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-online-status'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-save-interval '5'
set -g @continuum-restore 'on'
# Network indicator
set -g @online_icon "ok"
set -g @offline_icon "nok"
# Battery indicator
set -g @batt_icon_status_charging ''
set -g @batt_icon_status_charged ''
set-option -g @thm_no_bg default
set-option -g @thm_bg black
set-option -g @thm_red red
set-option -g @thm_green green
set-option -g @thm_cyan cyan
set -g pane-border-style fg=cyan
set -g pane-active-border-style fg=cyan
# Variables
session_fg="#{?client_prefix,magenta,#{@thm_cyan}}"
battery_fg="#{?#{e|>=:10,#{battery_percentage}},#{@thm_red},magenta}"
network_online="#{?#{==:#{online_status},ok}}"
# STATUS BAR
# Left side
set -g status-left-length 100
set -g status-left ""
set -ga status-left "#[bg=#{@thm_no_bg},fg=${session_fg}] #S "
set -ga status-left "#[bg=#{@thm_no_bg},fg=#{@thm_cyan}]|"
set -ga status-left "#[bg=#{@thm_no_bg},fg=#{@thm_cyan}] #{=/-32/...:#{s|$USER|~|:#{b:pane_current_path}}} "
# Right side
set -g status-right-length 100
set -g status-right ""
set -ga status-right "#[bg=#{@thm_no_bg},fg=magenta] %l:%M "
set -ga status-right "#[bg=#{@thm_no_bg},fg=magenta]|"
set -ga status-right "#[bg=#{@thm_no_bg},fg=${battery_fg}] #{battery_icon} #{battery_percentage} "
set -ga status-right "#[bg=#{@thm_no_bg},fg=magenta]|"
set -ga status-right "#[bg=#{@thm_no_bg}]#{?network_online,#[fg=magenta] ,#[fg=#{@thm_red},bold]#[reverse] }"
# General status bar styles
set -g status-position top
set -ga status-style "bg=#{@thm_no_bg},fg=#{@thm_green}"
set -g status-justify "absolute-centre"
# Window options
set -g window-status-format ""
set -g window-status-style "bg=#{@thm_no_bg},fg=magenta"
set -g window-status-bell-style "bg=#{@thm_no_bg},fg=#{@thm_red}"
set -g window-status-activity-style "bg=#{@thm_no_bg},fg=#{@thm_red}"
set -gF window-status-separator "#[bg=#{@thm_no_bg}] "
set -g window-status-current-format ""
set -g window-status-current-style "bg=#{@thm_no_bg},fg=magenta"
set -g message-style "bg=#{@thm_bg},fg=#{@thm_cyan}"
set -wg automatic-rename on
set -g automatic-rename-format "#{pane_current_command}"
run '~/.tmux/plugins/tpm/tpm'