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