(defwindow notifications :wm-ignore true :geometry (geometry :x "0px" :y "32px" :width "0px" :height "0px" :anchor "top center") :monitor 0 (notifications)) (defwidget notifications [] (eventbox :onhoverlost "${EWW_CMD} close notifications" (box :class "notifications-box" :orientation "h" :space-evenly false (box :class "notifications-section" :orientation "v" :space-evenly false (box :class "notification-header" (label :class "notification-label" :halign "start" :text "Notifications") (box :class "icon" :halign "end" :space-evenly false :spacing 10 (button :class "notification-action" :tooltip "Refresh" :onclick "dunstctl history > $XDG_CACHE_HOME/dunst-history.json" "") (button :class "notification-action" :tooltip "Pause/Resume Notifications" :onclick "scripts/notifications toggle" {notif_icons.toggle_icon}) (button :class "notification-action" :tooltip "Clear Notifications" :onclick "scripts/notifications clear" ""))) ; 󰅖 (scroll :vscroll true :hscroll false :height 500 :width 300 (box :class "container" :orientation "v" :space-evenly false (for i in notifications (eventbox :onclick "dunstctl history-pop ${i.id} && dunstctl action 0 && dunstctl close" (box :class "notification" :orientation "v" :width 300 :space-evenly false (centerbox :space-evenly false (label :xalign 0 :wrap true :class "summary" :text {i.summary} ) (label) (label :xalign 1 :wrap true :class "appname" :text {i.appname} ) ) (label :xalign 0 :wrap true :class "body" :text {i.body} ) ) ) ) ) ) ) (calendar) ) ) )