home

/

writing

/

a-love-letter-to-raycast

04 Jul 24

a f*cking great product

Sums it up pretty well!, honestly raycast has been such an impactful addition to my arsenal of tools that I would go as far as to call it is an s tier piece of software.

daily use

I actively manage my relationship with my computer via commands/key-bindings and have almost stopped using the dock entirely, here are some of the commands that I use that give me the same happy feeling as sick ass chained alias commands in bash.
Β 
First off, we have window management:
cmd
title
desc
alm
Almost Maximise
set a windowed application to fullscreen with spacing
tf
Toggle Fullscreen
enter or exist full screen.
nd
Next Desktop
send or bring back a window between screens
lh
Left Half
set window to left half of screen
rh
Right Half
set window to right half of screen
cen
Centre
centre a window
ha
Hide all Except Foremost
minimise all windows except current
qaa
Quit All Applications
close all active application
qa
Quit Application
attempt to find application and close it*
Β 
Secondly, we have Spotify:
These are custom hotkeys that can be configured by:
πŸ”₯
extensions β†’ spotify β†’ record hotkey
cmd
title
desc
βŒ₯ P
Play or Pause
play or pause current song
βŒ₯ N
Next Song
skip current song and go to next on
βŒ₯ L
Like Song
add the current song to liked list
Β 
Lastly, we have the obscure extras:
cmd
title
desc
cf
Colour Filter
run a mac os snippet that changes the screen to black and white
se
Search Emojis
search and paste emoji into any application
sd
Search Tailwind Documentation
search and open any tailwindcss documentation
sc
Search Tailwind Colours
open and search though all tailwind colours, paste in HEX values
CMD ^ W
Open Webstorm
shortcut to go directly to or open webstorm
CMD ^ A
Open Arc
shortcut to go directly to or open arc browser
CMD ^ P
Open Pycharm
shortcut to go directly to or open pycharm
Β 

custom snippets

Pretty much any use-case you could ever think of is achievable with customs scripts and an LLM, in the video below you can see my custom Quit Application script that attempts to find a running instance of an app with the best matching name as to that which you provided and close it.
source code
Β 

ai and premium features

I have yet to use the paid version of raycast along with it’s ai integration, I am a daily driver of perplexity, claude and chatGPT. I currently use them all inside of arc but could imagine that being one step closer via raycast would be lovely.
Β 
#!/bin/bash # Required parameters: # @raycast.schemaVersion 1 # @raycast.title Quit Application # @raycast.mode silent # Optional parameters: # @raycast.icon 🚫 # @raycast.argument1 { "type": "text", "placeholder": "App name", "suggestionsCommand": "./quit_app.sh suggest" } # Function to get list of running applications get_running_apps() { osascript -e 'tell application "System Events" to get name of (processes where background only is false)' } # Function to find best match find_best_match() { local input=$(echo "$1" | tr '[:upper:]' '[:lower:]') local best_match="" local best_score=0 while IFS= read -r app; do local app_lower=$(echo "$app" | tr '[:upper:]' '[:lower:]') local score=$(echo "$app_lower" | grep -o "$input" | wc -c) if [ "$score" -gt "$best_score" ]; then best_score=$score best_match=$app fi done < <(get_running_apps | tr ',' '\n' | sed 's/^[[:space:]]*//') echo "$best_match" } # Suggestion command for Raycast if [ "$1" = "suggest" ]; then get_running_apps | tr ',' '\n' | sed 's/^[[:space:]]*//' | sort -u exit 0 fi app_name="$1" if [ -z "$app_name" ]; then echo "Please provide an application name." exit 1 fi best_match=$(find_best_match "$app_name") if [ -n "$best_match" ]; then osascript -e "tell application \"$best_match\" to quit" echo "$best_match closed!" exit 0 else echo "No matching application found for '$app_name'" exit 1 fi
source code