elkowar / eww

ElKowars wacky widgets
https://elkowar.github.io/eww
MIT License
9.11k stars 377 forks source link

Eww not parsing json , even though it's valid #908

Open LamprosPitsillos opened 1 year ago

LamprosPitsillos commented 1 year ago

I have the same issue but checking the json seems to be fine...

image

Command used in eww config: (defpoll calendar_json :interval "20s" "date +'{\"day\": %d ,\"month\": %m ,\"year\" : %Y }'")

Originally posted by @LamprosPitsillos in https://github.com/elkowar/eww/issues/470#issuecomment-1700580857

viandoxdev commented 1 year ago

Well according to json.org this simply isn't valid json even though jq happily parses it. You need to remove the leading zero, this can be done using the proper format option:

(defpoll calendar_json :interval "20s" "date +'{\"day\": %-d ,\"month\": %-m ,\"year\" : %Y }'")
w-lfchen commented 1 week ago

is this still an issue?