New backup 2025-03-04 18:45:02

This commit is contained in:
Penelope Gwen 2025-03-04 18:45:02 -08:00
parent da435461d6
commit b5f9fb1f12
3 changed files with 39 additions and 2 deletions

View file

@ -18,6 +18,7 @@
(network)
(vpn)
(bluetooth)
(battery)
(sysdisk)
(sysmem)
(clock)
@ -135,7 +136,9 @@
"🖧")))
(defvar reveal_bluetooth false)
(defvar bluetooth_active true)
(defpoll bluetooth_active :initial true
:interval "5s"
'scripts/bt-status')
(defwidget bluetooth []
(revealer-on-hover
:revealvar reveal_bluetooth
@ -170,7 +173,7 @@
(defpoll volume_level :initial 0
:interval "1s"
"scripts/getvol")
"scripts/volume-status")
(defwidget volume_children []
(box :class "reveal_children"
:orientation "h"
@ -183,6 +186,29 @@
:orientation "h"
:onchange "wpctl set-volume @DEFAULT_AUDIO_SINK@ {}%;paplay 'volume.ogg'")))
(defvar reveal_battery false)
(defwidget battery []
(revealer-on-hover
:revealvar reveal_battery
:revealvar-name "reveal_battery"
(button :onclick 'pavucontrol-qt --tab 3'
" ${EWW_BATTERY.BAT0.status}%")
(battery_children)))
(defpoll battery_level :initial 0
:interval "1s"
"scripts/battery-status")
(defwidget battery_children []
(box :class "reveal_children"
:orientation "h"
:space-evenly false
:halign "center"
(scale
:min 0
:max 100
:value {EWW_BATTERY.BAT0.capacity}
:orientation "h")))
(defvar reveal_tray false)
(defwidget tray []
(revealer-on-hover

View file

@ -0,0 +1,11 @@
#!/bin/bash
connected_devices="$(bluetoothctl devices Connected)"
if [ "${#connected_devices}" -gt "0" ];then
bt_status='true'
else
bt_status='false'
fi
printf '%s' "${bt_status}"