Closed bin101 closed 1 year ago
I think it should be fixed on master.
Now I get the event sometimes but not very reliable.
I use your dotfiles nearly in original state and added the space change
event to the yabai.sh
:
case "$SENDER" in
"mouse.clicked") mouse_clicked
;;
"forced") exit 0
;;
"window_focus") window_state
;;
"windows_on_spaces" | "space_change") windows_on_spaces && echo "test"
;;
esac
You can either count the test
string output or see if the browser icon returns to the last active desktop after leaving the fullscreen mode
Edit: After starting but before stopping the fullscreen mode of youtube I heavily switch between desktop. This will reliable not return the browser icon to the source desktop.
Just to be extra sure about it:
1) You have added the event to the yabai item in item/front_app.sh
like this:
--subscribe yabai window_focus \
space_change \
windows_on_spaces \
mouse.clicked \
2) You have installed the HEAD version of sketchybar:
brew uninstall sketchybar
brew install sketchybar --head
3) You use Safari
Because with all of these things fulfilled I can't seem to reproduce.
My result with Chrome:
Are you able to reproduce the problem with Safari in native fullscreen mode? Because in native fullscreen mode Safari will leave the current space and when exiting fullscreen it should return to the previous desktop.
By native you mean the fullscreen (green) icon on the window bar? Yes:
What I did:
I know this is not productive but here is a screen capture of me trying to reproduce the issue:
It may be a race condition between the event happening in sketchybar and in yabai, but I think realistically the script execution delay should be large enough for this to not really be relevant.
Could you try with my exact dotfiles with the only difference being the space_change event in yabai.sh?
I used your Sketchybar and Yabai plain dotfiles and they behave way differently than on your machine:
I am using a M2 Air with Ventura 13.2.1 maybe it's hardware/software related?
I think this is purely related to the yabai.sh script not being registered properly to the space_change event, I think I will register the windows_on_spaces function for space_change as well later today, so you can try with my later update.
The space_change event is actually performed, as you can clearly see by the space indicators of space 5. If the space_change event would not work it would not create/destroy the indicator of space 5.
In my own dotfiles I already had the space_change
event registered inside yabai.sh
, but I will test your dotfiles again with it.
After returning from a fullscreen window, i.e. after pressing f on a fullscreen youtube video or on the window bar doesn't seem to trigger the
space_change
event.