2023-11-01 11:07:10 -05:00
{
# colors,
# font,
. . .
} : {
programs . tmux = {
enable = true ;
baseIndex = 1 ;
clock24 = true ;
extraConfig = ''
unbind C-b
set - g prefix C-s
2023-11-09 16:55:01 -06:00
# enable tmux to support helix colors
2023-11-09 16:25:30 -06:00
set - g default-terminal " t m u x - 2 5 6 c o l o r "
set - g terminal-overrides " , x t e r m - 2 5 6 c o l o r : R G B "
2023-11-01 11:07:10 -05:00
set - g update-environment " W A Y L A N D _ D I S P L A Y D I S P L A Y "
bind R source-file " $ H O M E / . t m u x . c o n f " \ ; display-message " R e l o a d e d $ H O M E / . t m u x . c o n f "
bind o display-message " S a v e d p a n e o u t p u t t o # ( t m u x - s a v e - b u f f e r ' # S ' ) "
bind O run " t m u x - e d i t - b u f f e r "
bind D attach-session - t . - c ' #{pane_current_path}' \; display-message "Set session path to #{pane_current_path}"
bind H set - s status # toggle status bar
bind v split-window - h - c " # { p a n e _ c u r r e n t _ p a t h } "
bind b split-window - c " # { p a n e _ c u r r e n t _ p a t h } "
bind h split-window - c " # { p a n e _ c u r r e n t _ p a t h } "
bind - n C-l select-pane - R
bind - n C-k select-pane - U
bind - n C-j select-pane - D
# 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
bind - n C-h select-pane - L
bind - n C-M-l split-window - h - c " # { p a n e _ c u r r e n t _ p a t h } "
bind - n C-M-j split-window - v - c " # { p a n e _ c u r r e n t _ p a t h } "
# tab creation
bind - n C-t new-window
# tab nav is the default p and n binds
2023-11-09 16:55:01 -06:00
# window and session switcher is the default w bind
2023-11-01 11:07:10 -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
set - g status on
set - g status-position bottom
set - g status-style " f g = c o l o u r 8 b g = d e f a u l t "
set - g status-interval 5
set - g status-left-length 50
set - g window-status-style " f g = c o l o u r 8 b g = d e f a u l t "
set - g window-status-format " # W "
set - g window-status-separator " "
set - g window-status-activity-style " f g = c o l o u r 7 b g = d e f a u l t "
set - g window-status-bell-style " f g = c o l o u r 1 b g = d e f a u l t "
set - g window-status-current-style " f g = c o l o u r 4 b g = d e f a u l t "
set - g window-status-current-format " # W "
set - g status-left " # { c l i e n t _ u s e r } @ # h : # S "
set - g status-right " # ( k u b e l i n e & & p r i n t f ' ' ) "
set - g status-left-length 1000
set - g message-style " f g = c o l o u r 7 b g = d e f a u l t "
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 \;\
# save-buffer /tmp/tmux-buffer \;\
# split-window -l 10 "urlscan /tmp/tmux-buffer"
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 ! '
bind K kill-pane
bind C-S-k kill-window
# Activate OFF mode
bind - n M-o \
set prefix None \ ; \
set key-table off \ ; \
set - ag status-right " O F F "
# Disable OFF mode
bind - T off M-O \
set - u prefix \ ; \
set - u key-table \ ; \
2023-11-01 11:07:55 -05:00
source-file " $ H O M E / . c o n f i g / t m u x / t m u x . c o n f "
2023-11-01 11:07:10 -05: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'
2023-11-10 15:07:01 -06:00
# 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 senpai broot nnn iex mix'
2023-11-01 11:07:10 -05:00
# 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'
'' ;
} ;
2023-11-03 16:56:45 -05:00
home . shellAliases = {
t = " t m u x " ;
} ;
2023-11-01 11:07:10 -05:00
}