-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
67 lines (59 loc) · 2.83 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
# Set zsh as shell
set -g default-shell /bin/zsh
set -g default-terminal "screen-256color"
set -sg escape-time 0
setw -g aggressive-resize on
# Flag windows with new activity
set -g monitor-activity on
# Disable automatic formatting, do it manually down below
set -g visual-activity off
# Enable mouse mode
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
# ============ Keybindings ============
unbind &
unbind %
unbind '"'
bind X confirm kill-window # Kill windows with X, server with K
bind K confirm kill-server
bind v split-window -v # Split windows with b/v
bind b split-window -h
set -g prefix C-x # Bind prefix to control+X
bind C-x last-window # Bind last window to control+X (twice)
bind h select-pane -L # Traverse panes with h/j/k/l
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind C command-prompt -p "Name of new window: " "new-window -n '%%'"
bind r source-file ~/.tmux.conf \; display-message "Config reloaded."
# ============ Setup statusbar ============
set -g status on
#set -g status-utf8 on
set -g status-interval 10
set -g status-justify left
set -g status-bg colour0
set -g status-fg black
set -g pane-active-border-bg default
set -g base-index 1
# Format status messages
set-option -g message-fg colour12
set-option -g message-bg colour0
# Format window indicators
set -g window-status-current-attr bold
# set -g window-status-current-format "#[fg=colour0,bg=brightcyan] #[fg=white]#I #W #[fg=brightcyan,bg=colour0]"
set -g window-status-current-format "#[fg=colour0 bg=green] #[fg=white]#I #W #[fg=green bg=colour0]"
set -gw window-status-activity-attr bold
set -g window-status-format "#{?window_activity_flag,#[fg=colour0 bg=red],#[fg=colour0 bg=colour8]} #{?window_activity_flag,#[fg=white],#[fg=brightcyan]}#I #{?window_activity_flag,#[fg=white],#[fg=colour0]} #{?window_activity_flag,#[fg=white],#[fg=brightcyan]}#W #{?window_activity_flag,#[fg=red bg=colour0],#[fg=colour8 bg=colour0]}"
set -g window-status-separator ""
set -g status-left-length 32
set -g status-right-length 25
# Set statusbar
set -g status-left "#[fg=yellow,bg=black] #h #[fg=black,bg=blue] #[fg=white]#S #[fg=blue,bg=colour0]"
set -g status-right "#[fg=magenta]#[fg=white,bg=magenta] %a #(echo %l):%M%p "
# Set battery status
set -ga status-right "#[fg=colour0]#[fg=blue,bg=colour0] #(pmset -g batt | awk 'NR==2 { print substr($2, colour0, length($2\\)-1\\) }') "
# Set battery charging indicator
set -ga status-right "#([[ `pmset -g batt | awk -F '; *' 'NR==2 { print $2 }'` == "charging" ]] && echo '#[fg=yellow]⚡#[fg=blue] ')"
run -b "~/.vim/tprompt.tmux"