mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 19:32:43 +00:00
feat(cli): add claude option to omarchy-toggle-scratch script
This commit is contained in:
1 parent
878bf1c707
commit
4768ec30f8
1 file changed
+11
-9
@@ -1,10 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/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
|
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
|
# Each profile is a special workspace, the monitor it opens on, and its
|
||||||
# resident apps (class pattern -> launch command; the pattern is an anchored
|
# resident apps (class pattern -> launch command; the pattern is an anchored
|
||||||
@@ -25,10 +25,12 @@ case ${1:-scratchpad} in
|
|||||||
scratchpad)
|
scratchpad)
|
||||||
NAME="scratchpad"
|
NAME="scratchpad"
|
||||||
HOME_MONITOR="Apple Computer Inc StudioDisplay 0x984262A7"
|
HOME_MONITOR="Apple Computer Inc StudioDisplay 0x984262A7"
|
||||||
MEMBERS=(
|
MEMBERS=("kitty-herdr|kitty --class=kitty-herdr --config $HOME/.config/kitty/herdr.conf")
|
||||||
"com.anthropic.Claude|claude-desktop"
|
;;
|
||||||
"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)
|
fastmail)
|
||||||
NAME="fastmail"
|
NAME="fastmail"
|
||||||
@@ -39,7 +41,7 @@ beeper)
|
|||||||
MEMBERS=("Beeper|gtk-launch beeper")
|
MEMBERS=("Beeper|gtk-launch beeper")
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "usage: ${0##*/} [scratchpad|fastmail|beeper]" >&2
|
echo "usage: ${0##*/} [scratchpad|claude|fastmail|beeper]" >&2
|
||||||
exit 2
|
exit 2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -103,8 +105,8 @@ for member in "${MEMBERS[@]}"; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if ((launched)); then
|
if ((launched)); then
|
||||||
# Reveal once the first newcomer lands; later ones (Claude takes a few
|
# Reveal once the first newcomer lands (Claude takes a few seconds); any
|
||||||
# seconds) drop straight onto the now-visible scratchpad. Deciding the
|
# later ones drop straight onto the now-visible scratchpad. Deciding the
|
||||||
# reveal after the window lands keeps this correct whether or not the rule
|
# reveal after the window lands keeps this correct whether or not the rule
|
||||||
# already showed the workspace.
|
# already showed the workspace.
|
||||||
for _ in {1..80}; do
|
for _ in {1..80}; do
|
||||||
|
|||||||
Reference in new issue
Block a user