Closed TheSkyentist closed 5 months ago
Sadly, when changing the spaces layout with the mouse via mission control, there is no event emitted which we could use to detect that.
If however you change the layout via a shortcut using e.g. yabai, you could of course simply trigger the space_change
event manually in your hotkey handler along with the yabai command that actually moves the space. Something like
sketchybar --trigger space_change
Will forcefully emit the space change event for all spaces with the usual (and up-to-date)$INFO
payload.
Would it be possible to add an event for when spaces are rearranged? E.g. when the spaces are manually moved in the Mission Control view (or potentially with a key-binding). Ideally this would pass the same info as the
space_change
event. With a little pointing in the right direction I could try to implement this, but I am not the most proficient with C or interacting with macOS.Thanks!