forked from Shinonome/dots-hyprland
stuff
This commit is contained in:
Executable
+229
@@ -0,0 +1,229 @@
|
||||
(defwidget winnotifs []
|
||||
(centerbox
|
||||
:orientation "v"
|
||||
:style "
|
||||
${anim_open_winnotif ? 'transition: 200ms cubic-bezier(0.05, 0.7, 0.1, 1);' : 'transition: 150ms cubic-bezier(0.3, 0, 0.8, 0.15);'}
|
||||
${rev_winnotif ? '' : 'margin-right: -700px;'}
|
||||
min-height: 1033px;
|
||||
"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:halign "start"
|
||||
(eventbox
|
||||
:valign "start"
|
||||
:onclick "scripts/toggle-winnotif.sh --close &"
|
||||
:onmiddleclick "scripts/toggle-winnotif.sh --close &"
|
||||
:onrightclick "scripts/toggle-winnotif.sh --close &"
|
||||
(box
|
||||
:class "box-that-is-there" :style "min-height: 1px;"
|
||||
)
|
||||
)
|
||||
(box
|
||||
:class "winwin"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:style "margin-bottom:6px;"
|
||||
(centerbox
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:spacing 10
|
||||
(label
|
||||
:halign "start"
|
||||
:class "winnotif-text winnotif-title"
|
||||
:text "Notifications"
|
||||
)
|
||||
)
|
||||
(box)
|
||||
(box
|
||||
:class "icon"
|
||||
:halign "end"
|
||||
:space-evenly false
|
||||
:style "margin-right: 12px;"
|
||||
(button
|
||||
:class "winnotif-button"
|
||||
:tooltip "Refresh"
|
||||
:onclick "dunstctl history > $XDG_CACHE_HOME/dunst-history.json &"
|
||||
(image
|
||||
:path "images/svg/dark/reset.svg"
|
||||
:image-width 19
|
||||
:image-height 19
|
||||
)
|
||||
)
|
||||
(button
|
||||
:class "winnotif-button"
|
||||
:tooltip "Pause/Resume Notifications"
|
||||
:onclick "scripts/notifications toggle &"
|
||||
{notif_icons.toggle_icon}
|
||||
)
|
||||
(button
|
||||
:class "wintoggle-text winnotif-button"
|
||||
:tooltip "Clear Notifications"
|
||||
:onclick "scripts/notifications clear &"
|
||||
"Clear all"
|
||||
)
|
||||
)
|
||||
)
|
||||
(scroll
|
||||
:width 400
|
||||
:valign "start"
|
||||
:style "
|
||||
min-height: ${rev_wincalendar ? 357 : 811}px;
|
||||
transition: 150ms cubic-bezier(0.05, 0.7, 0.1, 1);
|
||||
"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(for i in notifications
|
||||
(eventbox
|
||||
:onclick "dunstctl history-pop ${i.id} && dunstctl action 0 && dunstctl close"
|
||||
(box
|
||||
:orientation "v"
|
||||
:width 400
|
||||
:space-evenly false
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:class "winwin-bottom-pad"
|
||||
(image :class "winapp winnotif-notif-icon" :path "images/svg/dark/app.svg")
|
||||
(label :class "winnotif-appname" :text {i.appname})
|
||||
)
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:class "winnotif-notif"
|
||||
(label
|
||||
:xalign 0
|
||||
:wrap true
|
||||
:class "winnotif-text"
|
||||
:text {i.summary}
|
||||
)
|
||||
(label
|
||||
:xalign 0
|
||||
:wrap true
|
||||
:class "winnotif-text winnotif-bodytext"
|
||||
:text {i.body}
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(box :valign "center")
|
||||
; Calendar
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:valign "end"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:class "winwin-topbar"
|
||||
:style "margin-top: 6px;"
|
||||
(centerbox
|
||||
:orientation "h"
|
||||
:style "padding: 0 12px;"
|
||||
(label :xalign 0 :class "wincalendar-title" :text "${time.day}, ${time.monthname} ${day_only}")
|
||||
(box)
|
||||
(button
|
||||
:halign "end"
|
||||
:class "winnotif-button winarrow-${rev_wincalendar ? 'down' : 'up'}"
|
||||
:tooltip "Show/Hide Calendar"
|
||||
:onclick "${EWW_CMD} update rev_wincalendar=${!rev_wincalendar}"
|
||||
)
|
||||
)
|
||||
)
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:class "winnotif-calendar"
|
||||
:style "
|
||||
min-height: ${rev_wincalendar ? 408 : 0}px;
|
||||
transition: ${rev_wincalendar ? '152ms' : '149ms'} cubic-bezier(0.05, 0.7, 0.1, 1);
|
||||
"
|
||||
(revealer
|
||||
:reveal {rev_wincalendar}
|
||||
:transition "slideup"
|
||||
:duration "${rev_wincalendar ? '0ms' : '149ms'}"
|
||||
(eventbox
|
||||
:onscroll "scripts/scrollmonth {} &"
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
(centerbox
|
||||
:style "padding: 0 12px;"
|
||||
(label :xalign 0 :class "wincalendar-title" :text "${calendartitle}")
|
||||
(box)
|
||||
(box
|
||||
:halign "end"
|
||||
(button
|
||||
:onclick "scripts/scrollmonth up &"
|
||||
:halign "end"
|
||||
:class "winicon winnotif-monthbutton"
|
||||
(image
|
||||
:path "images/svg/dark/caretup.svg"
|
||||
)
|
||||
)
|
||||
(button
|
||||
:onclick "scripts/scrollmonth down &"
|
||||
:halign "end"
|
||||
:class "winicon winnotif-monthbutton"
|
||||
(image
|
||||
:path "images/svg/dark/caretdown.svg"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(box
|
||||
(for day in weekdays
|
||||
(box
|
||||
:class "wincalendar-button day${day.today}"
|
||||
(label :class "wincalendar-text" :text "${day.day}")
|
||||
)
|
||||
)
|
||||
)
|
||||
(for week in calendar
|
||||
(box
|
||||
(for day in week
|
||||
(button
|
||||
:class "wincalendar-button day${day.today}"
|
||||
(label :class "wincalendar-text" :text "${day.day}")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:class "winwin-bottom"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "h"
|
||||
:class "winwin-bottom-pad"
|
||||
(label :xalign 0 :class "wincalendar-title" :text "Calendar")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow winnotif
|
||||
:wm-ignore true
|
||||
:monitor 0
|
||||
:focusable true
|
||||
:geometry (geometry
|
||||
:x "0px"
|
||||
:y "51px"
|
||||
:height 1029
|
||||
:anchor "bottom right"
|
||||
)
|
||||
(winnotifs)
|
||||
)
|
||||
Reference in New Issue
Block a user