How can I programmatically add a space to mission control?

扶醉桌前 提交于 2019-11-30 17:20:44
Vighnesh Pai

There is on preference plist in ~/Library/Preferences path named as com.apple.spaces.plist.

There You have to add two keys.

Open the plist and I hope you will get to know it.

From the GUI...

...just in case someone finds this via Google

It’s a cinch: when you’re in Mission Control...

  1. move your cursor to the upper right corner of the screen
  2. click the New Desktop tab that slides out from the edge of the screen

Note:If your Dock is on the right, you can access the New Desktop tab from the upper left corner instead.

In Mavericks, Applescript to create a new Space in Mission Control

delay 0.5 -- time to release command if the script is run with command-R
tell application "System Events"
    key code 126 using control down -- control-up
    delay 1
    do shell script "MouseTools -x 1900 -y 60;sleep 1;MouseTools -leftClickNoRelease;MouseTools -releaseMouse"
    key code 53 -- escape
end tell
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!