Skip to content

Instantly share code, notes, and snippets.

Avatar

Brett Gutstein brettferdosi

View GitHub Profile
@brettferdosi
brettferdosi / sidebarconfig.scpt
Created Jul 1, 2020
applescript to configure finder sidebar in catalina - RIP sfltool
View sidebarconfig.scpt
set sidebarItems to {"Applications", "Desktop", "Documents", "Downloads", "External disks", "CDs, DVDs, and iOS Devices", "Bonjour computers", "Connected servers"}
tell application "System Events"
tell process "Finder"
set frontmost to true
keystroke "," using {command down}
repeat while not (exists of window "Finder Preferences")
delay 0.1
end repeat
click button "Sidebar" of toolbar 1 of window "Finder Preferences"
set everyCheckbox to a reference to every checkbox of window "Finder Preferences"