Jump to content

Code Dispatcher - Streamline Your Project Navigation


Recommended Posts

I'm excited to introduce Code Dispatcher, a new workflow for Alfred that simplifies how you search for and open project folders. Designed for developers, this workflow allows you to quickly access your projects in your preferred code editor, Finder, or web browser with just a few keystrokes.
 

Features:

  • Fast Searching: Easily search for project folders within a specified directory (default: ~/Sites).
  • Direct Access: Open project folders in your preferred code editor (default: Visual Studio Code) with a simple press of Enter.
  • Finder Integration: Reveal project folders in Finder using Cmd + Enter.
  • Browser Launching: Open project URLs in your browser with a customizable TLD (default: .test) by holding Option and pressing Enter.

 

Customization: Users can configure their preferred code editor, project directory, and custom TLD through the workflow settings.

 

License: This project is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

 

You can download the latest version from the GitHub Releases page.

 

I welcome feedback and suggestions to improve the workflow further!

Link to comment
  • vitor changed the title to Code Dispatcher - Streamline Your Project Navigation

Thank you for sharing. Some tips:

 

You should always prefer with input as argv over with input as {query}.

 

This section is unnecessary:

 

directory="${directory:-~/Sites}"
directory=$(eval echo "$directory")

 

You already set a default directory in the configuration, so the :-~/Sites is redundant and will never happen. And Alfred expands the tilde before passing that variable to the script, making it so the second liver never does anything.


Finally, the #!/bin/bash doesn’t do anything (but isn’t harmful either, it’s just being ignored) because you already picked an interpreter. It’s like running /bin/bash /some/script/path/here in a Terminal.

Link to comment
4 minutes ago, vitor said:

Thank you for sharing. Some tips:

 

You should always prefer with input as argv over with input as {query}.

 

This section is unnecessary:

 

directory="${directory:-~/Sites}"
directory=$(eval echo "$directory")

 

You already set a default directory in the configuration, so the :-~/Sites is redundant and will never happen. And Alfred expands the tilde before passing that variable to the script, making it so the second liver never does anything.


Finally, the #!/bin/bash doesn’t do anything (but isn’t harmful either, it’s just being ignored) because you already picked an interpreter. It’s like running /bin/bash /some/script/path/here in a Terminal.


Thanks! I will make some tweaks based on your recommendations!

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