-
i have these deflisten vars: (deflisten current_workspace :initial "000" (defwidget workspaces []
When i run this, current_workspace is never changed from it's initial value. In fact, the scripts/gaw.sh is never run (I echo the time to a file to verify this). However if I change the for loop to this:
It does run and the variable is updated properly. So something about iterating over workspaces causes current_workspace variable not to be updated. workspaces is a json and works fine when I access the fields (workspaces.id). Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
After some more digging, I was able to find that this is a eww bug: The problem is that workspaces is set to an initial value of "[]", so I guess eww determines incorrectly that the for loop body will never be executed. So it determines there is no need to run the script to update current_workspace. A fix was to set the initial value of workspaces to "[1]" rather than empty. |
Beta Was this translation helpful? Give feedback.
After some more digging, I was able to find that this is a eww bug:
#922
The problem is that workspaces is set to an initial value of "[]", so I guess eww determines incorrectly that the for loop body will never be executed. So it determines there is no need to run the script to update current_workspace. A fix was to set the initial value of workspaces to "[1]" rather than empty.