Skip to content

Conversation

@AstringentBeet
Copy link

@AstringentBeet AstringentBeet commented Jan 25, 2025

I'm a big fan of the cwd feature, but with the amount of directories and subdirectories I have, seeing the verbosity of my paths displayed by Dracula's cwd can be a bit annoying, especially when I have other plugins displayed within the powerline.

Turn this: '~'/very/long/and/verbose/path/to/users/CurrentDirectory

Into this: CurrentDirectory

To do so, simply enter the following within .tmux.conf:
set -g @dracula-cwd-basename true

If merged, I hope this provides some value to users working with this wonderful plugin.

@AstringentBeet AstringentBeet changed the title Shorten the cwd.sh plugin to just the basename Provide option to cwd that shortens the path to solely display the current directory Jan 25, 2025
@Theoreticallyhugo
Copy link
Collaborator

Hey @AstringentBeet, thats cool! with that in mind, i have another idea id like to propose. what if we rather add a setting of max-cwd-length. this way you could have the option to shorten the cwd to just the dir youre in, like you want, but you could also decide to give it a little more space.
This also creates the question of, do we limit the amount of subdirs shown, or the amount of total characters?
thank you very much for your contribution, and please let me know what you think of this :D

@ethancedwards8
Copy link
Member

Hey @AstringentBeet, thats cool! with that in mind, i have another idea id like to propose. what if we rather add a setting of max-cwd-length. this way you could have the option to shorten the cwd to just the dir youre in, like you want, but you could also decide to give it a little more space. This also creates the question of, do we limit the amount of subdirs shown, or the amount of total characters? thank you very much for your contribution, and please let me know what you think of this :D

Great idea to both of y'all. I think my preferred way would be subdir.

@Theoreticallyhugo
Copy link
Collaborator

hey @AstringentBeet,
i've attempted to implement a solution that would work for you whilst incorporating my suggestion and i would love to hear your feedback (and of course also yours ethan) :D

@ethancedwards8
Copy link
Member

Closing in favor of #326

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants