✨ a lot of changes and new stuff! started using mako
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
(defwindow floating-notifications []
|
||||
:monitor 0
|
||||
:exclusive false
|
||||
:focusable false
|
||||
:namespace "eww-notification-popup"
|
||||
:geometry (geometry :anchor "top right"
|
||||
:width "512px"
|
||||
:height "1px"
|
||||
:x "5px")
|
||||
:stacking "overlay"
|
||||
|
||||
(box :class "floating-notifications"
|
||||
:orientation "vertical"
|
||||
(for item in json_recent_notifications
|
||||
(floating-notification :summary "${item.summary.data}"
|
||||
:body "${item.body.data}"
|
||||
:image "${item.icon_path.data}"
|
||||
:app-name "${item.appname.data}")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget floating-notification [ summary body image app-name ]
|
||||
(box :class "floating-notification"
|
||||
:space-evenly false
|
||||
:orientation "vertical"
|
||||
|
||||
(box :orientation "horizontal"
|
||||
:class "top"
|
||||
:space-evenly false
|
||||
|
||||
(image :class "app-icon"
|
||||
:icon "${ app-name =~ 'zen-alpha' ? 'zen-browser' : app-name }"
|
||||
:icon-size "menu")
|
||||
|
||||
(label :text "${app-name}"
|
||||
:xalign 0)
|
||||
)
|
||||
|
||||
(box :orientation "horizontal"
|
||||
:space-evenly false
|
||||
:class "content"
|
||||
(box :class "image"
|
||||
:style "background-image: image(url('${image}'));"
|
||||
:width 86
|
||||
:height 85
|
||||
:visible { image != "" ? true : false })
|
||||
|
||||
(box :class "text-content"
|
||||
:orientation "vertical"
|
||||
:space-evenly false
|
||||
|
||||
(label :class "summary"
|
||||
:text "${summary}"
|
||||
:xalign 0)
|
||||
|
||||
(label :class "body"
|
||||
:text "${body}"
|
||||
:xalign 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user