Closed realhackcraft closed 3 months ago
It is not sketchybar or SbarLua that prints this: could not retrieve window details.
. I believe it is returned from some yabai command you are issuing in these events.
Yes, I am using sbar.exec, and I did confirm that running the yabai script without a window focused prints that line.
But why is this printed on stdout when I run yabai? Isn't the output of the yabai command supposed to go to the callback function I have to sbar.exec?
Is there a way to run the function even when the script fails?
I read in another issue that if the command doesn't return anything, it won't run the function. It can be fixed by adding " && echo 1", but in my case it won't work because I need to no window focus and run code different from if a window has focus.
If that's not possible, I'll have to switch back to my bash config.
Should be possible with current commit.
Problem
When using
front_app_switched
orspace_change
, they will outputcould not retrieve window details.
if I switch to a empty space without window. This stops the supplied function from running. This differs from the bash config, where it will still run the bash script and make$INFO=
.I think the behavior with bash is better, because in my case I'm getting the focused window title using yabai.
Solution
Run the function in
sbar.subscribe
even when there are no window currently focused, and setenv.INFO
to nil.