# how to send tmux commands to nested tmux session set -g prefix C-b unbind C-a bind C-b send-prefix # utf8 support set-window-option -g utf8 on # bind kill-session to C-b k bind k kill-session # windows starts at 1 set -g base-index 1 # Sane scrolling set -g terminal-overrides 'xterm*:smcup@:rmcup@' # intuitive splitting bind | split-window -h bind - split-window -v bind _ split-window -v #------------------------------------------------------------------------------ # STATUSBAR #------------------------------------------------------------------------------ # default statusbar colors set -g status-fg white set -g status-bg black set -g status-attr dim # Left side of status bar set -g status-left-length 20 #set -g status-left '#[fg=green][#[bg=black,fg=cyan]#S#[bg=black,fg=blue,dim]:#H#[fg=green]]' # Right side of status bar set -g status-right-length 100 set -g status-right '#[fg=cyan]#T #[fg=yellow]| #[fg=cyan]%d %h - %H:%M #[default]' # Example of using a shell command in the status line #set -g status-right "#[fg=yellow]#(uptime | cut -d ',' -f 2-)" #set -g status-right ' #[fg=red] | #[fg=white] #T #[fg=red] | #[fg=yellow] #(date) %H:%M #[default] #[fg=red] |' # Inactive windows in status bar set-window-option -g window-status-format '#[fg=cyan,dim]#I#[fg=blue]:#[default]#W#[fg=yellow,dim]#F' # Current or active window in status bar #set-window-option -g window-status-current-bg yellow #set-window-option -g window-status-current-fg black 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' #--------------------- # ACTIVITY MONITORING #--------------------- #set- -g monitor-activity on #set -g visual-activity on # Highlight active window #set-window-option -g window-status-current-bg red #---------------- # CUSTOMIZATION #---------------- #reload this file bind M-r source-file ~/.tmux.conf \; display-message "tmux configuration reloaded!" # launch ssh in another window bind M-s command-prompt -p "ssh" "new-window -n ssh:%1 'exec ssh %1'" # call man of command on another panel bind M-m command-prompt -p "man" "split-window -h 'exec man %1'" # open irc in another window bind M-i new-window -n irc \; \ send-keys -t :irc 'irssi -c irc.freenode.net -n patricknsukami -w patrick/nsukami' C-m \; \ select-window -t :irc # open postgresql on another window bind M-p new-window -n psql \; \ send-keys -t :psql 'psql -d template1' C-m \; \ select-window -t :psql # # bind M-v new-window -n vlc -c /home/nsukami/Musique \; \ # send-keys -t :vlc 'vlc --intf rc playlist' C-m \; \ # split-window -h -t :vlc -c /home/nsukami/Musique \; \ # send-keys -t :vlc.1 "find . -maxdepth 1 -type f -printf '%f\n'" C-m \; \ # tell vlc to play something bind M-v command-prompt -p "vlc " "new-window -n vlc -c /home/nsukami/Musique 'exec vlc --intf rc %1' \; \ split-window -h -p 30 -t :vlc -c /home/nsukami/Musique \; \ send-keys -t :vlc.1 'ls' C-m \; \ send-key -t :vlc.0 'playlist' C-m \; \ select-pane -t :vlc.0 \; \ last-window -t : "