]> Sergey Matveev's repositories - dotfiles.git/blob - tmux/.tmux.conf
Single tmux popup for fzf
[dotfiles.git] / tmux / .tmux.conf
1 set-option -g mode-keys vi
2 set-option -g base-index 1
3 set-option -g default-terminal "screen-256color"
4 set-option -g escape-time 1
5 set-option -g repeat-time 0
6 set-option -g history-limit 20000
7 set-option -g renumber-windows on
8
9 set-option -g prefix C-a
10 unbind-key C-b
11 bind-key C-a send-prefix
12
13 bind-key -n C-PgUp previous-window
14 bind-key -n C-PgDn next-window
15 bind-key -n S-PgUp copy-mode -u
16
17 bind '"' split-window -c "#{pane_current_path}"
18 bind % split-window -h -c "#{pane_current_path}"
19 bind c new-window -c "#{pane_current_path}"
20 bind ] paste-buffer -p
21
22 set-option -g status-style "bg=black,fg=white"
23 set-option -g status-left "#S>"
24 set-option -g status-right "#T"
25 set-option -g status-justify centre
26
27 set-window-option -g automatic-rename on
28 set-window-option -g window-status-format "#I:#W:#T#F"
29 set-window-option -g window-status-style "bg=green fg=black"
30 set-window-option -g window-status-current-format "#I:#W#F"
31 set-window-option -g window-status-current-style "bg=red"
32 set-window-option -g window-status-last-style "bg=cyan"
33
34 bind-key b set-option status
35 unbind-key L
36
37 bind-key t display-menu \
38     music t "display-popup -KE -w 100% -R ~/bin/tmux-menu-music.sh" \
39     pass p "display-popup -KE -R ~/bin/tmux-menu-pass-session.sh" \
40     dict d "display-popup -KE -h 100% -R ~/bin/tmux-menu-dict.sh" \
41     calc c "display-popup -KE -R ~/bin/tmux-menu-calc.sh" \
42     cal l "display-popup -R \"cal -3N\"" \
43     top o "display-popup -KE -h 100% -R \"top -s 1\""
44
45 bind-key u {
46     capture-pane -J
47     save-buffer /tmp/tmux-buffer
48     delete-buffer
49     display-popup -KE -w 100% -R "urlview /tmp/tmux-buffer"
50 }
51
52 bind-key y {
53     capture-pane -J
54     save-buffer /tmp/tmux-buffer
55     delete-buffer
56     split-window 'vim -c "set listchars=" -c "match ExtraWhitespace //" /tmp/tmux-buffer'
57 }
58
59 bind-key o display-menu \
60     find d "display-popup -KE -w 100% -R \"~/bin/tmux-fzf.sh find '#{pane_current_path}'\"" \
61     buf-files f "display-popup -KE -w 100% -R \"~/bin/tmux-fzf.sh buf-files '#{pane_current_path}'\"" \
62     git-files g "display-popup -KE -w 100% -R \"~/bin/tmux-fzf.sh git-files '#{pane_current_path}'\"" \
63     git-branches b "display-popup -KE -w 100% -R \"~/bin/tmux-fzf.sh git-branches '#{pane_current_path}'\"" \
64     git-commits c "display-popup -KE -w 100% -R \"~/bin/tmux-fzf.sh git-commits '#{pane_current_path}'\""
65
66 bind-key Y {
67     capture-pane -J -S - -E -
68     save-buffer /tmp/tmux-buffer
69     delete-buffer
70     split-window 'vim -c "set listchars=" -c "match ExtraWhitespace //" /tmp/tmux-buffer'
71 }