-
-
Notifications
You must be signed in to change notification settings - Fork 301
Description
It should be possible to subscribe to AeroSpace callbacks via socket API without modifying the config
It should also be possible to receive callbacks for keyboard/mouse events (see use case 2. below)
Use cases
- Zero-configuration bars. E.g. barik Improving perfomance when working WM mocki-toki/barik#47 (comment)
- Combined with Dynamically update config via cli #1515 + keyboard/mouse-event callbacks, it becomes possible to implement third-party configuration in whatever scripting language users prefer it outside AeroSpace (e.g. Lua Feature Request: Embedded script language #622)
Alternatives
DistributedNotificationCenter.default().postNotificationName
.
Pros: uniform macos eventbus notification framework across different apps
Cons: proprietary Apple API (much more likely to break than sockets)
It's not a final decision, but still prefer the socket approach, at least for uniformity
Dependencies
This issue depends on:
- Make the socket protocol public Make socket protocol/API public #1513
Open questions
The details of the protocol and how third-party app can subscribe to the events is an open question (should AeroSpace create separate sockets for each type of event? Or maybe socket files should be created by requests? e.g. aerospace create-notif-socket
)
Related
- Dynamically updating config can theoretically expose possibility to modify callbacks Dynamically update config via cli #1515 (I prefer sockets for that currently)