Jump to content

Yet another installed workflow search, written in swift


Recommended Posts

Posted (edited)

A workflow that allows you to search for your installed workflows, by their name, all kinds of keywords and hotkeys.

 

It’s written in swift, therefore super fast and doesn’t rely on cache.

 

It also comes with a command line tool `altr` to run any Alfred external trigger in terminal. In addition to Alfred’s AppleScript implementation, it also supports passing variables into the trigger.

 

P.S. I’ve been developing Alfred workflows for quite a while, but mostly for my own, custom needs. This is the first workflow I’m making public. Feel free to try it out and let me know how it works for you! ;)

 

Source

Edited by saor47
  • saor47 changed the title to Yet another installed workflow search, written in swift
Posted

Fun! It means we’ll have at least two of them in Swift (I also made one I’ve been using locally for some months but haven’t shared yet). It’s interesting to see different approaches and priorities. But yes, the GitHub link is a 404. Maybe the repo is private and you forgot to make it public to share?

Posted (edited)

Neat! There are a few minor problems with your initial release:

  • You forgot to remove your compiled versions of Workflow.swiftaltr, and Notifier the from the workflow
  • You are not referencing the environment variable keyword in your script filter (should be: {var:keyword})
  • You probably want to remove the 6MB preview gif as it is not even animated in the configuration preview 😄

 

One thing that is important to me is being able to quickly inspect a workflow's cache and data folders.

If you're interested in adding this use case and want some inspiration, you could take a look at the approach I took to add this to Acidham's workflow: #15

Edited by zeitlings
Posted
47 minutes ago, zeitlings said:

There are a few minor problems with your initial release

 

Fixed them. Thanks a lot!

 

47 minutes ago, zeitlings said:

quickly inspect a workflow's cache and data folders

 

Those two can be accessed with `fn-enter` and `ctrl-enter`. 

  • 4 weeks later...
  • 4 weeks later...
Posted

[07:57:48.760] Alfred Workflow Search[Script Filter] Queuing argument ''
[07:57:49.258] Alfred Workflow Search[Script Filter] Script with argv '' finished
[07:57:49.265] ERROR: Alfred Workflow Search[Script Filter] Code 127: src/Workflows.swift:263:4: error: argument 'arg' must precede argument 'subtitle'
                        arg: self.wfDir,
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/Users/newadmin/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/C0F9ABE9-6A3D-4661-945E-8A01D0631C76:2: no such file or directory: ./Workflows
[07:57:50.484] Alfred Workflow Search[Keyword] Processing complete
[07:57:50.486] Alfred Workflow Search[Keyword] Passing output '' to Run Script
[07:57:52.509] Alfred Workflow Search[Run Script] Processing complete
[07:57:52.516] Alfred Workflow Search[Run Script] Passing output '~/Alfred.alfredpreferences/workflows/user.workflow.ACBE41F7-269D-402A-BEB4-FC08B1A680CD/altr
altr already installed!' to Post Notification
[08:33:16.666] Alfred Workflow Search[Keyword] Processing complete
[08:33:16.668] Alfred Workflow Search[Keyword] Passing output '' to Run Script
[08:33:16.676] Alfred Workflow Search[Run Script] Processing complete
[08:33:16.677] Alfred Workflow Search[Run Script] Passing output '~/Alfred.alfredpreferences/workflows/user.workflow.ACBE41F7-269D-402A-BEB4-FC08B1A680CD/altr
altr already installed!' to Post Notification
[08:33:24.903] Alfred Workflow Search[Script Filter] Queuing argument ''
[08:33:25.618] Alfred Workflow Search[Script Filter] Script with argv '' finished
[08:33:25.621] ERROR: Alfred Workflow Search[Script Filter] Code 127: src/Workflows.swift:263:4: error: argument 'arg' must precede argument 'subtitle'
                        arg: self.wfDir,
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/Users/newadmin/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/8764353F-3EA0-4BF5-BF7A-9BDACF233DB3:2: no such file or directory: ./Workflows  -- getting this error 

 

Posted (edited)

|altr command is running and giving Passing output '~/Alfred.alfredpreferences/workflows/user.workflow.ACBE41F7-269D-402A-BEB4-FC08B1A680CD/altr
altr already installed!' to Post Notification

 

But in terminal which altr gives "not found"

 

Tried install altr from brew but it is not readily available.

 

update: 

which altr is now giving 

/usr/local/bin/altr

 

Altr run is giving:

 

altr -w Alfred My Mind

Run Alfred trigger with argument and variables.

Usage: altr -w WORKFLOW -t TRIGGER [-a ARGUMENT] [-v KEY1=VALUE1] [-v KEY2=VALUE2] ...

 

w/ is still failing with error posted in earlier post. Pls help to troubleshoot this. @saor47

Edited by TomBenz
Posted
58 minutes ago, TomBenz said:

Altr run is giving:

 

altr -w Alfred My Mind

 

You need to provide the bundle id, not the name of a workflow.

Posted
4 hours ago, saor47 said:

@TomBenz Just fixed it. Thanks.

Please let me know if there's still any issue.

This is working good and give the list. Many thanks. 

 

Alfred standard ? also can search by keywords and works well. Can this workflow search by hotkeys? How to do it? Typing hotkey cmd + opt + G as text or hotkey after w/ is not working.

Posted (edited)
4 hours ago, TomBenz said:

Can this workflow search by hotkeys?

 

`⌥⌘ G` can be located through `[Hotkey] ⌥⌘ G`.

Pressing `Tab` on any hotkey item prompts `[Hotkey] ` into the search bar. It works the same for all types of triggers.

If you don't have the modifier characters (`⌥`, `⌘`) saved in snippets (like I do), just type the last letter (`g`) to search for a combination.

Edited by saor47
Posted
2 hours ago, saor47 said:

 

`⌥⌘ G` can be located through `[Hotkey] ⌥⌘ G`.

Pressing `Tab` on any hotkey item prompts `[Hotkey] ` into the search bar. It works the same for all types of triggers.

If you don't have the modifier characters (`⌥`, `⌘`) saved in snippets (like I do), just type the last letter (`g`) to search for a combination.

This is awesome. Many thanks

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