-
Notifications
You must be signed in to change notification settings - Fork 5
/
.tmux.conf
60 lines (48 loc) · 1.67 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
set -g default-terminal "screen-256color"
# Change prefix to Ctrl-a
set-option -g prefix C-a
set-option -g prefix2 C-b
# Start Window Numbering at 1
set -g base-index 1
set -g pane-base-index 1
unbind %
bind | split-window -h
bind - split-window -v
# I'm a Vim user, this makes navigation easier
setw -g mode-keys vi # I especially like being able to search with /,? when in copy-mode
unbind-key j
bind-key j select-pane -D # Similar to 'C-w j' to navigate windows in Vim
unbind-key k
bind-key k select-pane -U
unbind-key h
bind-key h select-pane -L
unbind-key l
bind-key l select-pane -R
# keybindings to make resizing easier
# Hitting the sequence Ctrl-b Ctrl-h will make the division between the current
# pane and the one below it move one line. What makes it usable is the -r flag,
# which means I can just keep hitting Ctrl-h as many times as I want until the
# panes look right.
bind -r C-h resize-pane -L
bind -r C-j resize-pane -D
bind -r C-k resize-pane -U
bind -r C-l resize-pane -R
# Set status bar
set -g status-bg black
set -g status-fg white
set -g status-left-length 11
set -g status-left '#[fg=green]#H [#P/#I]'
# Status bar on the right
set -g status-right-length 45
set -g status-right '#[fg=yellow]#(uptime | cut -d "," -f 2-)'
# Automatically set window title
setw -g automatic-rename on
# Use mouse for selecting panes
# When on, selecting text with the mouse doesnt't work anymore
#set-option -g mouse-select-pane on
# Enable mouse wheel scrolling
setw -g mode-mouse off
# Move window N to this pane/window
bind-key @ command-prompt -p "create pane from:" "join-pane -s ':%%'"
# Move this pane to window N
bind-key "#" command-prompt -p "send pane to:" "join-pane -t ':%%'"