OPEN TO WORK

Available for new opportunities! Let's build something amazing together.

#DevHack: Using Raycast to speed up my productivity

Application Productivity Raycast
post

This post is over a year old, some of this information may be out of date.

It does not happen often I write an article about a tool, but this time, I felt this tool deserved some extra attention.

Raycast is a tool that you can compare to Spotlight from macOS and Alfred, and yes, it is macOS only.

Many people use Alfred, and I have been using Alfred since I had my first Macbook. The biggest advantage of these applications is that you can quickly search your apps or execute tasks. What differentiates Raycast is that it is free, and it is straightforward to add custom scripts. You can write these scripts in bash, python, nodejs, and more.

How I got interested

It all started with an order on Pimp Your Own Device. There was a bug in the search React I wrote for the site. Luckily, the person who wanted to place an order was so nice to send us a message.

We talked a bit, and I saw she was working at Raycast, so I asked what it was. That is how it got me interested in testing out the product. I removed Alfred and installed Raycast instead.

How can it help you

Apart from searching your applications, the most significant productivity boost it will give you is the custom scripts you can add. For sure, you will have many manual tasks you have to do daily to start your work.

For instance, what I do frequently is open the Azure Portal. As I have various accounts, I always need to open the correct browser with the right profile.

My first improvement would be to create a script to open the portal in the right browser and profile.

#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Open Azure Portal (personal)
# @raycast.mode silent
# Optional parameters:
# @raycast.icon ๐Ÿš€
# @raycast.packageName estruyf.azure.portal
# Documentation:
# @raycast.author Elio Struyf
hs=`hostname`
if [[ $hs == "ninja.local" ]]
then
open -a "Google Chrome" 'https://portal.azure.com' --args --profile-directory=Default
else
echo "Implementation for second machine"
fi
Show image Run the open Azure Portal script
Run the open Azure Portal script

That is not it. Another improvement that makes things even quicker is to get my development flow started just by running the script. Why? In my case, when I am developing for a Microsoft Teams project, I need to open:

  • Browser with the right profile for Microsoft Teams
  • Browser with the right profile for the Azure Profile (another account)
  • Visual Studio Code with the project
  • Terminal opened in the project folder

The script for this looks as follows:

#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Open Squarl project
# @raycast.mode silent
# Optional parameters:
# @raycast.icon ๐Ÿš€
# @raycast.packageName estruyf.code.squarl
# Documentation:
# @raycast.author Elio Struyf
hs=`hostname`
if [[ $hs == "ninja.local" ]]
then
code ~/<path-to-project>
hyper ~/<path-to-project>
open -a "Google Chrome Canary" 'https://teams.microsoft.com/' --args --profile-directory="Profile 9"
open -a "Google Chrome" 'https://portal.azure.com' --args --profile-directory=Default
else
echo "Implementation for second machine"
fi

Now I can just run my command, and it will automatically open all these instances.

Show image Run the get started with developing your project
Run the get started with developing your project

One more, for my blog, I place all the images in a year/month folder. This structure is still leftover from the WordPress days. I just kept the format. Each time I write an article like this one and want to add an image, I have to open that particular folder. With a custom script, I can now quickly open that folder, and if it does not exist, it will be created. Great for when we started a new month.

#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Open blog screenshots
# @raycast.mode silent
# Optional parameters:
# @raycast.icon ๐Ÿ™
# @raycast.packageName estruyf.code.squarl
# Documentation:
# @raycast.author Elio Struyf
crntYear=$(date +'%Y')
crntMonth=$(date +'%m')
monthDir=~/blog/web-eliostruyf-hugo/static/uploads/$crntYear/$crntMonth
[ ! -d "$monthDir" ] && mkdir -p "$monthDir"
open $monthDir
Show image Quickly open the blog images folder
Quickly open the blog images folder

I hope Raycast will improve your flow as well

Related articles

Report issues or make changes on GitHub

Found a typo or issue in this article? Visit the GitHub repository to make changes or submit a bug report.

Comments

Elio Struyf

Solutions Architect & Developer Expert

Loading...

Let's build together

Manage content in VS Code

Present from VS Code