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

Searching for file with specific syntax in the middle #297

Closed
tamarw opened this issue Jun 6, 2018 · 9 comments
Closed

Searching for file with specific syntax in the middle #297

tamarw opened this issue Jun 6, 2018 · 9 comments

Comments

@tamarw
Copy link

tamarw commented Jun 6, 2018

I'm a former Launchy user. One of the features I loved about Launchy was that if I set up a specific search dir and searched for the file extension (e.g. .xlsx), it gave me exactly what I was looking for.

Keypirinha does this too, which is great. However, what differentiates Keypirinha from Launchy is that if the file name is, for example, report_2018.xlsx, if I type in 2018 on Launchy, that report_2018.xlsx file will come up.

On the other hand, Keypirinha doesn't do that. If I search for 2018, some files with 2018 on the Desktop show up instead.

Basically, I want to prioritize the file I've been accessing most the way Launchy does. I don't like how it defaults to the Desktop files that I've never even opened. Is that a possibility in its current form, or is that a feature request?

(And yes, I'm also a longtime Everything user.)

@polyvertex
Copy link
Member

Hard to give any precise answer without any information about your settings. KP will not give priority to a certain type of file, nor to any particular storage location when matching indexed file items during the search process. This sounds like a config issue.

If you want your whole storage space being accessible via KP, then the Everything package is what you seek for. Keep in mind it requires the Everything application to be running only the first time you search for a specific file. Once it's in KP's history you'll be able to search for it and launch it the next time without Everything.

If you want only fine-grained indexing of some chosen folders and/or specific files (which also allows to reduce memory usage for example) without having to rely on Everything, go for the FilesCatalog package.

@tamarw
Copy link
Author

tamarw commented Jun 6, 2018

My settings are very basic. In FilesCatalog, I added another directory:

[profile/DocumentedDefaults]
activate = yes
paths = C::\path\tol*.xlsx

That's all I have. Should I be switching to Everything instead of FilesCatalog for the config?

More specifically: what should I do in my configuration to prioritize the most-accessed file, so that when I type something like 2018, it loads report_2018.xlsx?

Again, I have Everything so I can definitely switch my configuration over to accommodate that instead. I'm just not sure what's the best config for this, of if this feature-set is missing to emphasize the file I accessed the most AND consider the fact that I'm typing words that are in the end of the file, not in the beginning.

Suggestions welcome. Thanks!

@polyvertex
Copy link
Member

You should switch to Everything only if the files you want to launch often are spread out over multiple folders and you do not wish to manually register them with FilesCatalog. However FilesCatalog remains the preferred way for most use cases. It appears to be so in your case as well.

It is recommended not to (re)use the [profile/DocumentedDefaults] section in your config file. You may rename it to anything arbitrary, say [profile/MyFiles].

KP will push up the files you launch the most in the result list. Also, you may find the implicit feature that Associates a Keyword to an Item useful in your case.

If, for some reason, you're still bothered by the files found in the Desktop folder(s), you can tell the Apps package to stop scanning it. The same goes for the StartMenu if necessary:

[main]
scan_desktop = no
# uncomment the line below to stop scanning the StartMenu
# scan_start_menu = no

@tamarw
Copy link
Author

tamarw commented Jun 7, 2018

Thanks. I don't necessarily not want to scan the desktop. However, when implementing the above in the Apps package, I saw my file in the #10 result and now that I accessed it, it's in the #1 result for "2018" so I guess it finally hit it. For some reason, though, the scan_desktop command wasn't completely being heeded to when I tried to use it.

Let me explain: I have two files with 2018 in the filename, one that's named "filename Slack export 2018.zip" in position #1 and one named "something_goes_here feb 1 2018.pdf" in position 2. Position 3 had a Chrome bookmark, "Specials :: 2018 :: Spring sale." Position #4 had a file named "2018 camp filename.pdf." #5 and onward through #10 were calculator queries (hex, binary, integer, etc.). Thus, my file never showed up.

However, when I implemented the code of scan_desktop = no, above, it still scanned the desktop but displayed only one file (not all 3), that of the "filename Slack export 2018.zip," followed by the Chrome bookmark, and then followed by the calculator commands. Finally, in the #10 position, I saw the file I continually accessed and wanted in the #1 position. I opened that and it prioritized that from then on. I then removed the scan_desktop option as I didn't need it anymore. Now, the file I need is #1 but everything's been pushed down.

Is this expected behavior? Does scan_desktop not fully scan the desktop in the literal sense? It still did, but only listed one file instead of the 3 that included 2018 in the filename on the desktop.

This works for me since I now have what I've wanted to access in the #1 position, but I'm just double checking that this isn't a bug.

@polyvertex
Copy link
Member

My guess is that your desktop file(s) poped up in KP because they were already in KP's history before you disabled the scan_desktop option.

@tamarw
Copy link
Author

tamarw commented Jun 7, 2018

Indeed they were. What was interesting, though, was that one Desktop item still showed up, even though scan_desktop was disabled. Is that intended behavior?

@polyvertex
Copy link
Member

Yes, if you already launched that file.

@tamarw
Copy link
Author

tamarw commented Jun 7, 2018

Good point, I must've (and forgotten).

It's a silly workaround to disable desktop scanning first but I guess it satisfies what I'm looking for. Thanks :)

@polyvertex
Copy link
Member

There is no (silly) workaround to a non-existing issue, only unread documentation :)

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

No branches or pull requests

2 participants