rxhanson / Rectangle

Move and resize windows on macOS with keyboard shortcuts and snap areas
https://rectangleapp.com
Other
25.9k stars 778 forks source link

After load of `~/Library/Application Support/Rectangle/RectangleConfig.json` JSON is moved? #892

Closed magnetikonline closed 2 years ago

magnetikonline commented 2 years ago

macOS version: 12.5.1 (21G83) Rectangle version: v0.58 Logs if applicable (In Rectangle menu, hold option, "View Logging..."):

I thought this was a bug:

Felt this was a bug, but looking at the code - it's intended design?

https://github.com/rxhanson/Rectangle/blob/bf967a7e05d47d6edfeb93f23c93c7b7e2d0d244/Rectangle/PrefsWindow/Config.swift#L74-L96

Problem is - another restart of Rectangle, my JSON config is no longer found/loaded.

Maybe it's just me, but this seems the wrong way around and/or not actually required?

rxhanson commented 2 years ago

This is to avoid writing the json out every time a change to the config is made. I wanted to get a first cut out the door, and if anyone wants to take it a step further, there's already a good starting point.