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

Use it as a finder / search for files #41

Open
tgy opened this issue May 6, 2021 · 6 comments
Open

Use it as a finder / search for files #41

tgy opened this issue May 6, 2021 · 6 comments

Comments

@tgy
Copy link

tgy commented May 6, 2021

Is it possible to configure sway-laucher-desktop to also search for files (fuzzy finding with fzf) and open them with xdg-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?

@Biont
Copy link
Owner

Biont commented May 6, 2021

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

@tgy
Copy link
Author

tgy commented May 6, 2021

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.

@Biont
Copy link
Owner

Biont commented May 6, 2021

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).

@mathroc
Copy link

mathroc commented Oct 13, 2021

@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)

@Biont
Copy link
Owner

Biont commented Oct 14, 2021

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!

@Biont
Copy link
Owner

Biont commented Oct 14, 2021

I just added a section in the README: 0161843

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

No branches or pull requests

3 participants