tmux-light.conf (4507B)
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 # terminal-overrides works based on $TERM outside of tmux 7 set -g terminal-overrides 'xterm-256color:Tc:smcup@:rmcup@,st-256color:Tc:smcup@:rmcup@,alacritty:Tc:smcup@:rmcup@*:Ss=\E[%p1%d q:Se=\E[ q' 8 set -g allow-passthrough on # allow escape sequence passthrough 9 set -g default-command $SHELL 10 set -g default-shell $SHELL 11 set -g default-terminal $TERM 12 set -g set-titles on 13 set -g set-titles-string '#H:#S.#I.#P #W #T' 14 set -g status-interval 1 15 set -g status-justify right 16 set -g status-left-length 60 17 set -g status-right-length 60 18 set -g visual-activity on 19 set -g base-index 1 # start numbering windows at 1, easier to reach 20 set -g renumber-windows on 21 set -s escape-time 0 22 set -g set-clipboard off 23 setw -g mode-keys vi 24 set -g status-keys emacs 25 # }}} 26 # Visuals {{{ 27 set -g pane-active-border-style fg=#ff5500 28 set -g pane-border-style fg=#a4a4a4 29 set -g status-bg '#e4e4e4' 30 set -g status-fg '#2c2625' 31 set -g status-left '#[fg=#228822]» #[fg=#4477ff,bold]#T#{?pane_synchronized, #[fg=#cc5500#,bold][SYNC],} #[default,align=centre,italics]#(mpc | grep -i "^\[paused\]" >/dev/null && printf "⏸ ")#(mpc current)#[default]' 32 set -g status-right "#[fg=#4477ff,bold] »» Sesh #S | #(battery -p)%% | %R (%b %d, %a)#[default]" 33 setw -g mode-style bg='#d0d0d0' 34 setw -g window-status-activity-style bg='#e9cddf' 35 setw -g window-status-current-style bg='#99ddff,bold' 36 #}}} 37 # Window options {{{ 38 setw -g monitor-activity on 39 setw -g xterm-keys on # for vim 40 setw -g aggressive-resize on 41 setw -g automatic-rename 42 setw -g pane-base-index 1 # start numbering panes at 1, easier to reach 43 # }}} 44 # Key bindings {{{ 45 # General {{{ 46 47 # Set the prefix 48 unbind C-b # unbind default leader key 49 set -g prefix C-a 50 bind a send-prefix 51 bind C-a send-prefix 52 53 # Switch ; and : 54 bind \; command-prompt 55 bind : last-pane 56 57 # Use vi-like keybindings in command prompt mode 58 set -g status-keys vi 59 60 # Reload the config file 61 unbind r 62 bind r source-file ~/.config/tmux/tmux.conf \; display-message "Reloaded config" 63 64 # Allow c-a c-d to detach 65 bind C-d detach-client 66 67 # Create a new session 68 bind C new-session 69 bind c new-window -c "#{pane_current_path}" 70 71 # Tmux clipboard to system clipboard 72 bind Y run-shell "tmux show-buffer | clc" \; display-message "Tmux clipboard -> System clipboard" 73 bind -T copy-mode-vi 'Y' send -X copy-pipe-and-cancel "clc" 74 75 # Cancel 76 bind-key -T copy-mode-vi 'i' send-keys -X cancel 77 78 # Copy 79 bind-key -T copy-mode-vi 'y' send-keys -X copy-selection-and-cancel 80 81 # Don't cancel mouse selection when letting go 82 unbind -T copy-mode-vi MouseDragEnd1Pane 83 84 # Allow switching sessions with repeat (-r) 85 bind-key -r ( switch-client -p 86 bind-key -r ) switch-client -n 87 # }}} 88 # Windows {{{ 89 90 # Vertical split 91 unbind % 92 bind v split-window -h -c "#{pane_current_path}" 93 94 # Horizontal split 95 unbind '"' # unbind horizontal split 96 bind s split-window -v -c "#{pane_current_path}" # split pane horizontally 97 98 # Window navigation 99 unbind C-j 100 unbind C-k 101 bind-key -r C-j previous-window 102 bind-key -r C-k next-window 103 bind-key -r n next 104 bind-key -r p prev 105 106 # Moving windows 107 unbind H 108 unbind L 109 bind -r L swap-window -t +1 \; next-window 110 bind -r H swap-window -t -1 \; previous-window 111 112 # Rotate the layout of panes 113 unbind C-o 114 bind M-v rotate-window 115 116 # Switch layouts 117 unbind M-- 118 unbind M-| 119 bind M-- select-layout "even-vertical" 120 bind M-| select-layout "even-horizontal" 121 122 # Screen-like rename binding 123 unbind A 124 bind A command-prompt "rename-window %%" 125 unbind M-a 126 bind M-a command-prompt -I "#S" "rename-session -- '%%'" 127 128 # Watch/unwatch for activity 129 unbind ! 130 bind ! setw monitor-activity \; display-message "#{?monitor-activity,M,Not m}onitoring activity" 131 132 # Open a popup window 133 bind ` display-popup -E 134 # }}} 135 # Panes {{{ 136 # Pane navigation 137 unbind j 138 unbind h 139 unbind k 140 unbind l 141 bind j select-pane -D 142 bind h select-pane -L 143 bind k select-pane -U 144 bind l select-pane -R 145 146 # Pane resizing 147 unbind C-h 148 unbind C-j 149 unbind C-k 150 unbind C-l 151 bind -r C-h resize-pane -L # "-r" means key may repeat 152 bind -r C-j resize-pane -D 153 bind -r C-k resize-pane -U 154 bind -r C-l resize-pane -R 155 156 # Split & join panes 157 bind T break-pane 158 bind J command-prompt -p "join pane from:" "join-pane -s '%%'" 159 160 # Listing panes 161 unbind Space 162 unbind S 163 unbind W 164 bind Space list-panes 165 bind S choose-tree -Zs 166 bind W choose-tree -Zw 167 168 # Synchronize panes 169 unbind @ 170 bind @ setw synchronize-panes \; display-message "Toggle sync panes" 171 172 # Clear pane 173 bind C-r send-keys -R \; clear-history 174 # }}} 175 # }}}