mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
feat(cli): add home workspace option and lower default gap to 10
This commit is contained in:
1 parent
d8f5d10f05
commit
0c664cd298
3 files changed
+11
-6
No files matched your search
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Toggle a scratch workspace (scratchpad, claude, fastmail, beeper), starting its resident apps when any is missing.
|
||||
# omarchy:summary=Toggle a scratch workspace (scratchpad, claude, fastmail, beeper, home), starting its resident apps when any is missing.
|
||||
|
||||
set -uo pipefail
|
||||
|
||||
# Usage: omarchy-toggle-scratch [scratchpad|claude|fastmail|beeper]
|
||||
# Usage: omarchy-toggle-scratch [scratchpad|claude|fastmail|beeper|home]
|
||||
#
|
||||
# Each profile is a special workspace, the monitor it opens on, and its
|
||||
# resident apps (class pattern -> launch command; the pattern is an anchored
|
||||
@@ -39,8 +39,12 @@ beeper)
|
||||
NAME="beeper"
|
||||
MEMBERS=("Beeper|gtk-launch beeper")
|
||||
;;
|
||||
home)
|
||||
NAME="home"
|
||||
MEMBERS=("brave-home\.google\.com__.*|gtk-launch 'Google Home'")
|
||||
;;
|
||||
*)
|
||||
echo "usage: ${0##*/} [scratchpad|claude|fastmail|beeper]" >&2
|
||||
echo "usage: ${0##*/} [scratchpad|claude|fastmail|beeper|home]" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
@@ -99,7 +103,8 @@ launched=0
|
||||
for member in "${MEMBERS[@]}"; do
|
||||
pattern=${member%%|*}
|
||||
grep -qE "^(${pattern})$" <<<"$present" && continue
|
||||
setsid uwsm-app -- ${member#*|} >/dev/null 2>&1 &
|
||||
# eval so a launch command can quote a desktop id with spaces.
|
||||
eval "setsid uwsm-app -- ${member#*|}" >/dev/null 2>&1 &
|
||||
launched=1
|
||||
done
|
||||
|
||||
|
||||
Reference in new issue
Block a user