@umang-boss/claudemon 2.1.1 → 2.1.2
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 +24 -5
package/package.json
CHANGED
|
@@ -109,11 +109,30 @@ if [ "$ENCOUNTER_CYCLE" -ge 3 ]; then
|
|
|
109
109
|
ENCOUNTER_VISIBLE=false
|
|
110
110
|
fi
|
|
111
111
|
|
|
112
|
-
# Sprite jitter:
|
|
113
|
-
#
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
# Sprite jitter: idle for 15-30s (random), then quick wiggle, then idle again
|
|
113
|
+
# Walk through variable-length cycles to find which cycle we're in
|
|
114
|
+
JITTER_OFFSET=0
|
|
115
|
+
_jt_elapsed=0
|
|
116
|
+
_jt_cycle=0
|
|
117
|
+
while true; do
|
|
118
|
+
# Each cycle gets a pseudo-random length between 15-30s based on cycle number
|
|
119
|
+
_jt_len=$(( 15 + ( (_jt_cycle * 13 + 7) % 16 ) ))
|
|
120
|
+
if [ $(( _jt_elapsed + _jt_len )) -gt $(( NOW_SEC % 3600 )) ]; then
|
|
121
|
+
# We're in this cycle — find position within it
|
|
122
|
+
_jt_pos=$(( (NOW_SEC % 3600) - _jt_elapsed ))
|
|
123
|
+
# Wiggle in the last 3 seconds: left, back, left
|
|
124
|
+
if [ "$_jt_pos" -eq $(( _jt_len - 3 )) ]; then
|
|
125
|
+
JITTER_OFFSET=1
|
|
126
|
+
elif [ "$_jt_pos" -eq $(( _jt_len - 2 )) ]; then
|
|
127
|
+
JITTER_OFFSET=0
|
|
128
|
+
elif [ "$_jt_pos" -eq $(( _jt_len - 1 )) ]; then
|
|
129
|
+
JITTER_OFFSET=2
|
|
130
|
+
fi
|
|
131
|
+
break
|
|
132
|
+
fi
|
|
133
|
+
_jt_elapsed=$(( _jt_elapsed + _jt_len ))
|
|
134
|
+
_jt_cycle=$(( _jt_cycle + 1 ))
|
|
135
|
+
done
|
|
117
136
|
|
|
118
137
|
|
|
119
138
|
# ── Terminal width ──────────────────────────────────────────
|