💥 eww(bar/workspaces): fix workspace indicator with a literal script

This commit is contained in:
retrozinndev
2024-12-10 10:41:06 -03:00
parent 75ce9fa8f9
commit cacc59cb8e
41 changed files with 377 additions and 782 deletions
+1 -4
View File
@@ -1,9 +1,6 @@
(include "./widgets/audio-popup/output-slider.yuck")
(include "./widgets/audio-popup/source-slider.yuck")
(deflisten volume_json :initial `{ "output": 60, "source": 80 }`
`sh ./scripts/get-volume-watch.sh`)
(defwindow audio-popup []
:monitor 0
:namespace "eww-audio"
@@ -26,7 +23,7 @@
(box :class "vertical-button-row"
(button :class "more-settings"
:onclick "eww close audio-popup; hyprctl dispatch exec pavucontrol"
(label :text "Show on Volume Control"
(label :text "More devices"
:xalign 0))
)
)
+11 -1
View File
@@ -1,3 +1,13 @@
(include "./widgets/bar/workspaces.yuck")
(include "./widgets/bar/clock.yuck")
(include "./widgets/bar/cc-toggle.yuck")
(include "./widgets/bar/audio.yuck")
(include "./widgets/bar/media.yuck")
(include "./widgets/bar/logo.yuck")
(include "./widgets/bar/window.yuck")
(include "./widgets/bar/network.yuck")
(include "./widgets/bar/battery.yuck")
(defwindow bar
:monitor 0
:geometry (geometry :width "100%"
@@ -33,7 +43,7 @@
(audio)
(battery)
(network)
(control-center-toggle)
(cc-toggle)
)
)
)
+1 -1
View File
@@ -10,7 +10,7 @@
:orientation "vertical"
(label :class "calendar-header"
:text "Calendar")
:text "${month-name}")
(calendar :class "month-calendar"
:show-details true
:show-heading true
+1 -1
View File
@@ -18,6 +18,6 @@
(quickactions)
(toggle-grid)
(mediaplayer :album_background true)
(notifications)
(notifications :notification-history json_notification_history)
)
)
+47
View File
@@ -0,0 +1,47 @@
(defwindow floating-notification []
:monitor 0
:exclusive false
:focusable false
:namespace "eww-notification-popup"
:geometry (geometry :anchor "top right"
:width "128px"
:height "64px")
:stacking "overlay"
(box :class "floating-notifications"
(for item in json_notification_history
(floating-notification :summary "${item.summary}"
:body "${item.body}"
:image "${item.image}"
:app-name "${item.applicationName}")
)
)
)
(defwidget floating-notification [ summary body image app-name ]
(box :class "popup-notification"
:space-evenly false
:orientation "vertical"
(box :orientation "horizontal"
:class "top"
(label :text "${app-name}")
)
(box :orientation "horizontal"
(box :class "image"
:style "background-image: ${image};")
(box :class "content"
:orientation "vertical"
(label :class "summary"
:text "${summary}")
(label :class "body"
:text "${body}")
)
)
)
)