Skip to main content

MacOS Dock python interface

Project description


$ [sudo] pip install mac-dock
folder options
  • arrangement: 1 - name (default), 2 - added, 3 - modification, 4 - creation, 5 - kind
  • displayas: 1 - folder, 2 - stack (default)
  • showas: 1 - beep, 2 - grid, 3 - list, 4 - auto (default)


function __doc__ save Dock preferences


usage __doc__
python -m mac_dock.apps.add path ... add app to Dock
python -m mac_dock.apps.bundle print Dock apps bundles
python -m mac_dock.apps.label print Dock apps labels
python -m mac_dock.apps.path print Dock apps paths
python -m mac_dock.apps.rm path ... remove app from Dock
python -m mac_dock.files.add path ... add file to Dock
python -m mac_dock.files.label print Dock files labels
python -m mac_dock.files.path print Dock files paths
python -m mac_dock.files.rm path ... remove file from Dock
python -m mac_dock.folders.add path [options] add folder to Dock
python -m mac_dock.folders.label print Dock folders labels
python -m mac_dock.folders.path print Dock folders paths
python -m mac_dock.folders.rm path ... remove folder from Dock


>>> mac_dock.autohide=False
>>> mac_dock.tilesize=85
$ python -m mac_dock.apps.add "/Applications/" "/Applications/"
$ python -m mac_dock.apps.rm "/Applications/" "/Applications/"
$ python -m mac_dock.files.rm # rm all files from Dock
$ python -m mac_dock.files.add "path/to/run.command" "path/to/site.webloc"
$ python -m mac_dock.files.rm "path/to/run.command" "path/to/site.webloc"
$ python -m mac_dock.folders.add # rm all folders from Dock
$ python -m mac_dock.folders.add --arrangement=4 --displayas=1 --showas=1 ~/Downloads
$ python -m mac_dock.folders.add --arrangement=1 --displayas=2 --showas=2 ~/Desktop
$ python -m mac_dock.folders.rm ~/Desktop ~/Downloads
>>> mac_dock.apps.add(["/Applications/","/Applications/"])
>>> mac_dock.apps.rm(["/Applications/","/Applications/"])
>>> mac_dock.files.rm()  # rm all files from Dock
>>> mac_dock.files.add(["path/to/site.webloc"])
>>> mac_dock.files.rm(["path/to/site.webloc"])
>>> mac_dock.folders.rm()  # rm all folders from Dock
>>> mac_dock.folders.add("~/Downloads",arrangement=4, displayas=1, showas=1)
>>> mac_dock.folders.rm(["~/Downloads"])


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mac-dock-2019.3.22.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

mac_dock-2019.3.22-py2.py3-none-any.whl (104.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page