Clarification on EWW expressions #435
Unanswered
DarkSamus9000
asked this question in
Q&A
Replies: 2 comments 4 replies
-
optional arguments default to the value
then you can call it with
or
|
Beta Was this translation helpful? Give feedback.
1 reply
-
how would I write an if statement in eww then? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The documentation for EWW expressions is a little sparse, so I had some questions for you here if this is the place to ask them.
I have a widget with an optional attribute. Based on whether or not the attirubute is defined, I'd like the widget to include one of two different other widgets. But code speaks louder than words, so here's a relevant snippet of my
eww.yuck
:EWW doesn't throw any errors, but this code doesn't produce what I'm expecting.
The widget
main
is produced, and I can see thegroup_left
widget with its nesteddashboard
widget, butgroup_left
is not includingworkspaces_alt
orworkspaces
. It doesn't matter whether I define the attributesecond_monitor
or not when I create themain
widget.I suppose my primary question regards this line:
Is this the correct way to do what I want? I want to check whether an attribute is defined or not, and depending on that, I want to include a different widget.
Beta Was this translation helpful? Give feedback.
All reactions