albert icon indicating copy to clipboard operation
albert copied to clipboard

[files] max depth and per-folder

Open schoettl opened this issue 8 years ago • 12 comments

Hey Manuel, I love Albert so far! Great work!

I have two suggestions, the first one might be easier:

  1. A option to define the maximum scan depth in the Files plugin I'd love this feature because this way I could quickly access all my important top-level folders in my home directory.
  2. All the nice indexing settings but per folder/item. This way I could e.g. index my top-level folders (as in 1.) + the content of the ~/projects folder.

This dialog is from Launchy, a launcher for Windows. I was pretty happy with that settings. Launchy file indexing

schoettl avatar Apr 01 '16 22:04 schoettl

It would be awesome if this feature was implemented. Without this, adding a directory (Ex: Workspace) adds a huge lot of files (ex: node_modules, eclipse settings etc) to index and makes it difficult to find the exact directory I am looking for.

nikhilw avatar Jan 23 '17 09:01 nikhilw

Do you really need depth? Assuming there will be an option "Scan recursive" I dont see a mainstream usecase for depth. Indexing settings but per folder/item is planned.

ManuelSchneid3r avatar Jan 23 '17 10:01 ManuelSchneid3r

A "scan recursive" checkbox would be a good alternative to a "depth" parameter.

Now that I think about it, it might be even better because it can be fine-tuned better.

My use-case:

  • I want all top-level folder in ~ indexed
  • I want all direct subfolders indexed, but only those of certain folders in ~

Indexing automatically created folders of IDEs or other application software does not much make sense for me. For example, I have folders like Android, Arduino, Calibre-Bibliothek, Downloads, perl5, R, and I don't want their subfolders to be indexed. So I probably would not use the depth parameter.

schoettl avatar Jan 23 '17 10:01 schoettl

I agree, even I need mostly the immediate sub-directories indexed and an option to disable recursive scan can suffice for that.

nikhilw avatar Jan 23 '17 12:01 nikhilw

In v0.12.0 you can workaournd this by setting /*/*/*/* with the desired depth in your ignore file.

Note for future readers there is the ** glob pattern for arbitrary depth.

ManuelSchneid3r avatar Jun 09 '17 19:06 ManuelSchneid3r

This is great! Solves the primary problem. I wish, though, that it was possible from within albert UI itself. This is feels like a leak in encapsulation, we now have to place .albertignore files around on the filesystem. I agree that there would not be many files, even I needed only 1 per data partition I have, but one can always wish! :) Thanks guys for all your efforts.

nikhilw avatar Jun 17 '17 07:06 nikhilw

FWIW, I would really like to see:

  • the ability to set indexing options on each path
  • a recursive flag on each path or ability to set depth (my preference)

Do you really need depth? Assuming there will be an option "Scan recursive" I dont see a mainstream usecase for depth.

My use case for this is as follows: I have a ~/shortcuts folder that I symlink frequently used folders to. I would like to set a depth setting on this of approx. 3. That would index all my frequently used folders as well as the next two layers in each folder. That would probably get me 95% of the files I use on a monthly basis easily indexed in Albert. But, to go further than this in all those folders doesn't make sense as it's a lot of extra clutter. Also, to setup all those paths by hand, I'd probably have

This is the biggest sore point for me so far with using Albert. I just can't get the files/folders I want in the launcher without adding a bunch of extra cruft.

rsyring avatar Jun 23 '18 23:06 rsyring

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 05 '20 03:11 stale[bot]

Thanks for keeping this open. I continue to use .albertignore to work around not having more flexible settings. But, my comment from 2018 would still be a better solution IMO.

rsyring avatar Dec 06 '20 01:12 rsyring

For what it's worth, I wrote my own file indexing extension specifically because of this issue (maybe something else too, I don't remember anymore). The configuration I ended up choosing was using glob patterns as paths to index, so you could do e.g.

"paths": [
  "/home/osmo/Documents/*",
  "/home/osmo/Documents/*/*",
  "/home/osmo/Documents/*/*/*",
],

And the indexing code would just loop over the glob.iglob results of those. **is supported too for full recursive. I found this good enough for the issue.

https://github.com/otsaloma/albert-filex

otsaloma avatar Dec 06 '20 02:12 otsaloma

On the same topic, is there a mechanism to exclude some paths ?

Example :I want to indx my whole home dir except for src subdir.

Maybe it's possible already ?

squalou avatar Feb 12 '21 09:02 squalou

On the same topic, is there a mechanism to exclude some paths ?

Example :I want to indx my whole home dir except for src subdir.

Maybe it's possible already ?

Google albertignore

ManuelSchneid3r avatar Feb 13 '21 08:02 ManuelSchneid3r