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

Is resizing locked? #27

Open
pvonmoradi opened this issue Jan 17, 2021 · 4 comments
Open

Is resizing locked? #27

pvonmoradi opened this issue Jan 17, 2021 · 4 comments

Comments

@pvonmoradi
Copy link

Is it possible to resize the dragon window?
Currently, it prints the complete path of the file as entry. It makes it cumbersome to place the window around. Is it possible to somehow resize the window to line-wrap the entries (so window size is grown vertically not horizontally)?
Excellent project BTW 💯 😃
image

@mwh
Copy link
Owner

mwh commented Jan 19, 2021

Yes, the window is not resizable and just fits its contents exactly at their natural size. It doesn't handle extremely long file paths like this well. Word wrapping could be possible, or perhaps it should just truncate at a certain length; wrapping will fall over eventually too.

@mwh
Copy link
Owner

mwh commented Feb 4, 2021

On reflection, it's not really the fact that it's set non-resizable that's an issue here, it's that it still wouldn't resize below the buttons' natural size anyway - you could only make the window bigger, not smaller. That means there's not a quick fix without deciding what the right behaviour is, and it probably needs to be flagged behind an option because it will be a substantive difference.

Abbreviating to only the basename is the simplest for many cases, but not useful for this actual situation, but cutting off either end is not generally right either. I'm not sure what the right path is here. I don't think GTK provides a "trim the middle to fit" option.

@pvonmoradi
Copy link
Author

pvonmoradi commented Feb 4, 2021

@mwh Some editors like VScode or Vim airline plugin have an option to "shorten" the file path:
https://stackoverflow.com/a/13168317/1506761

...
I.e. "/home/user/foo/bar/baz.vim" becomes "~/f/b/baz.vim" and
           "long/relative/path/foo/bar/baz.vim becomes
           "long/r/p/f/b/baz.vim"

@savchenko
Copy link

Perhaps allowing to pass something like --trim-filename-to INT could be a reasonable simple solution? If present, will trim the filename to INT symbols from the end.

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

3 participants