added new widgets

This commit is contained in:
2025-03-08 17:44:11 +01:00
parent 6bab674c4d
commit e04868b5d0
15 changed files with 261 additions and 3 deletions

View File

@@ -0,0 +1,19 @@
(deflisten notification :initial '{ "count": 0, "dnd": false, "visible": false, "inhibited": false }' "swaync-client -s")
(defvar swaync_icon_act "󰀠")
(defvar swaync_icon_inh "󰚎")
(defvar swaync_icon_dnd "󰀣")
(defwidget swaync []
(eventbox
:class "swaync${notification.dnd == true ? " swaync--dnd" : ""}${notification.inhibited == true ? " swaync--inhib" : ""}"
:cursor "pointer"
:onclick "swaync-client -t"
:onmiddleclick "swaync-client -d"
:onrightclick "swaync-client -C"
(box
:orientation "horizontal"
:spacing 3
:space-evenly false
(label :text "${notification.dnd == true ? swaync_icon_dnd : notification.inhibited == true ? swaync_icon_inh : swaync_icon_act}")
(label :text "${notification.count}"))))