2017-02-07 16:16:45 -06:00
unbind C-b
set -g prefix C-s
2022-02-01 17:10:13 -06:00
bind s send-prefix
2017-02-07 16:16:45 -06:00
2023-04-16 02:17:40 -05:00
bind v split-window -h -c "#{pane_current_path}"
bind b split-window -c "#{pane_current_path}"
2022-02-01 17:10:13 -06:00
bind T source-file "$HOME/.tmux.conf" \; display-message "Reloaded $HOME/.tmux.conf"
2023-04-16 02:17:40 -05:00
# dump buffer contents to file
2022-02-01 17:10:13 -06:00
bind O display-message "#(tmux-save-buffer '#S')"
2023-04-16 02:17:40 -05:00
# TODO: dump buffer to file and open in EDITOR?
2022-02-01 17:10:13 -06:00
bind D attach-session -t . -c '#{pane_current_path}' \; display-message "Set session path to #{pane_current_path}"
2023-04-16 02:17:40 -05:00
# toggle status bar
2022-02-01 17:10:13 -06:00
bind H set -s status
2023-04-16 02:17:40 -05:00
# pane navigation
2022-02-01 17:10:13 -06:00
bind -n C-l select-pane -R
bind -n C-k select-pane -U
bind -n C-j select-pane -D
bind -n C-h select-pane -L
2023-04-16 02:17:40 -05:00
# tab creation
2022-02-01 17:10:13 -06:00
bind -n C-t new-window
bind Tab next-window
2018-06-05 11:05:20 -05:00
2023-04-16 02:17:40 -05:00
# tab nav is the default p and n binds
# window switcher is the default w bind
# session switcher
bind s run "tmux split-window -l 12 'tmuxswitcher'"
2017-04-23 06:47:00 -05:00
2021-11-24 09:36:02 -06:00
set -g update-environment "WAYLAND_DISPLAY DISPLAY"
2020-11-17 17:17:03 -06:00
set -g mouse on
set -g escape-time 0
2023-04-16 03:03:16 -05:00
2020-11-17 17:17:03 -06:00
set -g monitor-activity on
2023-04-16 03:03:16 -05:00
set -g visual-bell off
2020-11-17 17:17:03 -06:00
set -g bell-action other
2023-04-16 03:03:16 -05:00
set -g activity-action none
2020-11-17 17:17:03 -06:00
set -g mode-keys vi
2023-01-13 10:53:17 -06:00
set -g history-limit 1000000
2020-11-17 17:17:03 -06:00
set -g status on
2020-01-20 09:12:52 -06:00
set -g status-position bottom
2023-04-16 02:17:40 -05:00
set -g status-style "fg=colour8 bg=default"
# set -g status-bg default
# set -g status-fg colour8
2018-06-06 15:55:34 -05:00
set -g status-interval 5
2020-11-20 15:27:02 -06:00
set -g status-left-length 50
2023-04-16 02:17:40 -05:00
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"
2023-03-27 12:28:56 -05:00
set -g window-status-current-format " #W "
2023-04-16 02:17:40 -05:00
set -g status-left "#h:#S "
2022-07-01 09:47:10 -05:00
set -g status-right ""
2023-04-16 02:17:40 -05:00
# set -ag status-right "#(pwd | $XDG_CONFIG_HOME/lytedev-dotfiles/common/bin/glancepath) "
set -ag status-right "#(kubeline && printf ' ')"
2022-07-01 09:47:10 -05:00
set -g status-left-length 1000
# set -g status-right-length 280
# set -ag status-right "#{pane_current_command}"
2022-02-01 17:10:13 -06:00
2023-04-16 02:17:40 -05:00
set -g message-style "fg=colour7 bg=default"
2022-12-06 11:28:15 -06:00
set -g pane-active-border-style fg=blue
2023-03-27 12:28:56 -05:00
set -g pane-border-style fg=colour0
2019-08-09 10:00:52 -05:00
set -g clock-mode-colour colour8
2017-02-07 16:16:45 -06:00
set -g base-index 1
set -g pane-base-index 1
2023-04-16 02:17:40 -05:00
set -g window-status-current-format "#W"
2017-02-07 16:16:45 -06:00
# present a menu of urls to open from the visible pane
2022-12-13 14:12:29 -06:00
# TODO: fuzzy search this
2022-02-01 17:10:13 -06:00
# bind u capture-pane \;\
# save-buffer /tmp/tmux-buffer \;\
# split-window -l 10 "urlscan /tmp/tmux-buffer"
2017-02-07 16:16:45 -06:00
2022-02-01 17:10:13 -06:00
bind -T copy-mode-vi "y" send-keys -X copy-pipe-no-clear 'wl-copy' \; display-message 'Copied to clipboard!'
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear 'wl-copy' \; display-message 'Copied to clipboard!'
2017-04-28 21:43:23 -05:00
2022-02-01 17:10:13 -06:00
bind K kill-pane
bind C-S-k kill-window
2017-02-07 16:16:45 -06:00
2021-11-11 13:08:37 -06:00
# TODO: handle tmux nesting by being able to toggle the prefix (and indicate in status bar?)
2022-02-01 17:10:13 -06:00
# TODO: styles after `set -u key-table`
#if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
bind -T root F12 set -g prefix None \; set -g key-table off \; display-message "Keys OFF" \; refresh-client -S
2020-01-20 09:12:52 -06:00
2022-02-01 17:10:13 -06:00
# TODO: styles after `set -u key-table`
bind -T off F12 \
set -g -u prefix \;\
set -g -u key-table \;\
display-message "Keys ON" \;\
refresh-client -S
2021-11-11 13:08:37 -06:00
source-file "$ENV_PATH/*/tmux.d.conf"
2022-12-13 13:41:40 -06:00
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'
2022-12-28 02:06:42 -06:00
set -g @continuum-save-interval '120'