feat(cli): add claude option to omarchy-toggle-scratch script

This commit is contained in:
Prad Nukala committed 2026-09-29 17:45:26 -04:00
1 parent 878bf1c707
commit 4768ec30f8
1 file changed
+11 -9
@@ -1,10 +1,10 @@
#!/bin/bash
# omarchy:summary=Toggle a scratch workspace (scratchpad, fastmail, beeper), starting its resident apps when any is missing.
# omarchy:summary=Toggle a scratch workspace (scratchpad, claude, fastmail, beeper), starting its resident apps when any is missing.
set -uo pipefail
# Usage: omarchy-toggle-scratch [scratchpad|fastmail|beeper]
# Usage: omarchy-toggle-scratch [scratchpad|claude|fastmail|beeper]
#
# Each profile is a special workspace, the monitor it opens on, and its
# resident apps (class pattern -> launch command; the pattern is an anchored
@@ -25,10 +25,12 @@ case ${1:-scratchpad} in
scratchpad)
NAME="scratchpad"
HOME_MONITOR="Apple Computer Inc StudioDisplay 0x984262A7"
MEMBERS=(
"com.anthropic.Claude|claude-desktop"
"kitty-herdr|kitty --class=kitty-herdr --config $HOME/.config/kitty/herdr.conf"
)
MEMBERS=("kitty-herdr|kitty --class=kitty-herdr --config $HOME/.config/kitty/herdr.conf")
;;
claude)
NAME="claude"
HOME_MONITOR="Apple Computer Inc StudioDisplay 0x984262A7"
MEMBERS=("com.anthropic.Claude|claude-desktop")
;;
fastmail)
NAME="fastmail"
@@ -39,7 +41,7 @@ beeper)
MEMBERS=("Beeper|gtk-launch beeper")
;;
*)
echo "usage: ${0##*/} [scratchpad|fastmail|beeper]" >&2
echo "usage: ${0##*/} [scratchpad|claude|fastmail|beeper]" >&2
exit 2
;;
esac
@@ -103,8 +105,8 @@ for member in "${MEMBERS[@]}"; do
done
if ((launched)); then
# Reveal once the first newcomer lands; later ones (Claude takes a few
# seconds) drop straight onto the now-visible scratchpad. Deciding the
# Reveal once the first newcomer lands (Claude takes a few seconds); any
# later ones drop straight onto the now-visible scratchpad. Deciding the
# reveal after the window lands keeps this correct whether or not the rule
# already showed the workspace.
for _ in {1..80}; do