2 # Reload the profile as a system update could have happened since tmux was launched.
 
   3 set-environment -g -r __ETC_PROFILE_DONE
 
   4 set-environment -g -r __NIXOS_SET_ENVIRONMENT_DONE
 
   5 set-environment -g -r __HM_SESS_VARS_SOURCED
 
   8 set -g default-terminal "screen-256color"
 
   9 # See https://github.com/jcaplan/delta/blob/master/manual/src/tips-and-tricks/using-delta-with-tmux.md
 
  10 set -ga terminal-overrides ",*-256color:Tc"
 
  11 #set -g default-terminal "tmux"
 
  14 set -g monitor-activity off # NOTE: disabled to keep the bell working
 
  15 set -g visual-activity off
 
  18 set -g bell-action any
 
  19 set -g visual-bell off
 
  20 #set -g bell-on-alert on
 
  23 # DEPRECATED: set -g utf8 on
 
  24 # DEPRECATED: set -g status-utf8 on
 
  30 # Lower escape timing from 500ms to 50ms
 
  31 # for quicker response to scroll-buffer access.
 
  34 # Setting the prefix from C-b to C-a.
 
  36 # Free the original Ctrl-b prefix keybinding.
 
  41 bind C-c new-window -c "#{pane_current_path}"
 
  42 bind C-p previous-window
 
  43 bind p   previous-window
 
  46 bind -N 'Select window 8'  8 select-window -t:=8
 
  47 bind -N 'Select window 10' 0 select-window -t:=10
 
  50 bind Space choose-buffer
 
  52 # Ensure that we can send Ctrl-a to other apps.
 
  54 bind-key a send-prefix
 
  60 bind v paste-buffer -p
 
  61 #bind -t vi-copy 'v' begin-selection
 
  62 #bind -t vi-copy 'y' copy-selection
 
  63 #bind -t vi-copy 'Space' halfpage-down
 
  64 #bind -t vi-copy 'Bspace' halfpage-up
 
  66 # Fill Copy/Paste clipboard
 
  67 set -ga terminal-override ',rxvt-uni*:XT:Ms=\E]52;%p1%s;%p2%s\007'
 
  69 # Allow xterm titles in terminal window, terminal scrolling with scrollbar,
 
  70 # and setting overrides of C-Up, C-Down, C-Left, C-Right
 
  71 #set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
 
  74 bind Y run "tmux save-buffer - | xclip -i -sel clipboard"
 
  75 bind P run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer -p"
 
  76 #bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
 
  77 #bind y run-shell "tmux show-buffer | xclip -sel clip -i" \; display-message "Copied tmux buffer to system clipboard"
 
  79 # Reload the file with Ctrl-a+r
 
  80 bind r source-file ~/.tmux.conf \; display "Reloaded!"
 
  83 bind | split-window -h -c "#{pane_current_path}"
 
  84 bind - split-window -v -c "#{pane_current_path}"
 
  86 # Moving between panes
 
  92 # Moving between windows
 
  93 bind -r C-j select-window -t :-
 
  94 bind -r C-l select-window -t :+
 
  95 bind-key C-a last-window
 
  98 bind -r J resize-pane -L 5
 
  99 bind -r K resize-pane -D 5
 
 100 bind -r I resize-pane -U 5
 
 101 bind -r L resize-pane -R 5
 
 102 # Set current window pane to 80 columns
 
 103 bind-key 8 resize-pane -x 80
 
 105 # Maximize and restore a pane
 
 107 bind z resize-pane -Z
 
 109 # Log output to a text file on demand.
 
 110 #bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"
 
 116 # DEPRECATED: set -g mode-mouse on
 
 117 # DEPRECATED: set -g mouse-select-pane on
 
 118 # DEPRECATED: set -g mouse-resize-pane on
 
 119 # DEPRECATED: set -g mouse-select-window on
 
 121 bind-key m set -g mouse on  \; display 'Mouse: ON'
 
 122 bind-key M set -g mouse off \; display 'Mouse: OFF'
 
 125 #bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard'
 
 127 #bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
 
 129 # To copy, left click and drag to highlight text in yellow,
 
 130 # once you release left click yellow text will disappear and will automatically be available in clibboard
 
 131 # Update default binding of `Enter` to also use copy-pipe
 
 132 #unbind -T copy-mode-vi Enter
 
 133 #bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
 
 134 #bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
 
 137 # see https://github.com/tmux/tmux/issues/145#issuecomment-150736967
 
 138 #bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
 
 139 #bind -n WheelDownPane select-pane -t= \; send-keys -M
 
 140 #bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
 
 141 #bind -t vi-copy    C-WheelUpPane   halfpage-up
 
 142 #bind -t vi-copy    C-WheelDownPane halfpage-down
 
 144 #bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
 
 145 #bind -n WheelDownPane select-pane -t= \; send-keys -M
 
 146 #bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
 
 147 #bind -T copy-mode-vi    C-WheelUpPane   send-keys -X halfpage-up
 
 148 #bind -T copy-mode-vi    C-WheelDownPane send-keys -X halfpage-down
 
 149 #bind -T copy-mode-emacs C-WheelUpPane   send-keys -X halfpage-up
 
 150 #bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
 
 157 set -g pane-base-index 1
 
 158 set -g pane-border-style 'fg=green,bg=black'
 
 159 set -g pane-active-border-style 'fg=white,bg=yellow'
 
 160 set -g pane-border-style 'fg=colour245'
 
 161 set -g pane-active-border-style 'bg=colour39'
 
 162 set -g pane-active-border-style 'fg=green,bg=black'
 
 163 set -g pane-border-style 'fg=white,bg=black'
 
 164 #set -g pane-border-status bottom
 
 165 #set -g pane-border-format " #P: #{pane_current_command} "
 
 166 #set -g pane-border-format " #P: #{pane_current_path} "
 
 170 setw -g aggressive-resize on
 
 171 setw -g window-size latest
 
 172 setw -g window-status-activity-style 'fg=yellow'
 
 173 setw -g window-status-bell-style 'fg=red'
 
 174 setw -g window-status-current-format "#I #W "
 
 175 setw -g window-status-current-style 'fg=white'
 
 176 setw -g window-status-format "#I #W "
 
 177 setw -g window-status-style 'fg=blue,bg=black'
 
 180 setw -g set-titles on
 
 181 setw -g set-titles-string "#T"
 
 182 setw -g allow-rename on
 
 183 setw -g automatic-rename off
 
 184 #set -g automatic-rename-format '#{b:pane_current_path}'
 
 187 set -g message-style 'fg=black,bg=green'
 
 190 set -g status-left-length 52
 
 191 set -g status-right-length 451
 
 192 set -g status-justify left
 
 193 set -g status-style 'fg=white,bg=black'
 
 194 set -g status-left-length 40
 
 195 set -g status-right-length 80
 
 196 set -g status-left ""
 
 197 set -g status-right '#[fg=red]#h'
 
 198 #set -g status-interval 5
 
 199 #set -g status-justify centre
 
 202 set -g default-terminal "${TERM}"
 
 203 set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'  # undercurl support
 
 204 set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'  # underscore colours - needs tmux-3.0
 
 207 #source-file ~/.tmux/vendor/tmux-colors-solarized/tmuxcolors.conf
 
 211 #set -g @plugin 'tmux-plugins/tpm'
 
 212 #set -g @plugin 'tmux-plugins/tmux-sensible'
 
 213 #set -g @plugin 'tmux-plugins/tmux-yank'
 
 214 #set -g @yank_selection 'clipboard' # 'primary', or 'secondary' or 'clipboard'
 
 216 # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
 
 217 #run -b '~/.tmux/plugins/tpm/tpm'