-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
120 lines (95 loc) · 3.85 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Setting the prefix from `C-b` to `C-a`.
# By remapping the `CapsLock` key to `Ctrl`,
# you can make triggering commands more comfottable!
set -g prefix C-a
# Free the original `Ctrl-b` prefix keybinding.
unbind C-b
# Ensure that we can send `Ctrl-a` to other apps.
bind C-a send-prefix
# Reload the file with Prefix r.
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Splitting panes.
bind | split-window -h
bind - split-window -v
# Moving between panes.
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Moveing between windows.
# Provided you've mapped your `CAPS LOCK` key to the `CTRL` key,
# you can now move between panes without moving your hands off the home row.
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Pane resizing.
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Maximize and restore a pane.
unbind Up
bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
unbind Down
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
# Log output to a text file on demand.
bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"
# Vimlike copy mode.
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Setting the delay between prefix and command.
set -sg escape-time 1
# Set the base index for windows to 1 instead of 0.
set -g base-index 1
set-window-option -g pane-base-index 1
# Set the base index for panes to 1 instead of 0.
setw -g pane-base-index 1
# Mouse support - set to on if you want to use the mouse.
# set -g mouse-utf8 on
set -g mouse on
# Start copy mode when scrolling up and exit when scrolling down to bottom.
# The "#{mouse_any_flag}" check just sends scrolls to any program running that
# has mouse support (like vim).
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
# Set the default terminal mode to 256color mode.
set -g default-terminal "xterm-256color"
# Enable activity alerts.
setw -g monitor-activity on
set -g visual-activity on
# Pane colors.
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow
# Command / message line.
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# Enable vi keys.
setw -g mode-keys vi
# Status bar
# set -g status-left-length 52
# set -g status-right-length 451
# set -g status-fg white
# set -g status-bg colour234
# set -g window-status-activity-attr bold
# set -g pane-border-fg colour245
# set -g pane-active-border-fg colour39
# set -g message-fg colour16
# set -g message-bg colour221
# set -g message-attr bold
# set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
# set -g status-right '#[fg=colour39, bg=colour234]⮂#[fg=colour234,bg=colour39] #(uptime) '
# set -g window-status-format "#[fg=white,bg=colour234] #I #W "
# set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour25,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
# Set the default command to launch for Mac
# if-shell 'test "$(uname -s)" = Darwin' 'set-option -g default-command "exec reattach-to-user-namespace -l fish --login"'
run-shell "$HOME/Library/Python/2.7/bin/powerline-daemon -q"
source "$POWERLINE/bindings/tmux/powerline.conf"