import "@johnlindquist/kit"
let visible = true
try{
let {stdout} = await exec(`defaults read com.apple.finder CreateDesktop`)
visible = stdout === 1
}catch{}
let command = `defaults ${visible ? "write" : "delete"} com.apple.finder CreateDesktop ${visible ? "-bool FALSE" : ""};killall Finder`
await exec(command)