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 #set -g default-terminal "tmux"
12 set -g monitor-activity off # NOTE: disabled to keep the bell working
13 set -g visual-activity off
16 set -g bell-action any
17 set -g visual-bell off
18 #set -g bell-on-alert on
21 # DEPRECATED: set -g utf8 on
22 # DEPRECATED: set -g status-utf8 on
28 # Lower escape timing from 500ms to 50ms
29 # for quicker response to scroll-buffer access.
32 # Setting the prefix from C-b to C-a.
34 # Free the original Ctrl-b prefix keybinding.
39 bind C-c new-window -c "#{pane_current_path}"
40 bind C-p previous-window
41 bind p previous-window
44 bind -N 'Select window 8' 8 select-window -t:=8
45 bind -N 'Select window 10' 0 select-window -t:=10
48 bind Space choose-buffer
50 # Ensure that we can send Ctrl-a to other apps.
52 bind-key a send-prefix
59 #bind -t vi-copy 'v' begin-selection
60 #bind -t vi-copy 'y' copy-selection
61 #bind -t vi-copy 'Space' halfpage-down
62 #bind -t vi-copy 'Bspace' halfpage-up
64 # Fill Copy/Paste clipboard
65 set -ga terminal-override ',rxvt-uni*:XT:Ms=\E]52;%p1%s;%p2%s\007'
67 # Allow xterm titles in terminal window, terminal scrolling with scrollbar,
68 # and setting overrides of C-Up, C-Down, C-Left, C-Right
69 #set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
72 bind Y run "tmux save-buffer - | xclip -i -sel clipboard"
73 bind P run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
74 #bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
75 #bind y run-shell "tmux show-buffer | xclip -sel clip -i" \; display-message "Copied tmux buffer to system clipboard"
77 # Reload the file with Ctrl-a+r
78 bind r source-file ~/.tmux.conf \; display "Reloaded!"
81 bind | split-window -h -c "#{pane_current_path}"
82 bind - split-window -v -c "#{pane_current_path}"
84 # Moving between panes
90 # Moving between windows
91 bind -r C-j select-window -t :-
92 bind -r C-l select-window -t :+
93 bind-key C-a last-window
96 bind -r J resize-pane -L 5
97 bind -r K resize-pane -D 5
98 bind -r I resize-pane -U 5
99 bind -r L resize-pane -R 5
100 # Set current window pane to 80 columns
101 bind-key 8 resize-pane -x 80
103 # Maximize and restore a pane
105 bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
107 bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
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 largest
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 #source-file ~/.tmux/vendor/tmux-colors-solarized/tmuxcolors.conf
206 #set -g @plugin 'tmux-plugins/tpm'
207 #set -g @plugin 'tmux-plugins/tmux-sensible'
208 #set -g @plugin 'tmux-plugins/tmux-yank'
209 #set -g @yank_selection 'clipboard' # 'primary', or 'secondary' or 'clipboard'
211 # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
212 #run -b '~/.tmux/plugins/tpm/tpm'