patchcord 0.5.16 → 0.5.18
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/scripts/statusline.sh +13 -0
package/package.json
CHANGED
package/scripts/statusline.sh
CHANGED
|
@@ -118,6 +118,19 @@ if [ -n "$pc_url" ] && [ -n "$pc_token" ]; then
|
|
|
118
118
|
if [ -n "$machine" ]; then
|
|
119
119
|
pc_part+=" ${dim}(${machine})${reset}"
|
|
120
120
|
fi
|
|
121
|
+
# Subscribe indicator: green dot when subscribe.mjs is alive for
|
|
122
|
+
# this agent (push-receiving). Pidfile path matches the one
|
|
123
|
+
# subscribe.mjs writes — see scripts/subscribe.mjs. Omitted
|
|
124
|
+
# when the listener isn't running (default polling-only state).
|
|
125
|
+
if [ -n "$namespace_id" ] && [ "$namespace_id" != "null" ]; then
|
|
126
|
+
sub_pidfile="/tmp/patchcord_subscribe_${namespace_id}_${agent_id}.pid"
|
|
127
|
+
if [ -f "$sub_pidfile" ]; then
|
|
128
|
+
sub_pid=$(cat "$sub_pidfile" 2>/dev/null)
|
|
129
|
+
if [ -n "$sub_pid" ] && kill -0 "$sub_pid" 2>/dev/null; then
|
|
130
|
+
pc_part+=" ${green}◉${reset}"
|
|
131
|
+
fi
|
|
132
|
+
fi
|
|
133
|
+
fi
|
|
121
134
|
fi
|
|
122
135
|
|
|
123
136
|
if [ "$count" -gt 0 ] 2>/dev/null; then
|