AdamWagner / stackline

Visualize yabai window stacks on macOS. Works with yabai & hammerspoon.
956 stars 47 forks source link

Any reason not to deprecate support for ipc messages? #53

Closed AdamWagner closed 3 years ago

AdamWagner commented 3 years ago

The pattern below is repeated throughout the documentation:

Config values can be set using the hs CLI: hs -c "stackline.config:set('appearance.radius', 3)" … or the ipc port: echo ":appearance.radius:3 | hs -m stackline-config`

Both of these commands have the same effect – setting the apperance.radius to 3.

Benefit (?)

To my knowledge, the ipc port approach offers no real advantage.

The ipc port approach …

…than the hs CLI.

The only benefit I can think of is inertia; if some folks are already used to the ipc approach, or get/set config values in their yabairc using ipc (I doubt there are any/many), then I understand that it's preferable to not have to change these.

Cost

Support for the ipc approach accounts for more than 20% of lines in configmanager.lua.

Also, since it must parse strings, it is substantially more complicated than calling stackline.config:set(…) or stackline.config:toggle(…).

The ipc approach requires registering a local port and is not idempotent. This caused stackline to crash for at least one user (before a guard was added to prevent initializing stackline more than once).

Finally, supporting 2 (similar) ways to accomplish the same thing unnecessarily complicates the documentation.


So, if there are good reasons not to deprecate support for modifying config values via ipc… I'm not aware of them.

Does anyone feel strongly that modifying stackline config values via ipc should not be deprecated?

AdamWagner commented 3 years ago

@alin23 – curious to see if you think there's any reason to use ipc over the hs CLI directly?

alin23 commented 3 years ago

@AdamWagner Having two ways to do one thing is usually just adding confusion. Deprecating IPC support is a good idea 👌

AdamWagner commented 3 years ago

Thanks a lot ya'll! Since this has been open for two weeks without a single plea for keeping IPC support around… it seems safe to remove it and update the docs 😌️ … which I can probably complete in the next couple of weeks.