-
I am having some difficulty getting variables passed in as arguments to a widget to update.
Now, I know that wrapping the variable in those curly brackets is needed if calling it from within a string. However, when testing the widget, the variable does not update. Am I doing something wrong? or can you just not evaluate variables from within an eww widget? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I've thought about passing a variable as a JSON key-value pair and getting the name of the passed variable using jq, but I soon realized that eww wouldn't allow me to change a specific value of the JSON. |
Beta Was this translation helpful? Give feedback.
-
I don't really know what you're talking about, as the button turns green upon being pressed on my machine. |
Beta Was this translation helpful? Give feedback.
I didn’t notice this last night , but when you define the styles you call the variable directly, rather than as
${arg}
. If I replace the call to${testing}
with a call to${arg}
it sets the name of the variable (ie: “testing”) as the value in the css. In other words, the way variables get called is dependent upon the context they are called in. If I want the flexibility of being able to call a variable in any context, I would need to pass both the variables name and the variable itself as arguments, such that this context-dependent behavior is mitigated. I’m marking this as the solution for now, but I’m opening a bug report about this later.