-
Notifications
You must be signed in to change notification settings - Fork 0
/
config
120 lines (90 loc) · 3.08 KB
/
config
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
# Adapted from http://darcsden.com/lyro/config/browse/+.tmux.conf
# we use vim
set-window-option -g mode-keys vi
set-window-option -g mode-mouse off
# set terminal
set -g default-terminal "screen-256color"
# set the prefix key to ctrl+a
unbind C-b
set -g prefix C-a
# resend ctrl+a
bind-key a send-prefix
# toggle last window like screen
bind-key C-a last-window
# rename window like screen
bind-key '"' command-prompt "rename-window %%"
# split window like vim
bind-key s split-window
bind-key v split-window -h
bind-key k confirm-before kill-pane
# toggle statusbar
bind-key b set-option status
# ctrl+up/down cylcles through panes
bind-key -n C-up select-pane -U
bind-key -n C-down select-pane -D
bind-key -n C-left select-pane -L
bind-key -n C-right select-pane -R
# ctrl+left/right cycles through windows
#bind-key -n M-right next
#bind-key -n M-left prev
# ctrl+shift+left/right moves windows
bind-key -n M-S-right swap-window -t +
bind-key -n M-S-left swap-window -t -
bind-key -n M-C-right swap-window -t +
bind-key -n M-C-left swap-window -t -
bind-key M-C-right swap-window -t +
bind-key M-C-left swap-window -t -
# open a man-page in new window
bind / command-prompt "split-window 'exec man %%'"
# quick view of processes
bind '~' split-window "exec zsh -c 'htop -u fifr'"
# quick view of full help
bind 'h' split-window "exec man -l ~/local/share/man/man1/tmux.1"
# v and y like vi in copy-mode
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# Ctrl+PageUp/PageDown start scroll mode
bind-key -n C-PPage copy-mode -u
bind-key -t vi-copy -n C-PPage page-up
bind-key -t vi-copy -n C-NPage page-down
bind-key p paste-buffer
bind-key P choose-buffer
bind-key V copy-mode
# scrollback buffer n lines
set -g history-limit 10000
# list for activity on all windows
set -g bell-action any
# on-screen time for display-panes in ms
set -g display-panes-time 2000
# start window indexing at one instead of zero
set -g base-index 1
# enable wm window titles
set -g set-titles on
# wm window title string (uses statusbar variables)
set -g set-titles-string "tmux(#S)$ #W"
# statusbar -------------------------------
set -g display-time 2000
# default statusbar colors
set -g status-fg white
set -g status-bg black
set -g status-attr bright
# default window title colors
set-window-option -g window-status-fg white
set-window-option -g window-status-bg default
set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-attr bright
# command/message line colors
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# show some useful status but only when tmux is started
set -g status-left-length 50
set -g status-left "#([[ -f /tmp/.chrootid ]] && echo '#[fg=yellow,bold]' || echo '#[fg=white,bold]')[#S]#[default]"
set -g status-right-length 60
set -g status-right "| #[fg=white]%a %d %b %H:%M#[default] #(sh ~/etc/tmux/scripts/show-battery-status)"
# set shell
#set-option -g default-shell /bin/zsh
# end