Files
raycast-scripts/save-layout.sh
T

23 lines
466 B
Bash
Executable File

#!/bin/bash
# @raycast.schemaVersion 1
# @raycast.title Save Current Layout
# @raycast.mode silent
# @raycast.icon 💾
# @raycast.packageName Layout Selector
# @raycast.argument1 { "type": "text", "placeholder": "Layout Name (e.g. Work)" }
if [ ! -f /opt/homebrew/bin/hs ]; then
echo "Hammerspoon CLI link missing"
exit 1
fi
LAYOUT_NAME="$1"
if [ -z "$LAYOUT_NAME" ]; then
exit 1
fi
/opt/homebrew/bin/hs -c "LayoutSelector.save('${LAYOUT_NAME}')"