### Get DockDoor Help via CLI Source: https://dockdoor.net/docs.html Execute this command in Terminal to retrieve a full list of available DockDoor commands. This is helpful for discovering functionality. ```bash osascript -e 'tell application "DockDoor" to get help' ``` -------------------------------- ### List All Windows with DockDoor Source: https://dockdoor.net/docs.html Use this command to get a JSON representation of all currently open windows managed by DockDoor. Ensure DockDoor is running. ```applescript osascript -e 'tell application "DockDoor" to list windows' ``` -------------------------------- ### Get Active Window Info via CLI Source: https://dockdoor.net/docs.html This command retrieves information about the currently active window. The output is typically in JSON format, suitable for scripting. ```bash -- Get active window info osascript -e 'tell application "DockDoor" to get active window' ``` -------------------------------- ### Configure BetterTouchTool to Run AppleScript Source: https://dockdoor.net/docs.html This guide details setting up BetterTouchTool to execute a specific AppleScript command when a trigger is activated. Use this to integrate DockDoor functionality with custom gestures or shortcuts. ```applescript tell application "DockDoor" to show switcher ``` -------------------------------- ### Show Preview for an App via CLI Source: https://dockdoor.net/docs.html This command opens the DockDoor preview for a specified application directly from the Terminal. Replace 'Finder' with the desired application name. ```bash # Show preview for an app osascript -e 'tell application "DockDoor" to show preview "Finder"' ``` -------------------------------- ### CLI Usage Source: https://dockdoor.net/docs.html Demonstrates how to execute DockDoor commands directly from the Terminal using `osascript -e`. ```APIDOC ## CLI Usage ### Description Execute any AppleScript command from the Terminal using `osascript -e`. ### Examples ```bash # Open the window switcher osascript -e 'tell application "DockDoor" to show switcher' # Show preview for an app osascript -e 'tell application "DockDoor" to show preview "Finder"' # Snap active window to right half osascript -e 'tell application "DockDoor" to position window "active" to "right"' ``` ``` -------------------------------- ### List Safari Windows via CLI (JSON Output) Source: https://dockdoor.net/docs.html This command lists all windows associated with the 'Safari' application. The output is returned as JSON, making it easy to parse in scripts. ```bash -- List all Safari windows (returns JSON) osascript -e 'tell application "DockDoor" to list windows "Safari"' ``` -------------------------------- ### List All Running Apps via CLI Source: https://dockdoor.net/docs.html This command retrieves a list of all currently running applications, including their window counts. The output is in JSON format. ```bash -- List all apps osascript -e 'tell application "DockDoor" to list apps' ``` -------------------------------- ### Preview Commands Source: https://dockdoor.net/docs.html Commands to show or hide previews for applications, with options for lookup by name, bundle ID, or process ID, and positioning. ```APIDOC ## Preview Commands ### Description Commands to show or hide previews for applications. ### Commands - `show preview "App"` - `show preview "id" by "bundle"` - `show preview "123" by "pid"` - `hide preview` - `show switcher` ### Optional Parameters for `show preview` - `at "x,y"`: Position the preview at specific coordinates. - `dock frame "x,y,w,h"`: Position relative to a dock icon rect. - `with delay true`: Use the configured hover delay. ### Examples ```applescript -- Show Safari preview at a specific position tell application "DockDoor" to show preview "Safari" at "500,400" -- Show by bundle ID with hover delay tell application "DockDoor" to show preview "com.apple.Safari" by "bundle" with delay true ``` ``` -------------------------------- ### Show DockDoor Window Switcher via CLI Source: https://dockdoor.net/docs.html Use this command in Terminal to open the DockDoor Window Switcher directly. This is useful for testing or quick access. ```bash osascript -e 'tell application "DockDoor" to show switcher' ``` -------------------------------- ### Querying Windows & Apps Source: https://dockdoor.net/docs.html Commands to retrieve information about running applications and their windows, returning data in JSON format for easy parsing. ```APIDOC ## Querying Windows & Apps ### Description Commands that return JSON, providing information about running apps and windows. ### Commands - `list apps`: Returns all running apps with window counts. - `list windows`: Returns all windows across all apps. - `list windows "AppName"`: Returns windows for a specific app. - `get active window`: Returns info about the frontmost window. - `get window "id"`: Returns window info with a cached preview image (base64). - `get windows`: Returns all windows with preview images. ### Examples ```bash # Get active window info osascript -e 'tell application "DockDoor" to get active window' # List all Safari windows (returns JSON) osascript -e 'tell application "DockDoor" to list windows "Safari"' # List all apps osascript -e 'tell application "DockDoor" to list apps' ``` ``` -------------------------------- ### Window Actions Source: https://dockdoor.net/docs.html Actions to manipulate windows, including focusing, minimizing, closing, maximizing, hiding, fullscreen toggling, centering, and snapping to screen regions. ```APIDOC ## Window Actions ### Description Actions to manipulate windows. All commands accept a window ID (number) or `"active"` for the frontmost window. ### Commands - `focus window "id"` - `minimize window "id"` - `close window "id"` - `maximize window "id"` - `hide window "id"` - `toggle fullscreen "id"` - `center window "id"` - `position window "id" to "region"` ### Position Values for `position window` `left`, `right`, `top`, `bottom`, `top-left`, `top-right`, `bottom-left`, `bottom-right`. ### Examples ```applescript -- Snap active window to the left half tell application "DockDoor" to position window "active" to "left" -- Close a specific window by ID tell application "DockDoor" to close window "12345" -- Center and focus a window tell application "DockDoor" center window "67890" focus window "67890" end tell ``` ``` -------------------------------- ### Configure Karabiner-Elements for DockDoor Source: https://dockdoor.net/docs.html This JSON configuration snippet for Karabiner-Elements maps a key combination (Option + Tab) to execute the DockDoor switcher AppleScript via a shell command. This allows for custom keyboard shortcuts to control DockDoor. ```json { "type": "basic", "from": { "key_code": "tab", "modifiers": { "mandatory": ["option"] } }, "to": [ { "shell_command": "osascript -e 'tell application \"DockDoor\" to show switcher'" } ] } ``` -------------------------------- ### Show App Preview with Specific Position Source: https://dockdoor.net/docs.html This AppleScript command displays a preview for a specified application at custom coordinates. Ensure the application name is correctly quoted. ```applescript tell application "DockDoor" to show preview "Safari" at "500,400" ``` -------------------------------- ### Show App Preview by Bundle ID with Hover Delay Source: https://dockdoor.net/docs.html Use this AppleScript to show an application's preview using its bundle ID and enable the configured hover delay. This is useful for precise targeting and consistent behavior. ```applescript tell application "DockDoor" to show preview "com.apple.Safari" by "bundle" with delay true ``` -------------------------------- ### Snap Active Window to Right Half via CLI Source: https://dockdoor.net/docs.html Use this command in Terminal to quickly snap the active window to the right half of the screen. This is a convenient way to manage window layouts. ```bash # Snap active window to right half osascript -e 'tell application "DockDoor" to position window "active" to "right"' ``` -------------------------------- ### Center and Focus Window by ID Source: https://dockdoor.net/docs.html This AppleScript block first centers a specified window by its ID and then brings it to the front. Replace "67890" with the target window ID. ```applescript -- Center and focus a window tell application "DockDoor" center window "67890" focus window "67890" end tell ``` -------------------------------- ### Snap Active Window to Screen Region Source: https://dockdoor.net/docs.html This AppleScript command positions the active window to a specified region of the screen, such as 'left' or 'right'. Use this for efficient window management. ```applescript -- Snap active window to the left half tell application "DockDoor" to position window "active" to "left" ``` -------------------------------- ### Close Specific Window by ID Source: https://dockdoor.net/docs.html Use this AppleScript to close a particular window identified by its unique ID. Replace "12345" with the actual window ID. ```applescript -- Close a specific window by ID tell application "DockDoor" to close window "12345" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.