yatima1460 / Drill

Search files without indexing, but fast crawling
https://drill.software/
GNU General Public License v2.0
268 stars 21 forks source link

Allow custom blacklisting and override #29

Open al2me6 opened 5 years ago

al2me6 commented 5 years ago

Is your feature request related to a problem? Please describe. Sometimes users have other "useless folders", in addition to common ones such as %WINDIR% or node_modules, that they may wish to exclude from most searches.

Describe the solution you'd like Implement a settings dialog or config file where the user can add folders to exclude from search. However, on the off chance that the user is indeed looking for a file in a "useless folder", add a toggle to override blacklists.

Describe alternatives you've considered Allow filtering of output after the search is complete (ex. sort by folder name, perhaps a secondary search bar, etc.).

yatima1460 commented 5 years ago

config file where the user can add folders to exclude from search

The AppImage is in a frozen state but if you use something like the .deb file the blacklists are in /opt/drill-search/

Do you think a simple menu dialog that opens the config files folder is enough?

yatima1460 commented 5 years ago

A power user would already know how to do it. The average user would not even care.

I believe a user in between would be enough knowledgeable and satisfied with just the config folders path opening in the file explorer 🤔

al2me6 commented 5 years ago

As a stopgap solution, I suppose that would work.

However, it is honestly inappropriate to have a user modify a shared system configuration file. A better solution would be to read from a file in $XDG_CONFIG_HOME, which overrides the default config file.

But yes, a button that opens the config file would indeed be sufficient.

yatima1460 commented 5 years ago

Two things:

  1. /opt is generally not considered a shared system folder I think, I mean even Chrome is installed there, I always thought of /opt as Program Files of Windows, is that correct?

  2. $XDG_CONFIG_HOME is empty on my Deepin distro, what that even means?

yatima1460 commented 5 years ago

Oh you mean that if I don't put the configs in /opt in this way every user can have his/her own settings?

al2me6 commented 5 years ago

According to the Unix filesystem hierarchy, /opt is intended for optional packages. Technically, your executable should be in /opt, while your default, systemwide config files are in /etc. Any user configurations should live in their home folder and override the default configs. $XDG_CONFIG_HOME is a standardized environmental variable containing the location for config files, normally it should point to ~/.config.

yatima1460 commented 5 years ago

A way to solve this is to add blacklisted files as low priority files instead of completely ignoring them, but I want to test performance first

And other than that a user that would already need custom blacklists would already know how to edit them

Also now if Drill can't find the blocklist it will scan everything