@umang-boss/claudemon 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/statusline/buddy-status.sh +12 -14
package/package.json
CHANGED
|
@@ -109,13 +109,12 @@ if [ "$ENCOUNTER_CYCLE" -ge 3 ]; then
|
|
|
109
109
|
ENCOUNTER_VISIBLE=false
|
|
110
110
|
fi
|
|
111
111
|
|
|
112
|
-
# Sprite jitter: shift 0-2 spaces
|
|
112
|
+
# Sprite jitter: shift 0-2 spaces LEFT only every 2 seconds
|
|
113
|
+
# Right shifts clip against terminal edge, so only shift left (inward)
|
|
113
114
|
JITTER_SEED=$(( NOW_SEC / 2 ))
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
[ "$JITTER_OFFSET" -lt -2 ] && JITTER_OFFSET=-2
|
|
118
|
-
[ "$JITTER_OFFSET" -gt 2 ] && JITTER_OFFSET=2
|
|
115
|
+
JITTER_OFFSET=$(( (JITTER_SEED * 7 + 3) % 3 ))
|
|
116
|
+
# Result: 0, 1, or 2 extra spaces of right margin (sprite shifts left)
|
|
117
|
+
|
|
119
118
|
|
|
120
119
|
# ── Terminal width ──────────────────────────────────────────
|
|
121
120
|
# Cross-platform: Linux uses /proc, macOS uses tty, Windows uses $COLUMNS
|
|
@@ -330,11 +329,10 @@ RIGHT_MARGIN=4
|
|
|
330
329
|
RIGHT_PAD=$(( COLS - ART_W - RIGHT_MARGIN ))
|
|
331
330
|
[ "$RIGHT_PAD" -lt 0 ] && RIGHT_PAD=0
|
|
332
331
|
|
|
333
|
-
# Jittered padding
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
[ "$JITTER_PAD" -lt 0 ] && JITTER_PAD=0
|
|
332
|
+
# Jittered padding for sprite lines only (name line uses fixed RIGHT_PAD)
|
|
333
|
+
# JITTER_OFFSET is 0-2, adding to margin pushes sprite left
|
|
334
|
+
SPRITE_PAD=$(( COLS - ART_W - RIGHT_MARGIN - JITTER_OFFSET ))
|
|
335
|
+
[ "$SPRITE_PAD" -lt 0 ] && SPRITE_PAD=0
|
|
338
336
|
|
|
339
337
|
# Build left array — line 1: model+context, line 2: update notice (if any)
|
|
340
338
|
LEFT_LINES=()
|
|
@@ -347,9 +345,9 @@ while [ ${#LEFT_LINES[@]} -lt "$TOTAL_LINES" ]; do
|
|
|
347
345
|
done
|
|
348
346
|
LEFT_COUNT=${#LEFT_LINES[@]}
|
|
349
347
|
|
|
350
|
-
# ── Build full right-side spacer (jittered for sprite
|
|
348
|
+
# ── Build full right-side spacer (jittered for sprite) ───────
|
|
351
349
|
FULL_SPACER=""
|
|
352
|
-
for (( s=0; s<
|
|
350
|
+
for (( s=0; s<SPRITE_PAD; s++ )); do FULL_SPACER+="$B"; done
|
|
353
351
|
|
|
354
352
|
# ── Output name line ABOVE sprite — with speech before name ──
|
|
355
353
|
SPEECH_TEXT=""
|
|
@@ -374,7 +372,7 @@ for (( i=0; i<SPRITE_COUNT; i++ )); do
|
|
|
374
372
|
right="${SPRITE_LINES[$i]}${NC}"
|
|
375
373
|
|
|
376
374
|
if [ -n "$left" ]; then
|
|
377
|
-
gap=$((
|
|
375
|
+
gap=$(( SPRITE_PAD - left_w ))
|
|
378
376
|
[ "$gap" -lt 1 ] && gap=1
|
|
379
377
|
GAP_STR=""
|
|
380
378
|
for (( g=0; g<gap; g++ )); do GAP_STR+="$B"; done
|