Files
illogical-impulse/tetrio/.config/eww/windows/dynamic-bg.yuck
T
2024-02-22 15:35:06 +07:00

58 lines
1.2 KiB
Plaintext
Executable File

(defvar MOVEMULTIPLIER 4)
(defvar morebgoffset 4)
(defwidget dynbg []
(overlay
(box
:class "dynbg-image"
:style "background-position: ${(activews - 5)*MOVEMULTIPLIER > 50 ? 100 : 50+(activews - 5)*MOVEMULTIPLIER}% 20%"
)
(box
:space-evenly false
:spacing 5
:orientation "v"
:halign "fill"
:valign "center"
:style "margin-left: 5rem;"
(label
:xalign 0
:class "bg-decor-dow"
:text "${time.day}"
)
(label
:xalign 0
:class "bg-decor-date"
:text "${time.date}"
)
; I don't like focus being moved to this on reload
; (box
; :spacing 0
; :space-evenly false
; (input
; :class "bg-decor-input-left"
; :onaccept "firefox https://www.google.com/search?q={}"
; )
; (button
; :class "bg-decor-input-right"
; ""
; )
; )
)
)
)
(defwindow dynamic-bg
:focusable false
:stacking "bg"
:windowtype "normal"
:wm-ignore true
:geometry (geometry
:x 0
:y 0
:width "100%"
:height "100%"
:anchor "center center"
)
:monitor 0
(dynbg)
)