Open choucavalier opened 3 years ago
This should be possible with a custom provider, yes. There's a description of how it works in the Readme. The use of custom providers replaces the builtin ones though, so using a custom provide in addition to the builtin ones is currently not possible
Too bad they cannot be combined.
I think this would be a great addition to this launcher. Basically, it would be a use-case similar to what the Spotlight launcher does for macOS.
I often find myself wanting to access a specific document (like a PDF or an image) and would love to be able to quickly fuzzy find it with `sway-launcher-desktop'.
But loosing the ability to also launch applications is a big downside.
I totally agree and I've been thinking about this myself. Maybe we could add a flag that controls whether or not to include the builtins. Or add some way to refer to them in a provider config file (or: support this kind of flag in the file parser).
@Biont it's not too bad if we want to include the defaults providers, just add something like this in the config file:
[desktop]
list_cmd=/path/to/sway-launcher-desktop.sh list-entries
preview_cmd=/path/to/sway-launcher-desktop.sh describe-desktop "{1}"
launch_cmd=/path/to/sway-launcher-desktop.sh run-desktop '{1}' {2}
[command]
list_cmd=/path/to/sway-launcher-desktop.sh list-commands
preview_cmd=/path/to/sway-launcher-desktop.sh describe-command "{1}"
launch_cmd=alacritty -e {1}
however, it won't keep in sync if you want to change something, add another, etc. maybe it would be enough to check that the config file starts with the line !keep builtin providers
(or anything similar you deem appropriate)
Cool. I was thinking this would work, but I never actually tried. Good to know. I guess I should rather think about documenting thinks like this. Thanks!
I just added a section in the README: 01618435a543af7926f658f6f33f1e187c03bd55
Is it possible to configure
sway-laucher-desktop
to also search for files (fuzzy finding withfzf
) and open them withxdg-open
?In other words, is it possible to use it for searching not only binaries and desktop entries but also search files and open them?