user/eww: display multiple bluetooth devices in one line

This commit is contained in:
Cilly Leang 2026-03-06 21:07:12 +11:00
parent e73f9d612c
commit 09aceb18f4
Signed by: cilly
GPG key ID: 6500251E087653C9

View file

@ -43,6 +43,8 @@
`nmcli -f IN-USE,SIGNAL device wifi | grep '*' | tr -d -c 0-9`)
(defpoll bluetooth_device :interval "1s" :run-while bt-enabled
`bluetoothctl devices Connected | grep Device | cut -d" " -f3-`)
(defpoll bluetooth_device_count :interval "1s" :run-while bt-enabled
`bluetoothctl devices Connected | wc -l`)
(deflisten lnetwork :initial "" :run-while wifi-enabled "./scripts/network.sh")
(deflisten ltitle :initial "" "./scripts/title.sh")
@ -99,7 +101,7 @@
(revealer :transition "slideleft"
:reveal {bluetooth-extended && bluetooth_device != ""}
:duration 150
(label :text bluetooth_device
(label :text { bluetooth_device_count == "1" ? bluetooth_device : (bluetooth_device_count + " devices") }
:class "base")))))
(defwidget network []