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