ckardaris / ucollage

An extensible command line image viewer inspired by vim
GNU General Public License v3.0
210 stars 3 forks source link

Expand directory 'yes' for all #16

Closed 766F6964 closed 2 years ago

766F6964 commented 3 years ago

When ucollage is started in a directory with multiple sub-directories, the user is asked if he wants ucollage to expand them, to look for images in them. Currently it is possible to state:

I feel like a Y option is missing. Basically, yes for all sub-directories.

ckardaris commented 3 years ago

This makes sense. I will make the necessary modifications.

In any case, though, if you find yourself pressing Y or N a lot, a better option would be to set the UCOLLAGE_EXPAND_DIRS to 1 or 0 respectively.

766F6964 commented 3 years ago

This makes sense. I will make the necessary modifications.

In any case, though, if you find yourself pressing Y or N a lot, a better option would be to set the UCOLLAGE_EXPAND_DIRS to 1 or 0 respectively.

That is true, but I would not want this to be a global option, but rather something that can be decided on a per-directory basis. Sometimes I might want ucollage to search recursively, and sometimes not. I wouldn't want to always have to set/unset UCOLLAGE_EXPAND_DIRS when I change my mind, but rather quickly decide on startup with Y/N etc ..

ckardaris commented 3 years ago

Fair enough. Another issue is that ucollage does not expand the directory recursively. Instead it only expands the first level, if y is pressed. I should probably look to make that better.

766F6964 commented 2 years ago

Any updates on this?

ckardaris commented 2 years ago

Any updates on this?

Hey, I pushed some changes. I hope it is okay now

766F6964 commented 2 years ago

@ckardaris Definitely an improvement. However, I did notice some weird behavior, not sure if that is intended or not:

It doesn't seem that ucollage recursively looks through all sub-directories of the current directory. If the current directory Pictures has two sub-directories Wallpapers and Screenshots, running ucollage with Y in the Pictures directory works as expected, - it shows the images from both directories.

However, running the same command from the home directory, which contains the Pictures directory, those images are not listed anymore. My guess is, that is because ucollage doesn't truly use recursion to check all sub-directories, - or stops at a certain depth?

ckardaris commented 2 years ago

Yeah I thought a bit about recursive expansion. It needs some more thinking, so I will probably include it in a future release.

The reason I have not yet implemented it, is because I have in the back of my mind another idea. That is to create something like vim buffers. One for every directory the the user specifies. So files from different directories would never be seen together, but they would be accesible in a fast way from within the ucollage UI. What are your thoughts regarding that? Would it be something that you would use? Would you prefer it from having all images in a single view?