Jump to content

Plain Text Notes


Recommended Posts

Hi, I'm trying to build a simple plain text notes workflow that basically clones nvalt.

 

What I've got so far is very good at searching my notes: I have a file-filter fulltext-searching my notes directory, and I can open notes in emacs or byword or marked depending on how heavy-duty my viewing/editing is going to be.

 

Creating new notes isn't as good. Ideally, I'd like to "inject" an additional item into the file filter when it doesn't find a match for my query, which takes the query string and creates a new note in my chosen directory and then opening it for editing. I can see three ways to do this, two of which I know how to do:

 

  1. Replace the file filter with a script filter that runs mdfind and offers the "create" action if it doesn't have any results.
  2. Add a "fallback search" that creates the new note based on the current query
  3. Somehow append to the "file filter" items in alfred's workflow "language". I don't know how to do this.

 

Anyway currently I've done (2), because (1) seems like too much work. But the fallback search isn't ideal, because it shows up everywhere, not just when I'm invoking my notes workflow, and the "fallback" options clutter the notes workflow. Is there any way to do what I want without going full script filter?

 

Obviously, I could also just write a separate workflow to create a note and modify the text of my query to run this instead once I see that there's no results, but I want something more fluid.

 

Relatedly is there a way to pack more results than 9 on-screen for certain workflows? I could use more information density in this workflow.

Link to comment
4 hours ago, Marco_hash said:

But the fallback search isn't ideal, because it shows up everywhere, not just when I'm invoking my notes workflow, and the "fallback" options clutter the notes workflow. Is there any way to do what I want without going full script filter?

 

Nope. Solution (1) is the proper way to do it. In addition, you'll have to do the filtering yourself in code because Alfred doesn't pass your script a query if "Alfred filters results" is selected.

 

4 hours ago, Marco_hash said:

Relatedly is there a way to pack more results than 9 on-screen for certain workflows?

 

Again, nope. Nine visible results is your lot, I'm afraid. Alfred shows more results in File Browse mode, but that's no good to you because, as with a File Filter, you can't inject your own additional results.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...