-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
143 lines (117 loc) Β· 4.33 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
set-window-option -g mode-keys vi
#set -g mouse-select-pane on
#setw -g mode-mouse on
set-option -g default-terminal "screen-256color"
#set -g default-terminal "tmux"
set-option -sa terminal-overrides ',xterm-256color:RGB'
set-option -g focus-events on
### screen-like keybindings
unbind C-b
set -g prefix C-a
bind C-a send-prefix
bind a send-prefix
bind A command-prompt "rename-window %%"
setw -g automatic-rename off
bind Escape copy-mode
# default is too slow which is annoying during heavy-use of the copy buffer
set -s escape-time 100
# vi-keys everywhere; anything else would be uncivilized
setw -g mode-keys vi
set -g status-keys vi
setw -g xterm-keys on
# Moving between windows/panes
bind C-a last-window
bind " " next-window
bind BSpace previous-window
bind '"' choose-window
#set -g mouse-select-pane on
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind H command-prompt "resize-pane -L %1"
bind J command-prompt "resize-pane -D %1"
bind K command-prompt "resize-pane -U %1"
bind L command-prompt "resize-pane -R %1"
bind y setw synchronize-panes
bind s command-prompt "swap-window -t %1"
bind S command-prompt "move-window -r -t %1"
# splits
bind C new-window -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind r next-layout
bind R previous-layout
bind p command-prompt -p "put pane into:" "join-pane -t '%%'"
bind P command-prompt -p "pull pane from:" "join-pane -s '%%'"
unbind %
bind | split-window -h
unbind -
bind '\' split-window -v
# maximizing and restoring panes.
bind x resize-pane -Z
# pre-configured window and pane layouts
bind W run "tmux renamew work; tmux splitw -l 3; tmux selectp -U"
# nice, big scrollback buffer (lines)
set -g history-limit 99999
# read and write and delete paste buffer
bind > command-prompt -p "Write buffer to xclip:" \
"run 'tmux save-buffer -b %1 - | xclip -i -select clipboard'"
bind < command-prompt -p "Read from xclip into buffer:" \
"run 'xclip -o -selection clipboard | tmux load-buffer -b %1 -'"
bind + command-prompt "delete-buffer -b %1"
#bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard'
# toggle activity/silence monitoring
bind m setw monitor-activity
bind M command-prompt -p "monitor-silence (seconds)" "setw monitor-silence %%"
# set xterm window status
set-option -g set-titles on
set-option -g set-titles-string '#H ###I.#P #W (#S)'
### Colors
#set -g status-bg black
#set -g status-fg white
#set -g message-bg green
#set -g message-fg black
#setw -g window-status-bell-attr blink
#setw -g window-status-bell-bg green
#setw -g window-status-bell-fg black
#setw -g window-status-current-bg white
#setw -g window-status-current-fg blue
set -g @themepack 'powerline/block/blue'
### Status bar
# set -g status-right-length 50
#set -g status-right "#[fg=magenta] @#H #[fg=cyan]%Y-%m-%d #[fg=yellow]%a #[fg=green]%H:%M #[fg=blue]#(uptime|sed -e 's/.*: //g' -e 's/,//g')#[default]"
set -g status-right '#{battery_status_bg} Batt: #{battery_icon} #{battery_percentage} #{battery_remain} | %a %h-%d %H:%M '
set -g @batt_icon_charge_tier8 'π'
set -g @batt_icon_charge_tier7 'π'
set -g @batt_icon_charge_tier6 'π'
set -g @batt_icon_charge_tier5 'π'
set -g @batt_icon_charge_tier4 'π'
set -g @batt_icon_charge_tier3 'π'
set -g @batt_icon_charge_tier2 'π'
set -g @batt_icon_charge_tier1 'π'
set -g @batt_icon_status_charged 'π'
set -g @batt_icon_status_charging 'β‘'
set -g @batt_icon_status_discharging 'π'
set -g @batt_color_status_primary_charged '#3daee9'
set -g @batt_color_status_primary_charging '#3daee9'
# vim:ft=tmux'"'
#maximizing and restoring panes.
unbind +
bind + new-window -d -n tmp \; swap-pane -s tmp.0 \; select-window -t tmp
unbind -
bind - last-window \; swap-pane -s tmp.0 \; kill-window -t tmp
bind a send-prefix
bind -n C-k send-keys -R \; clear-history
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'jimeh/tmux-themepack'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'erikw/tmux-powerline'
set -g @plugin 'christoomey/vim-tmux-navigator'
# set -g @plugin 'catppuccin/tmux'
# set -g @treemux-tree-nvim-init-file '~/.tmux/plugins/treemux/configs/treemux_init.lua'
# set -g @plugin 'kiyoon/treemux'
run '~/.tmux/plugins/tpm/tpm'
# unbind -n C-k