update tmux & nvim status lines

fixes #14
This commit is contained in:
Alexander Navarro 2024-12-23 09:30:20 -03:00
parent c36ae93078
commit 1907cbfdf0
2 changed files with 109 additions and 129 deletions

View file

@ -15,7 +15,6 @@ bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"
set -sg escape-time 0
set-option -g focus-events on
set-option -g renumber-windows on
set -g detach-on-destroy off # don't exit from tmux when closing a session
# Yazi need this config to show image preview
set -g allow-passthrough on
@ -63,8 +62,6 @@ bind n new-window -c "#{pane_current_path}"
bind h previous-window
bind l next-window
# set -g status-right '#(bartib current | sed -n 3p | awk \'{print $NF}\')'
# ╭──────────────────────────────────────────────────────────╮
# │ Plugins │
# ╰──────────────────────────────────────────────────────────╯
@ -83,6 +80,7 @@ set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-copycat'`
set -g @plugin 'laktak/extrakto'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'soyuka/tmux-current-pane-hostname'
# ╭──────────────────────────────────────────────────────────╮
# │ Session Management │
@ -101,30 +99,79 @@ set -g @resurrect-processes 'vi vim nvim man "~pnpm dev->pnpm dev *"'
set -g @plugin 'catppuccin/tmux'
set -g @catppuccin_flavor 'macchiato'
set -g @catppuccin_status_default "on"
set -g @catppuccin_status_background "default"
# set -g @catppuccin_status_default "on"
# set -g @catppuccin_status_background "default"
#
# set -g @catppuccin_window_right_separator "█ "
# set -g @catppuccin_window_number_position "right"
# set -g @catppuccin_window_middle_separator " | "
# set -g @catppuccin_window_flags "no"
#
# set -g @catppuccin_window_default_fill "none"
# set -g @catppuccin_window_current_fill "all"
#
# set -g @catppuccin_window_default_text "#{?window_zoomed_flag, ,}#W"
# set -g @catppuccin_window_current_text "#{?window_zoomed_flag, ,}#W"
# set -g @catppuccin_window_current_text_color "#{thm_blue}" # text color
#
# set -g @catppuccin_status_modules_right "directory session"
# set -g @catppuccin_status_left_separator ""
# set -g @catppuccin_status_right_separator ""
# set -g @catppuccin_status_fill "all"
# set -g @catppuccin_status_connect_separator "yes"
#
# set -g @catppuccin_session_color "#{thm_red}"
# set -g @catppuccin_directory_color "#{thm_magenta}"
# set -g @catppuccin_directory_text "#{pane_current_path}"
set -g @catppuccin_window_right_separator "█ "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_middle_separator " | "
set -g @catppuccin_window_status "no"
# new
set -g @catppuccin_window_default_fill "none"
set -g @catppuccin_window_current_fill "all"
set -g @catppuccin_status_background "none"
set -g @catppuccin_window_status_style "none"
set -g @catppuccin_pane_status_enabled "off"
set -g @catppuccin_pane_border_status "off"
set -g @catppuccin_window_default_text "#{?window_zoomed_flag, ,}#W"
set -g @catppuccin_window_current_text "#{?window_zoomed_flag, ,}#W"
set -g @catppuccin_window_current_color "#{thm_blue}" # text color
# status left look and feel
set -g status-left-length 100
set -g status-left ""
set -ga status-left "#{?client_prefix,#{#[bg=#{@thm_teal},fg=#{@thm_bg},bold]  #S },#{#[bg=#{@thm_bg},fg=#{@thm_teal}]  #S }}" # session
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]│"
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_blue}]  #{=/-32/...:#{s|$USER|~|:#{b:pane_current_path}}} " # path
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]│"
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_maroon}]  #{pane_current_command} "
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]#{?window_zoomed_flag,│,}"
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_flamingo}]#{?window_zoomed_flag,  zoom ,}"
set -g @catppuccin_status_modules_right "directory session"
set -g @catppuccin_status_left_separator ""
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_fill "all"
set -g @catppuccin_status_connect_separator "yes"
# status right look and feel
set -g status-right-length 100
set -g status-right ""
set -ga status-right "#{?#{pane_ssh_connected},#{#[bg=#{@thm_mauve},fg=#{@thm_bg},bold]  #U@#H },#{#[bg=#{@thm_bg},fg=#{@thm_text}]  #U@#H }}" # SSH connection
set -g @catppuccin_session_color "#{thm_red}"
set -g @catppuccin_directory_color "#{thm_magenta}"
set -g @catppuccin_directory_text "#{pane_current_path}"
# Configure Tmux
set -g status-position top
set -g status-style "bg=#{@thm_bg}"
set -g status-justify "absolute-centre"
# pane border look and feel
setw -g pane-border-status top
setw -g pane-border-format ""
setw -g pane-active-border-style "bg=#{@thm_bg},fg=#{@thm_overlay_0}"
setw -g pane-border-style "bg=#{@thm_bg},fg=#{@thm_surface_0}"
setw -g pane-border-lines single
# window look and feel
set -wg automatic-rename on
set -g automatic-rename-format "Window"
set -g window-status-format " #I#{?#{!=:#{window_name},Window},: #W,} "
set -g window-status-style "bg=#{@thm_bg},fg=#{@thm_mauve}"
set -g window-status-last-style "bg=#{@thm_bg},fg=#{@thm_mauve}"
set -g window-status-activity-style "bg=#{@thm_red},fg=#{@thm_bg}"
set -g window-status-bell-style "bg=#{@thm_red},fg=#{@thm_bg},bold"
set -gF window-status-separator "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}]│"
set -g window-status-current-format " #I#{?#{!=:#{window_name},Window},: #W,} "
set -g window-status-current-style "bg=#{@thm_mauve},fg=#{@thm_bg},bold"
# ╭──────────────────────────────────────────────────────────╮
# │ Scratch FLating Pane │
@ -193,13 +240,3 @@ bind-key "f" run-shell "~/Repos/Private/dots/scripts/fzf-tmux-sessions"
bind-key "F" run-shell -b "$HOME/.config/tmux/plugins/tmux-fzf/scripts/session.sh switch"
# bind-key "F" run-shell -b "$HOME/.config/tmux/plugins/tmux-fzf/scripts/window.sh switch"
# ╭──────────────────────────────────────────────────────────╮
# │ Select stuff on screen │
# ╰──────────────────────────────────────────────────────────╯
set -g @plugin 'fcsonline/tmux-thumbs'
set -g @thumbs-key g
set -g @thumbs-contrast 1
run-shell ~/.config/tmux/plugins/tmux-thumbs/tmux-thumbs.tmux