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