rxhanson / Rectangle

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

Config export ordering is non-deterministic #1468

Open injust opened 1 week ago

injust commented 1 week ago

macOS version: Sequoia 15.0 Rectangle version: v0.83 (89)

When exporting Rectangle's config, the order of the values in defaults.landscapeSnapAreas.string seems to be non-deterministic.

This is a bit confusing if you diff the file. Is it possible to make the order of the output consistent?

injust commented 1 week ago

An example diff:

diff --git i/RectangleConfig.json w/RectangleConfig.json
index d84dc1a..9d6da8f 100644
--- i/RectangleConfig.json
+++ w/RectangleConfig.json
@@ -104,7 +104,7 @@
       "int" : 0
     },
     "landscapeSnapAreas" : {
-      "string" : "[6,{\"action\":13},7,{\"compound\":-4},4,{\"compound\":-2},1,{\"action\":15},8,{\"action\":14},3,{\"action\":16},5,{\"compound\":-3}]"
+      "string" : "[3,{\"action\":16},5,{\"compound\":-3},4,{\"compound\":-2},6,{\"action\":13},8,{\"action\":14},1,{\"action\":15},7,{\"compound\":-4}]"
     },
     "launchOnLogin" : {
       "bool" : true