Regenerated

This commit is contained in:
2026-03-31 22:16:38 +02:00
parent 6c529266f1
commit 975c2eb44d
3 changed files with 295 additions and 286 deletions
+285 -282
View File
File diff suppressed because it is too large Load Diff
+5 -2
View File
@@ -2997,14 +2997,17 @@ bt_connected=$(bluetoothctl devices | while read -r line; do
fi fi
done | sed '/^$/d') # remove empty lines done | sed '/^$/d') # remove empty lines
# Determine the icon # Determine icon
if [ -n "$bt_connected" ]; then if [ -n "$bt_connected" ]; then
icon="" icon=""
else else
icon="" icon=""
fi fi
# Output valid JSON for Waybar # Escape for JSON
bt_connected_json=$(printf '%s' "$bt_connected" | sed 's/"/\\"/g' | awk '{printf "%s\\n", $0}')
# Output single JSON object
echo "{\"text\": \"$icon\", \"tooltip\": \"$bt_connected_json\"}" echo "{\"text\": \"$icon\", \"tooltip\": \"$bt_connected_json\"}"
#+END_SRC #+END_SRC
@@ -8,12 +8,15 @@ bt_connected=$(bluetoothctl devices | while read -r line; do
fi fi
done | sed '/^$/d') # remove empty lines done | sed '/^$/d') # remove empty lines
# Determine the icon # Determine icon
if [ -n "$bt_connected" ]; then if [ -n "$bt_connected" ]; then
icon="" icon=""
else else
icon="" icon=""
fi fi
# Output valid JSON for Waybar # Escape for JSON
bt_connected_json=$(printf '%s' "$bt_connected" | sed 's/"/\\"/g' | awk '{printf "%s\\n", $0}')
# Output single JSON object
echo "{\"text\": \"$icon\", \"tooltip\": \"$bt_connected_json\"}" echo "{\"text\": \"$icon\", \"tooltip\": \"$bt_connected_json\"}"