tmux.conf (6341B)
1 # ░▀█▀░█▄█░█░█░█░█░░ 2 # ░░█░░█░█░█░█░▄▀▄░░ 3 # ░░▀░░▀░▀░▀▀▀░▀░▀░░ 4 5 # change prefix to backtick 6 unbind C-b 7 set-option -g prefix ` 8 bind ` send-prefix 9 10 # unbind detach 11 # can still use D to select 12 # a client to detach 13 unbind d 14 15 # shell 16 set -g default-command /usr/bin/zsh 17 set -g default-shell /usr/bin/zsh 18 19 # start with window 1 (instead of 0) 20 set -g base-index 1 21 22 # start with pane 1 23 set -g pane-base-index 1 24 25 # keep window names fixed 26 set-option -g allow-rename off 27 28 # rename window on creation 29 ## these break tmuxp, but i like them 30 ## instead run ad-hoc command on last opened pane in tmuxp config 31 ## see dotfiles/tmux/.config/tmux/main.yaml 32 #set-hook -g after-new-window 'command-prompt -I "" "rename-window '%%'"' 33 #set-hook -g after-new-session 'command-prompt -I "" "rename-window '%%'"' 34 35 # screen mode 36 set -g default-terminal "screen-256color" 37 38 # source config file 39 bind r source-file $XDG_CONFIG_HOME/tmux/tmux.conf 40 41 # history 42 set -g history-limit 4096 43 44 # allow terminal scrolling 45 set-option -g terminal-overrides 'xterm*:smcup@:rmcup@' 46 set-option -sa terminal-features ",rxvt-unicode-256color:RGB" 47 48 # vim style copy paste mode 49 #unbind [ 50 #bind Escape copy-mode 51 #bind-key -T copy-mode-vi 'v' send -X begin-selection 52 #bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel \ 53 # "/usr/bin/xsel -i -p > /dev/null"\; \ 54 # display-message "copied selection to primary clipboard" 55 unbind [ 56 bind Escape copy-mode 57 unbind i 58 bind i paste-buffer 59 bind-key -Tcopy-mode-vi 'v' send -X begin-selection 60 #bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection primary' 61 bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel 'xsel -i >/dev/null' 62 63 # use vi mode 64 setw -g mode-keys vi 65 set -g status-keys vi 66 67 # splitting 68 unbind % 69 bind b split-window -h 70 unbind '"' 71 bind v split-window -v 72 73 # window switching 74 # urxvt tab like window switching (-n: no prior escape seq) 75 bind-key -n S-left prev 76 bind-key -n S-right next 77 bind-key -n C-left swap-window -t -1 78 bind-key -n C-right swap-window -t +1 79 80 # pane switching 81 unbind h 82 bind h select-pane -L 83 unbind j 84 bind j select-pane -D 85 unbind k 86 bind k select-pane -U 87 unbind l 88 bind l select-pane -R 89 90 # colon : 91 bind : command-prompt 92 93 # pomodoro 94 bind-key g run-shell "~/.tmux/plugins/tmux-golden-apple/golden_apple.tmux start" 95 bind-key G run-shell "~/.tmux/plugins/tmux-golden-apple/golden_apple.tmux stop" 96 97 # panes 98 set -g pane-border-style fg=black 99 set -g pane-active-border-style fg=colour244 100 101 # messaging 102 set -g message-style fg=colour7,bg=colour8 103 set -g message-command-style fg=colour0,bg=colour1 104 set-option -g display-time 4000 105 106 # window mode 107 setw -g mode-style fg=colour7,bg=colour5 108 109 # resizing 110 setw -g aggressive-resize on 111 112 # status bar 113 set -g status-justify right 114 set -g status-style bg=terminal 115 set -g status-fg colour7 116 set -g status-interval 5 117 set -g status-right-length 100 118 setw -g window-status-separator " " 119 120 setw -g window-status-format "#[bg=colour241,fg=colour0] #I #[bg=colour241,fg=colour0]#W #[bg=default,fg=colour241]▓░" 121 setw -g window-status-current-format "#[bg=colour10,fg=colour0] #I #[bg=colour10,fg=colour0]#W #[bg=default,fg=colour10]▓░" 122 set -g status-justify left 123 set-option -g status-right '#[bg=default,fg=colour237]░▓#[bg=colour237,fg=colour15]#{goldenapple}#{muted_state}#{bond_device}#{online_status}#[bg=colour237,fg=colour243] %Y%m#[bg=colour237,fg=colour7]%d#[fg=colour243]-#[fg=colour15]%u #[fg=colour7]%H%M #[bg=colour243,fg=colour237]▓#[default]' 124 #set-option -g status-right '#[bg=default,fg=colour237]░▓#[bg=colour237,fg=colour15]#(~/bin/tmux-status) #{goldenapple}#{muted_state}#{bond_device}#{online_status}#[bg=colour237,fg=colour243] %Y%m#[bg=colour237,fg=colour7]%d#[fg=colour243]-#[fg=colour15]%u #[fg=colour7]%H%M #[bg=colour243,fg=colour237]▓#[default]' 125 set-option -g status-left '' 126 127 # online and offline icon for tmux-online-status 128 set -g @online_icon "#[bg=colour237,fg=colour241]░▓█#[bg=colour241,fg=black]online#[bg=colour237,fg=colour241]█▓░#[default]" 129 set -g @offline_icon "#[bg=colour237,fg=colour1]░▓█#[bg=colour1,fg=white]offline#[bg=colour237,fg=colour1]█▓░#[default]" 130 131 # device names for tmux-bond-device 132 set -g @ethernet "#[bg=colour237,fg=colour7] hardwire #[default]" 133 set -g @wifi "#[bg=colour237,fg=colour7] airborne #[default]" 134 135 # device names for tmux-muted 136 set -g @muted "#[bg=colour237,fg=colour241]░▓█#[bg=colour241,fg=black]mute#[bg=colour237,fg=colour241]█▓░#[default]" 137 set -g @unmuted "#[bg=colour237,fg=colour1]░▓█#[bg=colour1,fg=white]on air#[bg=colour237,fg=colour1]█▓░#[default]" 138 139 # work minutes for pomodoro 140 set -g @work 15 141 142 # loud or quiet? 143 set-option -g visual-activity on 144 set-option -g visual-bell off 145 set-option -g visual-silence off 146 set-window-option -g monitor-activity off 147 set-option -g bell-action none 148 149 # tmux clock 150 set -g clock-mode-colour colour6 151 152 # escape time (for vim) 153 set -sg escape-time 0 154 155 # some key-binding changes 156 #bind x kill-pane 157 bind X next-layout 158 bind Z previous-layout 159 160 # toggle status bar visibility 161 #bind t set status 162 163 # toggle todo list popup 164 ## http://git.z3bra.org/scripts/file/todo.html 165 unbind t 166 bind t display-popup -w 75 ~/.local/bin/todo 167 168 unbind T 169 bind T command-prompt -I "run-shell 'todo " 170 171 # plugins 172 # `mkdir -p ~/.tmux/plugins/ ; git clone 'https://github.com/tmux-plugins/tpm' ~/.tmux/plugins/tpm` 173 set -g @plugin 'tmux-plugins/tpm' 174 set -g @plugin 'tmux-plugins/tmux-online-status' 175 set -g @plugin 'https://gitlab.com/pyratebeard/tmux-bond-device.git' 176 set -g @plugin 'tmux-plugins/tmux-muted' 177 178 # see: toggle on/off all keybindings · Issue #237 · tmux/tmux - https://github.com/tmux/tmux/issues/237 179 # Also, change some visual styles when window keys are off 180 bind-key -T root F12 \ 181 set-option -g prefix None \;\ 182 setw -g window-status-current-format "#[bg=colour1,fg=colour0] #I #[bg=colour1,fg=colour0]#W #[bg=colour0,fg=colour1]▓░" \;\ 183 refresh-client -S 184 185 bind-key -T root F11 \ 186 set-option -g prefix ` \;\ 187 bind ` send-prefix \;\ 188 setw -g window-status-current-format "#[bg=colour10,fg=colour0] #I #[bg=colour10,fg=colour0]#W #[bg=colour0,fg=colour10]▓░" \;\ 189 refresh-client -S 190 191 # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) 192 run -b '~/.config/tmux/plugins/tpm/tpm'