Jump to content

Creating workspace switcher workflow


Recommended Posts

Hi guys, I'm trying to create my own workflow that will let me switch project workspace setup quickly (I have multiple active projects).

 

These are what I want the workflow doing :

1. When I type ws then alfred will display available options, for example :

- Project A
- Project B
- Project C

2. if I choose Project A and press enter, it should :
3. Quit all opened apps except Mail app, Forklift and Notes if I choose Project A, quit all opened apps except Mail app and Forklift if I choose Project B  and so on.

2. Reveal folder Documents/Project A with Forklift

3. Open url http://localhost/Project A with chrome browser

4. Open folder Project A with Visual Studio Code

5. Open Fork app for git commit 

 

My questions are 

1. I use keyword input to create ws keyword. But how can I create options Project A, Project B and Project C that will be used as variable in the next actions?

2. I know I can I quit all opened apps with exception using this workflow but how can I call this workflow inside my workflow with and use the chosen options variable (Project A, Project B )? 

 

Thanks and sorry for my noob question. 

Edited by andy
Link to comment
15 hours ago, andy said:

1. I use keyword input to create ws keyword. But how can I create options Project A, Project B and Project C that will be used as variable in the next actions?

 

What you want is a List Filter Input connected to a Conditional Utility that will act depending on the Arg.

 

If you want variables to propagate through, look at the Argument and Variables Utility.

 

15 hours ago, andy said:

2. I know I can I quit all opened apps with exception using this workflow but how can I call this workflow inside my workflow with and use the chosen options variable (Project A, Project B )? 

 

You couldn’t easily and without relying to some trickery, but I’ve just updated the Workflow to make it easier for you by adding External Triggers.


How to call them is up to you. A simple way would be to have an Argument and Variables Utility with the apps as the Argument connected to a Call External Trigger Output.

Link to comment

I'm able to connect the 'Conditional utility' to 'Reveal in Finder' then connect to 'Call External'.

What I want to do with 'Call External' is, I want to close all apps including Visual StudioCode (so the current opened folder by Visual Code is closed), but in the next action I need to open Visual Studio Code again and opening the new folder.

If I place 'Quit Apps' in the last order, then Visual Studio Code will be opened in the early steps, and then later will be closed by Quit Apps'.

ggg.jpg

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