-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
88 lines (79 loc) · 3.85 KB
/
Copy path.tmux.conf
File metadata and controls
88 lines (79 loc) · 3.85 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
set -g default-terminal 'tmux-256color'
# set -ga terminal-overrides ',xterm-256color:RGB'
set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
# or add `export TERM=screen-256color-bce` in zshrc
set -g mouse on
# terminal mode use emacs keymap
setw -g mode-keys vi
set -g status-keys emacs
set -s escape-time 0
set -g base-index 1
set -g renumber-windows on
# reload configuration
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
# -- prefix
unbind C-b
set -g prefix 'C-s'
# pane navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind -T copy-mode-vi h send-keys -X cursor-left
bind -T copy-mode-vi l send-keys -X cursor-right
bind -T copy-mode-vi k send-keys -X cursor-up
bind -T copy-mode-vi j send-keys -X cursor-down
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind-key S choose-window
# create a new pane with current directory
bind '"' split-window -c '#{pane_current_path}'
bind '%' split-window -h -c '#{pane_current_path}'
set-option -g status on
set -q -g status-utf8 on
setw -q -g utf8 on
set-option -g status-interval 2
set -g status-justify 'centre'
set -g status-left-length 90
set -g status-right-length 140
setw -g window-status-separator ''
# default statusbar colors
set -g status-bg black
#set -g status-left ' #[fg=magenta,bold]❐ #S'
#set -g status-left '#[fg=brightyellow] #{?client_prefix,⌨ , } #[fg=magenta,bold] %Y-%m-%d %H:%M '
#set -g status-right '#(rainbarf --battery --remaining --bolt --tmux --rgb)'
#set -g status-left "#[fg=magenta,bold] %Y-%m-%d %H:%M | #[fg=brightblue]#(curl icanhazip.com) #(ifconfig enp1s0 | grep 'inet ' | awk '{print \"enp1s0 \" $2}') #(ifconfig wlp2s0 | grep 'inet ' | awk '{print \"wlp2s0 \" $2}') #(ifconfig en3 | grep 'inet ' | awk '{print \"en3 \" $2}') #(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') "
setw -g window-status-format '#[fg=brightblue] #I #W '
setw -g window-status-current-format '#[fg=magenta,bold] #I #W:#F'
setw -g window-status-activity-style bg=black
setw -g window-status-bell-style bg=black
#set-window-option -g window-status-current-format "#[fg=colour235, bg=colour27]⮀#[fg=colour255, bg=colour27] #I ⮁ #W #[fg=colour27, bg=colour235]⮀"
# green | red | yellow | blue | cyan
# free memory | unaccounted/wired memory | active memory | interactive memory | cached memory
set-option -g status-left "#(~/.config/tmux/tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/.config/tmux/tmux-powerline/powerline.sh right)"
# set-option -g status-right "#(~/.config/tmux/tmux-powerline/powerline.sh right)#[fg=cyan,bold]🔋#(cat /sys/class/power_supply/BAT0/capacity)%"
set-hook -g session-created 'run-shell "~/.config/tmux/tmux-powerline/powerline.sh init"' # prettifies the window-status segments
# set-option -g status-utf8 on
# set -g status-left '#(rainbarf --battery --remaining --bolt --rgb)'
# set-option default-path "$PWD"
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# use <prefix>I to install plugins
# <prefix>U to update plugins
# <prefix><alt+u> to uninstall not on the plugin list
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# prefix + Ctrl-s - save; prefix + Ctrl-r - restore. https://github.com/tmux-plugins/tmux-resurrect
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# copy to system clipboard
set -g @plugin 'tmux-plugins/tmux-yank'
# restore vim/neovim session
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-strategy-nvim 'session'
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'