-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
95 lines (77 loc) · 3.35 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
# reset prefix key to C-a, because I'm used to screen. From https://wiki.archlinux.org/index.php/tmux#Configuration.
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# 0 is too far from ` ;)
# set -g base-index 1 # don't know what this means - disabling until I find out
# Automatically set window title
# set-window-option -g automatic-rename on # meh
# set-option -g set-titles on
# prevent clear-screen when entering/exiting vim/less, like screen does
set-window-option -g alternate-screen off
#set -g default-terminal screen-256color
# set -g status-keys vi # don't really know fully what this implies yet
set -g history-limit 500000 # Really? No way to set unlimited history?
setw -g mode-keys vi # this makes scrollback mode work in vi-mode like screen
# setw -g mode-mouse on # almost definitely don't want this
# setw -g monitor-activity on # these 2 are actually quite annoying
# set -g visual-activity on # (don't entirely understand what this implies either, too lazy
# to read http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/)
# bind Esc to exiting copy-mode (like screen). Technically there should be a better way
# to do this, but it works.
bind -t vi-copy Escape copy-selection
bind-key v split-window -h
bind-key s split-window -v
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
# These I think will interfere with my xmonad config. Too bad.
# bind-key M-j resize-pane -D
# bind-key M-k resize-pane -U
# bind-key M-h resize-pane -L
# bind-key M-l resize-pane -R
# Vim style pane selection
# I really like this, but want to bind k to "kill" like screen...
# bind h select-pane -L
# bind j select-pane -D
# bind k select-pane -U
# bind l select-pane -R
# Just like screen (from http://stackoverflow.com/questions/7771557/how-to-terminate-window-in-tmux)
bind k confirm kill-window
bind \ confirm kill-session
bind A command-prompt 'rename-window %%'
# Use Alt-vim keys without prefix key to switch panes
# REALLY don't understand how this is different than 2 blocks up..
# bind -n M-h select-pane -L
# bind -n M-j select-pane -D
# bind -n M-k select-pane -U
# bind -n M-l select-pane -R
# Use Alt-arrow keys without prefix key to switch panes
# This may also conflict with either xmonad or vim...
# bind -n M-Left select-pane -L
# bind -n M-Right select-pane -R
# bind -n M-Up select-pane -U
# bind -n M-Down select-pane -D
# Shift arrow to switch windows
# Also likely conflicts with vim
# bind -n S-Left previous-window
# bind -n S-Right next-window
# No delay for escape key press
set -sg escape-time 0
# Reload tmux config
bind r source-file ~/.tmux.conf
# THEME
set -g status-bg black
set -g status-fg white
# set -g window-status-current-bg white
# set -g window-status-current-fg black
set -g window-status-current-attr bold
set -g status-interval 60 # don't know what this does
set -g status-left-length 50
set -g status-left '#[fg=red][ #[fg=cyan](#S) #[fg=green]#(whoami)#[fg=red]@#[fg=green]#(hostname | cut -d. -f1) #[fg=red]][ '
set -g status-right '#[fg=red] ][ #[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg) #[fg=white]%H:%M #[fg=red]]'
setw -g window-status-format ' #I#F#W '
setw -g window-status-current-format " #[fg=red](#[default]#I#F#W#[fg=red]) "
# TODO look into https://github.com/erikw/tmux-powerline
# http://crunchbang.org/forums/viewtopic.php?id=20504 might also be good