feat(cli): add home workspace option and lower default gap to 10

This commit is contained in:
Prad Nukala committed 2026-10-14 11:35:15 -04:00
1 parent d8f5d10f05
commit 0c664cd298
3 files changed
+11 -6

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ esac
FRACTION=0.3
# Matches general:gaps_out so the window lines up with tiled neighbours and
# its border stays on screen.
GAP=16
GAP=10
# Lua dispatcher first, classic name as the pre-lua fallback (same shape as
# the other omarchy-* scripts here).
+1 -1
View File
@@ -37,7 +37,7 @@ GROUPED=$(jq -r '(.grouped // []) | length' <<<"$ACTIVE")
# omarchy-pip). h/j/k/l read clockwise from the bottom left: l bottom-left,
# d top-left, u top-right, r bottom-right.
if [[ $(jq -r '.floating' <<<"$ACTIVE") == true ]]; then
GAP=16
GAP=10
read -r WIN_W WIN_H MON_ID < <(jq -r '"\(.size[0]) \(.size[1]) \(.monitor)"' <<<"$ACTIVE")
read -r MON_X MON_Y MON_W MON_H RES_L RES_T RES_R RES_B < <(hyprctl monitors -j | jq -r --argjson id "$MON_ID" \
'.[] | select(.id == $id) | "\(.x) \(.y) \(((.width / .scale) | floor)) \(((.height / .scale) | floor)) \(.reserved | join(" "))"')
@@ -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