Merge github.com:LeMeteore/mydotfiles
[dotfiles] / .tmux.conf
1
2 # how to send tmux commands to nested tmux session
3 set -g prefix C-b
4 unbind C-a
5 bind C-b send-prefix
6
7 # utf8 support
8 set-window-option -g utf8 on
9
10 # bind kill-session to C-b k
11 bind k kill-session
12
13 # windows starts at 1
14 set -g base-index 1
15
16 # Sane scrolling
17 set -g terminal-overrides 'xterm*:smcup@:rmcup@'
18
19 # intuitive splitting
20 bind | split-window -h
21 bind - split-window -v
22 bind _ split-window -v
23
24 #------------------------------------------------------------------------------
25 # STATUSBAR
26 #------------------------------------------------------------------------------
27
28 # default statusbar colors
29 set -g status-fg white
30 set -g status-bg blue
31 set -g status-attr dim
32
33 # Left side of status bar
34 set -g status-left-length 20
35 #set -g status-left '#[fg=green][#[bg=black,fg=cyan]#S#[bg=black,fg=blue,dim]:#H#[fg=green]]'
36
37 # Right side of status bar
38 set -g status-right-length 100
39 set -g status-right ' #[fg=red]| #[fg=white]#T #[fg=red]| #[fg=yellow]%d %h - %H:%M #[default]'
40
41 # Example of using a shell command in the status line
42 #set -g status-right "#[fg=yellow]#(uptime | cut -d ',' -f 2-)"
43 #set -g status-right ' #[fg=red] | #[fg=white] #T #[fg=red] | #[fg=yellow] #(date) %H:%M #[default] #[fg=red] |'
44
45 # Inactive windows in status bar
46 set-window-option -g window-status-format '#[fg=cyan,dim]#I#[fg=blue]:#[default]#W#[fg=grey,dim]#F'
47
48 # Current or active window in status bar
49 #set-window-option -g window-status-current-bg yellow
50 #set-window-option -g window-status-current-fg black
51 set-window-option -g window-status-current-format '#[bg=blue,fg=cyan,bold]#I#[bg=blue,fg=cyan]:#[fg=white]#W#[fg=dim]#F'
52
53 #---------------------
54 # ACTIVITY MONITORING
55 #---------------------
56
57 #set- -g monitor-activity on
58 #set -g visual-activity on
59
60
61 # Highlight active window
62 #set-window-option -g window-status-current-bg red
63
64 #----------------
65 # CUSTOMIZATION
66 #----------------
67
68 #reload this file
69 bind R source-file ~/.tmux.conf \; display-message "tmux configuration reloaded!"
70
71 # launch ssh in another window
72 bind S command-prompt -p "ssh" "new-window -n ssh:%1 'exec ssh %1'"
73
74 # call man of command on another panel
75 bind H command-prompt -p "man" "split-window -h 'exec man %1'"
76
77 # open irc in another window
78 bind M-c new-window -n irc \; \
79 send-keys -t :irc 'irssi -c irc.freenode.net -n patricknsukami -w patrick/nsukami' C-m \; \
80 select-window -t :irc
81
82 # open postgresql on another window
83 bind M-d new-window -n psql \; \
84 send-keys -t :psql 'psql -d template1' C-m \; \
85 select-window -t :psql