This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/common/tmux/conf

110 lines
3.4 KiB
Text
Raw Normal View History

2023-07-17 16:44:22 -05:00
unbind C-b
set -g prefix C-s
2023-07-18 01:57:44 -05:00
set -g update-environment "WAYLAND_DISPLAY DISPLAY"
2023-07-17 16:44:22 -05:00
2023-07-18 01:57:44 -05:00
bind R source-file "$HOME/.tmux.conf" \; display-message "Reloaded $HOME/.tmux.conf"
bind o display-message "Saved pane output to #(tmux-save-buffer '#S')"
bind O run "tmux-edit-buffer"
2023-07-17 16:44:22 -05:00
bind D attach-session -t . -c '#{pane_current_path}' \; display-message "Set session path to #{pane_current_path}"
2023-07-18 01:57:44 -05:00
bind H set -s status # toggle status bar
bind v split-window -h -c "#{pane_current_path}"
bind b split-window -c "#{pane_current_path}"
bind h split-window -c "#{pane_current_path}"
2023-07-17 16:44:22 -05:00
bind -n C-l select-pane -R
bind -n C-k select-pane -U
2023-07-18 01:57:44 -05:00
2023-07-17 16:44:22 -05:00
bind -n C-j select-pane -D
2023-07-18 01:57:44 -05:00
# enabling a ^J hotkey causes breakage when pasting anything that start with a newline, since it triggers the hotkey and some weird interaction with bracketed paste causes the pane to enter a broken state
2023-07-17 16:44:22 -05:00
bind -n C-h select-pane -L
2023-07-18 01:57:44 -05:00
bind -n C-M-l split-window -h -c "#{pane_current_path}"
bind -n C-M-j split-window -v -c "#{pane_current_path}"
2023-07-17 16:44:22 -05:00
# tab creation
bind -n C-t new-window
# tab nav is the default p and n binds
# window switcher is the default w bind
2023-07-18 01:57:44 -05:00
bind s run "tmux split-window -l 12 'tmuxswitcher'" # session switcher
2023-07-17 16:44:22 -05:00
set -g mouse on
set -g escape-time 0
set -g monitor-activity on
set -g visual-bell off
set -g bell-action other
set -g activity-action none
set -g mode-keys vi
set -g history-limit 1000000
2023-07-18 01:57:44 -05:00
2023-07-17 16:44:22 -05:00
set -g status on
set -g status-position bottom
set -g status-style "fg=colour8 bg=default"
set -g status-interval 5
set -g status-left-length 50
set -g window-status-style "fg=colour8 bg=default"
set -g window-status-format "#W"
set -g window-status-separator " "
set -g window-status-activity-style "fg=colour7 bg=default"
set -g window-status-bell-style "fg=colour1 bg=default"
set -g window-status-current-style "fg=colour4 bg=default"
set -g window-status-current-format " #W "
set -g status-left "#{client_user}@#h:#S "
2023-07-18 01:57:44 -05:00
set -g status-right "#(kubeline && printf ' ')"
2023-07-17 16:44:22 -05:00
set -g status-left-length 1000
set -g message-style "fg=colour7 bg=default"
set -g pane-active-border-style fg=blue
set -g pane-border-style fg=colour0
set -g clock-mode-colour colour8
set -g base-index 1
set -g pane-base-index 1
set -g window-status-current-format "#W"
# present a menu of urls to open from the visible pane
# TODO: fuzzy search this
# bind u capture-pane \;\
2023-07-18 01:57:44 -05:00
# save-buffer /tmp/tmux-buffer \;\
# split-window -l 10 "urlscan /tmp/tmux-buffer"
2023-07-17 16:44:22 -05:00
2023-07-18 01:57:44 -05:00
bind -T copy-mode-vi "y" send-keys -X copy-pipe-no-clear 'clip' \; display-message 'Copied to clipboard!'
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear 'clip' \; display-message 'Copied to clipboard!'
2023-07-17 16:44:22 -05:00
bind K kill-pane
bind C-S-k kill-window
2023-07-18 00:15:57 -05:00
# Activate OFF mode
bind -n M-o \
set prefix None \;\
set key-table off \;\
set -ag status-right " OFF"
# Disable OFF mode
bind -T off M-O \
set -u prefix \;\
set -u key-table \;\
source-file "$HOME/.tmux.conf"
2023-07-17 16:44:22 -05:00
source-file "$ENV_PATH/*/tmux.d.conf"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-processes 'helix hx vi vim nvim emacs man less more tail top htop btm irssi weechat mutt "git log" iex mix deno watchexec mosh-client ssh'
bind A run-shell "#{@resurrect-save-script-path}"
bind L run-shell "#{@resurrect-restore-script-path}"
set -g @continuum-restore 'on'
set -g @continuum-save-interval '120'