ApexDock ships an OSAScriptingDefinition so you can drive the bar from AppleScript, JXA, Shortcuts.app, Keyboard Maestro's Execute AppleScript action, Raycast scripts, and any other host that speaks Apple Events.
The dictionary is bundled inside the app — open Script Editor → File → Open Dictionary… and pick ApexDock to browse the verbs interactively.
Quick start
tell application "ApexDock"
switch workspace "Work"
focus app "com.apple.Safari"
toggle dock suppressor
toggle window minder
show command palette
run palette "switch to Work"
open settings "agents"
current workspace name -- read-only property
end tell
ApexDock must be running for these to do anything. AppleScript launches the app first if it's closed.
Properties (read-only)
| Property | Type | Notes |
|---|---|---|
current workspace name | text | Active workspace's name. Empty when none active. |
current workspace id | text | Active workspace's UUID. Empty when none active. |
dock suppressor enabled | boolean | true while ApexDock is hiding the macOS Dock. |
window minder enabled | boolean | true while ApexDock is clamping app windows above the bar. |
tell application "ApexDock"
if dock suppressor enabled then display notification "Dock is hidden"
return current workspace name
end tell
Commands
switch workspace
switch workspace "Work" -- match by name (case-insensitive)
switch workspace id "12345678-…" -- or by UUID; id wins over the direct param
Returns true when found and activated, false otherwise.
focus app
tell application "ApexDock" to focus app "com.apple.Safari"
Direct parameter is the bundle identifier. Returns true when the bundle id resolved to an installed app.
toggle dock suppressor
tell application "ApexDock" to toggle dock suppressor
Returns the new boolean state.
toggle window minder
tell application "ApexDock" to toggle window minder
Returns the new boolean state.
show command palette
tell application "ApexDock" to show command palette
Reveals the floating palette panel. No return.
run palette
tell application "ApexDock"
run palette "switch to Work" -- top fuzzy match wins
end tell
Runs the highest-scoring palette intent for the query without showing the panel. Returns the display name of the executed candidate, or empty string if nothing matched.
open settings
tell application "ApexDock" to open settings "agents"
Opens the Settings window on the given tab. Tab IDs: bar, permissions, agents, assistant, commandPalette, workspaces, about.
Shortcuts.app
The Run AppleScript action is the simplest integration. Paste any of the snippets above. The runtime resolves tell application "ApexDock" once the app is registered (a single launch is enough; macOS caches the dictionary).
A common pattern:
- Get current Wi-Fi network (or any other Shortcuts trigger).
- Run AppleScript with
tell application "ApexDock" to switch workspace "Office". - Done — your bar matches your physical location.
Keyboard Maestro
Use Execute AppleScript with the same snippets. Pair with hot-corner or USB-attach triggers for hands-free workspace switching.
Verb codes (raw .sdef)
For anyone consuming the raw scripting definition, every ApexDock verb sits in suite ApxD with a four-letter code:
| Verb | Code |
|---|---|
switch workspace | aSwW |
focus app | aFcA |
toggle dock suppressor | aTDS |
toggle window minder | aTWM |
show command palette | aSCP |
run palette | aRPa |
open settings | aOST |