Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

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

Executable modules

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.

Filename, size & hash SHA256 hash help File type Python version Upload date
mac-dock-2019.4.13.tar.gz (4.8 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page