-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
47 lines (38 loc) · 1.54 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
set -g default-terminal "screen-256color"
set -g status-bg colour244 # for solarized dark or dracula
# set -g status-bg colour7 # for solarized light
# set -g status-bg colour137 # for zenburn
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'pwittchen/tmux-plugin-ram'
set-option -g history-limit 10000
set-option -g renumber-windows on
# remap prefix from 'C-b' to 'C-t'
unbind C-b
set-option -g prefix C-t
bind-key C-t send-prefix
# `brew install bash` for more up to date bash
if-shell "if [[ $(uname) == 'Darwin' ]]; then true; else false; fi" \
'set-option -g default-shell "/opt/homebrew/bin/bash"'
# Session switch by name
bind s command-prompt -p "session abbr:" "run 'tmux switch -t $(tmux ls -F \"##{session_created}:##{session_name}\" | sort -n | grep \':%%\' | head -n 1 | cut -d \':\' -f 2)'"
# Put formerly bound to s command at S
bind S choose-tree -Zs
bind -r C-k resize-pane -U
bind -r C-j resize-pane -D
bind -r C-h resize-pane -L
bind -r C-l resize-pane -R
# vim-like pane switching
bind k select-pane -U
bind j select-pane -D
bind h select-pane -L
bind l select-pane -R
set -g focus-events on
set -g status-right-length 100
set -g status-left-length 20
set -g status-right 'CPU: #{cpu_icon} #{cpu_percentage} | RAM: #{ram} | Batt: #{battery_percentage} #{battery_remain} | %a %h-%d %H:%M '
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'