Skip to content

Instantly share code, notes, and snippets.

View ekinolik's full-sized avatar

Eric Kinolik ekinolik

View GitHub Profile
@ekinolik
ekinolik / gist:ef18395b0ca60e7186623dea04d63a79
Last active October 6, 2022 15:20 — forked from cmackay/gist:5863257
AppleScript to save and restore window position and sizes.
-- allSettings is a list of records containing {width:? height:? apps:{{win:? name:? pos:? size:?},...}
-- for each display setup store the apps with each window and their associated position and size
property allSettings : {}
on run argv
-- if ran from the CLI, check if the "Save" or "Restore" argument was provided to bypass the prompt
if (count of argv) > 0 then
set myAction to item 1 of argv
else
set myAction to ""