eww: add new features and fix issues

This commit is contained in:
retrozinndev
2024-12-07 16:43:37 -03:00
parent adf8b7d9ba
commit e9258d04e4
26 changed files with 882 additions and 207 deletions
@@ -0,0 +1,61 @@
(defwidget notification [ ?application_name ?icon_path summary body ?image ?onclick ]
(eventbox :onclick "${onclick}"
(box :class "notification"
:orientation "vertical"
:height 96
:space-evenly false
(box :class "top"
:orientation "horizontal"
:space-evenly false
(box :class "app-info"
:space-evenly false
:halign "start"
:hexpand true
:vexpand false
(image :class "app-icon"
:path "${icon_path}"
:visible { icon_path != "" ? true : false }
:image-width 32
:image-height 32)
(label :class "app-name"
:text "${application_name}")
)
(box :space-evenly false
(button :class "close"
:onclick "${onclick}"
"󰅖")
)
)
(box :class "content"
:space-evenly false
(box :class "image"
:width 96
:height 96
:visible { image != "" ? true : false }
:style { image != "" ? "background-image: image(url('${image}'));" : "" }
)
(box :class "text"
:orientation "vertical"
:space-evenly false
(label :class "summary"
:text "${summary}"
:xalign 0
:show-truncated true
:halign "start")
(label :class "body"
:markup "${body}"
:xalign 0
:show-truncated false
:wrap true)
)
)
)
)
)