tofi icon indicating copy to clipboard operation
tofi copied to clipboard

Q: How do I get information from tofi?

Open Ahwxorg opened this issue 1 year ago • 3 comments

I am building a script and would like to ask the user for something, that I can process in the backend. Something like msg="$(tofi --prompt-text 'Enter commit message for version control' --fuzzy-match true)" to let me then use $msg for something else in the script. Is this possible with tofi?

Ahwxorg avatar May 19 '24 12:05 Ahwxorg

It would be even more ideal if I can do something like rofi drun mode, show all outputs from something like this: find "$HOME/Notes" -follow | grep -E '.md$' | tofi, then, when I enter something into tofi that doesn't exist, still return that, otherwise fuzzy-find close to what I am tying.

Just making this issue because someone might be able to help :)

Ahwxorg avatar May 19 '24 13:05 Ahwxorg

maybe use --require-match, setting it to false will print whatever was in the input field to stdout

roadbloack avatar Sep 08 '24 11:09 roadbloack

I'll try that, thanks!

Ahwxorg avatar Sep 08 '24 14:09 Ahwxorg