You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- QUESTION: do I need to clean this up? If so, how?
-- Update stackline when switching spaces
-- NOTE: hs.spaces.watcher uses deprecated macos APIs, so this may break in an upcoming macos release
log.i(('hs.spaces.watcher -> changed to space %d'):format(spaceIdx))
stackline.forceRedraw=true-- force the next update cycle to redraw
stackline.queryWindowState:start()
stackline:refreshClickTracker()
end
):start() -- }}}
Why: It may be because hs.spaces.watcher() is using a macOS API that is deprecated since macOS 10.8. It always returns -1 as a space id to the callback on newer macOS versions[1].
Add the following in
~/.config/yabai/yabairc
:yabai -m signal --add event=space_changed action="hs -A -c 'stackline.manager:update({forceRedraw = true})'"
Optional — comment out these lines to avoid a double redraw:
stackline/stackline/stackline.lua
Lines 146 to 156 in 215b35d
Why: It may be because
hs.spaces.watcher()
is using a macOS API that is deprecated since macOS 10.8. It always returns-1
as a space id to the callback on newer macOS versions[1].See Hammerspoon/hammerspoon#3250
See #110 for another performance trick.
[1] Confirmed on macOS Monterey 12.4.
The text was updated successfully, but these errors were encountered: