oliverschwendener / ueli

Cross-Platform Keystroke Launcher
https://ueli.app
MIT License
3.66k stars 242 forks source link

Add a "simple folder search" extension #1160

Closed sashaweiss closed 2 months ago

sashaweiss commented 3 months ago

Adds a "Simple Folder Search" extension, similar to the functionality in ueli V8. Takes a list of paths from a persisted Settings extension (defaults to ["$HOME"], although screenshots include ["$HOME", "/"] for variety), then searches them for directories and creates a SearchResultItem for each.

I use this feature non-stop in ueli V8, and since it was simple enough functionality I wanted to try reproducing it in V9. Please let me know what you think: is this is something you'd be interested taking? If so, please let me know if there are any stylistic or functional changes you'd like! (I tried to largely follow the conventions of existing extensions and settings, but I have very little experience with React so I'm fuzzy on its conventions.)

Screenshots

image image

Style option: use abbreviated path for item name, vs. file name

I prefer this aesthetically, and it disambiguates between directories with the same name if they exist under multiple paths. However, because search result items are sorted alphabetically this results in all the simple-folder-search results being grouped together at the top of the list.

image
sashaweiss commented 2 months ago

(Now with signed commits!)

oliverschwendener commented 2 months ago

Thanks for your efforts! I started working on a very similar extension that not only allows you to search for folders but also for files (or both). If you want you can take a look at it here: #1194

In short: you this extension you can define folders that you want to search for files/folders. Per folder you can define if you want to do a recursive scan or just the first level. Let me know what you think.

oliverschwendener commented 2 months ago

Closing this in favor of #1194

sashaweiss commented 1 month ago

Sounds good – thanks for the look @oliverschwendener.