-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
51 lines (39 loc) · 1.57 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
# Start window numbering at 1 instead of 0
set -g base-index 1
# Force gapless window numbering sequence
set-option -g renumber-windows on
# Enable colours
set -g default-terminal "screen-256color"
# Vim navigation
bind h select-pan -L
bind j select-pan -D
bind k select-pan -U
bind l select-pan -R
# Toggle pane synchronization
bind S set-window-option synchronize-panes
# Less distracting status bar
set -g status-bg black
set -g status-fg white
set -g status-interval 1
set -g status-left-length 70
set -g status-right-length 90
set -g status-right '#[fg=green][#[default]#($HOME/.bin/weather)#[fg=green]] #[fg=green][#[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]#[fg=green]] #[fg=green][#($HOME/.bin/battery)#[fg=green]]'
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Reload config
bind r source-file ~/.tmux.conf \; display 'Config reloaded'
# Fixes the clipboard in vim. Not sure why.
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Scrolling with arrow keys is too slow
set -g -q 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
# Use vim keybindings in copy mode
setw -g mode-keys vi
unbind p
bind p paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# http://unix.stackexchange.com/a/25638
set -sg escape-time 0