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

Additional action: Enter search result into currently open file chooser #571

Open
porridgewithraisins opened this issue Oct 4, 2024 · 1 comment

Comments

@porridgewithraisins
Copy link
Sponsor Contributor

porridgewithraisins commented Oct 4, 2024

Is your feature request related to a problem? Please describe.
This feature exists in windows for most search tools (e.g fluent search). Basically, I want to use the advanced search features in fsearch, and then have it enter it into the last opened file chooser dialog.

Usecase: using nice search when attaching files to send someone, in a nice keyboard workflow.

Describe the solution you'd like
You can do this with an equivalent/better version of the script below. Currently I do it by

  • having fsearch copy the text to clipboard
  • running this script that reads from the clipboard and passes it to the below script that enters it in the open file dialog as follows:
    xdotool windowactivate --sync $(xdotool search --role GtkFileChooserDialog | tail -1) sleep 0.3 key ctrl+l type --clearmodifiers -delay 0 $@ && xdotool key Return

I would like this integrated into fsearch! If it is possible at all to do it without the hackery shown above.

Describe alternatives you've considered
See above

Additional context
NA

@cboxdoerfer
Copy link
Owner

Hi,

I'm not aware of a platform agnostic way of doing that, or if it's even possible at all on GNOME/KDE Wayland.

To me this sounds like a good candidate for a user defined custom action, but they haven't been implemented yet.

The basic idea is give users the option to add custom actions, which you can assign a unique name, a command to execute (with special fields to insert the file name, path, size, etc.), an optional keyboard shortcut and menu entry. This way you could trigger the script right from within FSearch with a shortcut and without first having to copy the path or whatever.

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

No branches or pull requests

2 participants