Jump to content

xanimus

Member
  • Posts

    7
  • Joined

  • Last visited

Reputation Activity

  1. Like
    xanimus reacted to Alan He in Run command when Alfred activates/deactivates   
    It is best if the alfred can provide a hook to solve it, currently it is not supported.
  2. Like
    xanimus reacted to Andrew in Automations Tasks Suggestions   
    We have a really exciting roadmap for Automation Tasks during Alfred 5 and into the future, including improved organisation and searching tasks, so stay tuned  
  3. Like
    xanimus reacted to deanishe in Store Variables from Run Script Output   
    Hi Dino,
     
    This question belongs in the Workflow Help & Questions forum, where you will find the answer you seek stickied:
    If you have any further questions about workflow variables, please ask in that thread or forum.
  4. Like
    xanimus reacted to deanishe in Fuzzy search helper for Script Filters   
    Add fuzzy search to your Script Filters

    This is a simple script you can add to your Script Filters to replace "Alfred filters results" with a fuzzy search algorithm.
     
    https://github.com/deanishe/alfred-fuzzy
     
     
     
    How it works

    Instead of calling your script directly, you call it via fuzzy.py, which caches your script's output for the duration of the user session (as long as the user is using your workflow), and filters the titles of the items emitted by your script against the user's query using a fuzzy algorithm.

    Example usage

    fuzzy.py only works in Script Filters, and you should run it as a bash/zsh script (i.e. with Language = /bin/bash or Language = /bin/zsh).
    Instead of running your own script directly, place ./fuzzy.py in front of it.
    For example, if your Script Filter script looks like this:

    /usr/bin/python myscript.py
    You would replace it with:

    # export user query to `query` environment variable, so `fuzzy.py` can read it export query="$1" # or if you're using "with input as {query}" # export query="{query}" # call your original script via `fuzzy.py` ./fuzzy.py /usr/bin/python myscript.py

    Note: Don't forget to turn off "Alfred filters results"!  
    Caveats

    As the script is written in Python and uses a more complex matching algorithm, it can only handle a few thousands items at most before it becomes irritatingly sluggish (Alfred can handle many tens of thousands).

    If there's interest in the script, I will rewrite it in a compiled language. My Go library uses the same algorithm, and it can comfortably handle 20K+ items.
     

    You can grab a demo workflow from GitHub to see it in action.

    See the GitHub repo for more information.
     
  5. Thanks
    xanimus reacted to gingerbeardman in Alfred prefs minimum window width too wide for my display   
    That's a different issue, you'll have more luck with a diagnosis/answer if you start your own thread.
     
     
     
×
×
  • Create New...