kkga / nibar

Simple Übersicht status bar with yabai support.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Performance of AppleScript Ubersicht refresh

camspiers opened this issue · comments

I found that the refresh of widgets via AppleScript was too slow. It turns out it was quite an effort to do it another way, but I came up with a solution that you might be interested in:

https://github.com/camspiers/dotfiles/tree/master/files/.config/ubersicht

New program to get active space changes from stdout:

https://github.com/camspiers/dotfiles/blob/master/files/.config/ubersicht/activespace.swift

Build step:

https://github.com/camspiers/dotfiles/blob/master/Makefile#L18

SSE server for delivering SSE's to Ubersicjt widgets:

https://github.com/camspiers/dotfiles/blob/master/files/.config/ubersicht/lib/activeSpaceServer.js

Subscription to it from a widget:

https://github.com/camspiers/dotfiles/blob/master/files/.config/ubersicht/left.jsx#L43