FelixKratz / JankyBorders

A lightweight window border system for macOS
GNU General Public License v3.0
1k stars 18 forks source link

Feature Request: Query current parameters #30

Closed mizlan closed 8 months ago

mizlan commented 9 months ago

I don't know if this is easily added, but a way to query the current configuration (as a text dump) would be nice. E.g., I am currently writing a program which could be used to interactively change the borders configuration, such as + / - the width. But there is no good way to query the current width in order to write back a new width.

FelixKratz commented 9 months ago

Sure, this sounds like a good idea. I think it is relatively simple to add, we just need to add a possibility for a response message here: https://github.com/FelixKratz/JankyBorders/blob/74ccbf6094ad60862bd9b2488be84dc01c032b94/src/mach.c#L25-L52 (just as I have done it in sketchybar: https://github.com/FelixKratz/SketchyBar/blob/master/src/mach.c) and then can send the serialized configuration to the client, who requested it by issuing:

borders --query

or something similar.

Feel free to send a PR if you want to implement this yourself.

mizlan commented 9 months ago

Probably not going to implement this myself, just don't have the time. Leaving this open in case someone wants to try