Regenerated

This commit is contained in:
2026-03-31 22:02:12 +02:00
parent 24c4dc5853
commit 2b01d436a9
4 changed files with 313 additions and 313 deletions
+291 -291
View File
File diff suppressed because it is too large Load Diff
+11 -11
View File
@@ -2711,7 +2711,7 @@ These are config files for waybar
"tooltip": true, "tooltip": true,
"tooltip-format": "Connected devices:\n{output}", "tooltip-format": "Connected devices:\n{output}",
"on-click": "blueman-manager" "on-click": "blueman-manager"
} },
"cpu": { "cpu": {
"format": "{usage}%  ", "format": "{usage}%  ",
@@ -2988,23 +2988,23 @@ window#waybar {
These are config files for waybar These are config files for waybar
#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/bluetooth-status.sh :noweb yes :mkdirp yes :eval never #+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/bluetooth-status.sh :noweb yes :mkdirp yes :eval never
#!/usr/bin/env bash #!/usr/bin/env bash
# Get connected devices # Collect connected devices
bt_connected=$(bluetoothctl devices | while read -r line; do bt_connected=$(bluetoothctl devices | while read -r line; do
mac=$(echo "$line" | awk '{print $2}') mac=$(echo "$line" | awk '{print $2}')
state=$(bluetoothctl info "$mac" | grep "Connected" | awk '{print $2}') if [ "$(bluetoothctl info "$mac" | awk '/Connected:/ {print $2}')" = "yes" ]; then
if [ "$state" = "yes" ]; then echo "$line" | cut -d' ' -f3-
name=$(echo "$line" | cut -d' ' -f3-)
echo "$name"
fi fi
done) done)
# Main icon for Waybar # Determine the icon
if [ -n "$bt_connected" ]; then if [ -n "$bt_connected" ]; then
echo "" icon=""
else else
echo "" icon=""
fi fi
# Tooltip: connected device names # Output: main icon for Waybar, then connected devices for tooltip
echo "$bt_connected" echo -n "$icon"
# Pass connected device names as JSON output for Waybar tooltip
echo "$bt_connected" | jq -R -s '{output: .}'
#+END_SRC #+END_SRC
+1 -1
View File
@@ -82,7 +82,7 @@
"tooltip": true, "tooltip": true,
"tooltip-format": "Connected devices:\n{output}", "tooltip-format": "Connected devices:\n{output}",
"on-click": "blueman-manager" "on-click": "blueman-manager"
} },
"cpu": { "cpu": {
"format": "{usage}%  ", "format": "{usage}%  ",
@@ -1,18 +1,18 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Get connected devices # Collect connected devices
bt_connected=$(bluetoothctl devices | while read -r line; do bt_connected=$(bluetoothctl devices | while read -r line; do
mac=$(echo "$line" | awk '{print $2}') mac=$(echo "$line" | awk '{print $2}')
state=$(bluetoothctl info "$mac" | grep "Connected" | awk '{print $2}') if [ "$(bluetoothctl info "$mac" | awk '/Connected:/ {print $2}')" = "yes" ]; then
if [ "$state" = "yes" ]; then echo "$line" | cut -d' ' -f3-
name=$(echo "$line" | cut -d' ' -f3-)
echo "$name"
fi fi
done) done)
# Main icon for Waybar # Determine the icon
if [ -n "$bt_connected" ]; then if [ -n "$bt_connected" ]; then
echo "" icon=""
else else
echo "" icon=""
fi fi
# Tooltip: connected device names # Output: main icon for Waybar, then connected devices for tooltip
echo "$bt_connected" echo -n "$icon"
# Pass connected device names as JSON output for Waybar tooltip
echo "$bt_connected" | jq -R -s '{output: .}'