Open charlesrocket opened 1 year ago
Pretty sure you just want to put a :initial
on these
@viandoxdev :initial
"defaults to poll at startup" so it should still work, just slower. Also listening vars do have initial values hardcoded but window title is still empty. Appending {}
initial to polls does fixes JSON error in logs but widget still shows nothing and state
is inconclusive. The rest of errors are old:
error: Failed to turn `` into a value of type bool
┌─ /usr/home/charlie/.config/eww/eww.yuck:147:21
│
147 │ :visible visible
│ ─────── `` is not of type `bool`
Debug shows valid variables so it feels like default poll at start is ignored.
UPD: I figured out the listener, forgot to catch the state. But still can't get polls to use start values.
Not sure if this is related, but every now and then eww would deploy a duplicated window at the start that can't be closed natively.
Tried to resolve some issues with initials as per @viandoxdev suggestion but widgets remain hasty, apparently - only this hack works:
(defwidget window []
(box :halign "center"
(label :text {window_title == "" ? "" :
window_title == "null" ? "" : window_title }
:limit-width 65)
))
Checklist before submitting an issue
Description of the bug
Can not get initial values from any
defpoll
/deflisten
variables. Everything works as expected and no errors observed besides missing at the start window title and failed validations in logs:Not sure what is wrong, definitions are very straightforward
Full config:
I thought this might be due invalid widget ordering or something with
metric
but I can not find anything in docs regarding correct ordering/declarations. Basic "window title" nulls confirmed that this is not a module definition issue but something more general.Reproducing the issue
https://github.com/charlesrocket/dotfiles/tree/5e48cac02e0471a72f727ca4ada2d59d3810e2d9/.config/eww
Expected behaviour
Initial variables present
Additional context