tmux.conf (3119B)
1 # vim: foldmethod=marker foldlevel=0 2 # Global options {{{ 3 # "set" == "set-option" 4 set -g history-limit 30000 5 set -g mouse on 6 set -g terminal-overrides 'xterm*:smcup@:rmcup@' 7 set -g default-command $SHELL 8 set -g default-shell $SHELL 9 set -g default-terminal "xterm-256color" 10 set -g pane-active-border-style fg=green 11 set -g set-titles on 12 set -g set-titles-string '#H:#S.#I.#P #W #T' 13 set -g status-bg '#ffffff' 14 set -g status-fg white 15 set -g status-interval 5 16 set -g status-justify right 17 set -g status-left '#[fg=#228822]» #[fg=#4477ff,bold]#T#{?pane_synchronized, #[fg=#cc5500#,bold][SYNC],}#[default]' 18 set -g status-right '#[fg=#4477ff,bold]»» ###S %R %m-%d#(acpi | cut -d ',' -f 2)#[default]' 19 set -g visual-activity on 20 set -g base-index 1 # start numbering windows at 1, easier to reach 21 set -s escape-time 0 22 # }}} 23 # Window options {{{ 24 setw -g mode-keys vi 25 setw -g monitor-activity on 26 setw -g xterm-keys on # for vim 27 setw -g aggressive-resize on 28 setw -g automatic-rename 29 setw -g mode-style bg='#d0d0d0' 30 setw -g window-status-current-style bg='#99ddff,bold' 31 setw -g window-status-activity-style bg='#e9cddf' 32 setw -g pane-base-index 1 # start numbering panes at 1, easier to reach 33 # }}} 34 # Key bindings {{{ 35 # General {{{ 36 37 # Set the prefix 38 unbind C-b # unbind default leader key 39 set -g prefix C-a 40 bind a send-prefix 41 bind C-a send-prefix 42 43 # Switch ; and : 44 bind \; command-prompt 45 bind : last-pane 46 47 # Reload the config file 48 unbind r 49 bind r source-file ~/.config/tmux/tmux.conf \; display-message "Reloaded config" 50 51 # Allow c-a c-d to detach 52 bind C-d detach-client 53 54 # Create a new session 55 bind C new-session 56 # }}} 57 # Windows {{{ 58 59 # Vertical split 60 unbind % 61 bind v split-window -h 62 63 # Horizontal split 64 unbind '"' # unbind horizontal split 65 bind s split-window -v # split pane horizontally 66 67 # Window navigation 68 unbind C-j 69 unbind C-k 70 bind C-j previous-window 71 bind C-k next-window 72 73 # Moving windows 74 unbind H 75 unbind L 76 bind -r L swap-window -t +1 77 bind -r H swap-window -t -1 78 79 # Rotate the layout of panes 80 unbind C-o 81 bind M-v rotate-window 82 83 # Switch layouts 84 unbind M-- 85 unbind M-| 86 bind M-- select-layout "even-vertical" 87 bind M-| select-layout "even-horizontal" 88 89 # Screen-like rename binding 90 unbind A 91 bind A command-prompt "rename-window %%" 92 unbind M-a 93 bind M-a command-prompt -I "#S" "rename-session -- '%%'" 94 95 # Watch/unwatch for activity 96 unbind ! 97 bind ! setw monitor-activity \; display-message "#{?monitor-activity,M,Not m}onitoring activity" 98 99 # }}} 100 # Panes {{{ 101 # Pane navigation 102 unbind j 103 unbind h 104 unbind k 105 unbind l 106 bind j select-pane -D 107 bind h select-pane -L 108 bind k select-pane -U 109 bind l select-pane -R 110 111 # Pane resizing 112 unbind C-h 113 unbind C-j 114 unbind C-k 115 unbind C-l 116 bind -r C-h resize-pane -L # "-r" means key may repeat 117 bind -r C-j resize-pane -D 118 bind -r C-k resize-pane -U 119 bind -r C-l resize-pane -R 120 121 # Split & join panes 122 bind T break-pane 123 bind J command-prompt -p "join pane from:" "join-pane -s '%%'" 124 125 # Listing panes 126 unbind Space 127 unbind S 128 unbind W 129 bind Space list-panes 130 bind S choose-tree -Zs 131 bind W choose-tree -Zw 132 133 # Synchronize panes 134 unbind @ 135 bind @ setw synchronize-panes \; display-message "Toggle sync panes" 136 137 # }}} 138 # }}}