Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion - Add Current Path Location to Tmux Status Bar with Optional Toggle #92

Open
edudebortoli opened this issue Jul 8, 2024 · 0 comments

Comments

@edudebortoli
Copy link

edudebortoli commented Jul 8, 2024

I currently use the current_path in the status bar on tmux.

I believe it would be a nice and simple implementation to add this as an option to the project, similar to the existing status_content feature.

image

Here is my customization. It essentially replaces the #W variable with #{b:pane_current_path} to display the current path.

set -g window-status-format "#[fg=black,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#I #[fg=white,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#{b:pane_current_path} #F #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]"
set -g window-status-current-format "#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#I #[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#{b:pane_current_path} #F #[fg=cyan,bg=black,nobold,noitalics,nounderscore]"

and something like it to the nord.tmux file ( + variables in the beggining of the file )

  if [ "$status_content" != "0" ]; then
    if [ "$status_content" = "1" ]; then
      if [ "$no_patched_font" != "1" ]; then
        tmux source-file "$_current_dir/$NORD_TMUX_STATUS_CONTENT_FILE"
      else
        tmux source-file "$_current_dir/$NORD_TMUX_STATUS_CONTENT_NO_PATCHED_FONT_FILE"
      fi
    elif [ "$status_content" = "2" ]
      if [ "$no_patched_font" != "1" ]; then
        tmux source-file "$_current_dir/$NORD_TMUX_CURRENT_PATH_FILE"
      else
        tmux source-file "$_current_dir/$NORD_TMUX_CURRENT_PATH_NO_PATCHED_FONT_FILE"
      fi
    fi
  fi

status_content = 1: Uses the existing status content files.
status_content = 2: Loads files that include the current path in the status bar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant