feat: add bluetooth devices to eww bar
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
fcf2a53ed6
commit
df03fbf5ed
2 changed files with 26 additions and 13 deletions
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
(defpoll songcard_button :interval "1s" "scripts/songcardplayrender")
|
(defpoll songcard_button :interval "1s" "scripts/songcardplayrender")
|
||||||
(defpoll wifi_label :interval "1s" "scripts/wifi")
|
(defpoll wifi_label :interval "1s" "scripts/wifi")
|
||||||
|
(defpoll bluetooth_label :interval "1s" "scripts/bluetooth")
|
||||||
(defpoll volume_level :interval "1s" "scripts/volume")
|
(defpoll volume_level :interval "1s" "scripts/volume")
|
||||||
(defpoll volume_label :initial '{"icon": "", content: "0"}'
|
(defpoll volume_label :initial '{"icon": "", content: "0"}'
|
||||||
:interval "1s"
|
:interval "1s"
|
||||||
|
@ -116,6 +117,7 @@
|
||||||
:space-evenly "false"
|
:space-evenly "false"
|
||||||
:spacing 10
|
:spacing 10
|
||||||
(wifi)
|
(wifi)
|
||||||
|
(bluetooth)
|
||||||
(brightness)
|
(brightness)
|
||||||
(volume)
|
(volume)
|
||||||
(power)
|
(power)
|
||||||
|
@ -126,6 +128,12 @@
|
||||||
(icon-module :icon "↑"
|
(icon-module :icon "↑"
|
||||||
(literal :content {wifi_label})))
|
(literal :content {wifi_label})))
|
||||||
|
|
||||||
|
(defwidget bluetooth []
|
||||||
|
(icon-module :class "bluetooth"
|
||||||
|
:icon "ᛒ"
|
||||||
|
:visible true
|
||||||
|
(literal :content {bluetooth_label})))
|
||||||
|
|
||||||
;; A widget for tracking brightness
|
;; A widget for tracking brightness
|
||||||
(defwidget brightness []
|
(defwidget brightness []
|
||||||
(eventbox :onhover "eww update brightness_reveal=true"
|
(eventbox :onhover "eww update brightness_reveal=true"
|
||||||
|
|
5
.config/eww/scripts/bluetooth
Executable file
5
.config/eww/scripts/bluetooth
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
val=$(bluetoothctl devices Connected | wc -l)
|
||||||
|
|
||||||
|
echo "(label :class \"bluetooth__label\" :text \"$val\")"
|
Loading…
Add table
Add a link
Reference in a new issue