A Raycast extension that orchestrates context switching with brain stashing — save what's on your mind before switching workspaces, pick it back up when you arrive.
- Stash — before leaving a context, optionally dump what you're thinking about
- Switch — delegates the actual desktop/focus switch to a configurable executor
- Pop — when you arrive at the destination, your previous notes are waiting
| Command | Description |
|---|---|
| Switch Context | Stash + switch. Invokable via Quicklink with a ?arguments={"to":"slug"} argument. |
| Pop | Review and pop stashed notes for the current context. |
| Settings | Create Quicklinks for each configured context. |
Default location: ~/.config/context-switch/config.json
{
"contexts": [
{ "id": "personal", "label": "Personal", "icon": "🏠" },
{ "id": "work", "label": "Work", "icon": "💼" },
{ "id": "study", "label": "Study", "icon": "🎓" }
],
"plugins": {
"reader": {
"type": "file",
"path": "~/.config/context-switch/current"
},
"switcher": {
"type": "url",
"template": "your-switcher-url?context={context}"
}
}
}The {context} placeholder is replaced with the context slug when switching.
The switcher is whatever handles the actual desktop/focus/window switch on your machine. Any URL scheme or shell command works. See Plugin configuration below.
Open Context Switch: Settings in Raycast. Press ↩ on each context to create a Quicklink. Then go to Raycast Settings → Extensions → Quicklinks and assign a hotkey to each one.
In Raycast Settings → Extensions → Context Switch, you can pick a different config file location.
How the extension reads the current active context.
| Type | Config | Notes |
|---|---|---|
file |
path |
A file your switcher writes the current context slug to. Default: ~/.config/context-switch/current |
shell |
command |
A shell command whose stdout is the current context slug. |
shortcuts |
shortcutName |
A macOS Shortcut that outputs the current context slug. |
How the extension triggers a context switch.
| Type | Config | Notes |
|---|---|---|
url |
template |
Opens a URL. Use {context} as a placeholder for the slug. |
shell |
template |
Runs a shell command. Use {context} as a placeholder. |
"switcher": {
"type": "url",
"template": "hammerspoon://switch-context?to={context}"
}With the companion hammerspoon-config, Hammerspoon handles the Desktop switch, Chrome focus, and Focus Mode — and opens Raycast's Pop command when the switch is complete.
Raycast (orchestrator)
└── Switch command
├── reads current context → Reader plugin
├── saves stash note → JsonStorage (~/.config/context-switch/stash.json)
└── calls switcher → Switcher plugin
Switcher (executor, e.g. Hammerspoon)
├── switches Desktop space
├── activates Focus Mode
├── focuses Chrome profile
└── opens Raycast Pop (if notes exist at destination)
Plugins are swappable — see src/plugins/index.ts.
MIT