Skip to content

Instantly share code, notes, and snippets.

@hechen
Created May 4, 2019 11:08
Show Gist options
  • Save hechen/187b8d1f5dea0cf6f43e301539720ab7 to your computer and use it in GitHub Desktop.
Save hechen/187b8d1f5dea0cf6f43e301539720ab7 to your computer and use it in GitHub Desktop.
toggleDock2
func toggleDock2(show: Bool) -> Bool {
 return show ? NSApp.setActivationPolicy(.regular) : NSApp.setActivationPolicy(.accessory)
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment