Skip to content

Instantly share code, notes, and snippets.

@zackn9ne
Last active February 26, 2019 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zackn9ne/8183cd12667fb04a24972649685ec9a1 to your computer and use it in GitHub Desktop.
Save zackn9ne/8183cd12667fb04a24972649685ec9a1 to your computer and use it in GitHub Desktop.
# includes eraseDock function in case you mess up
import os
from docklib import Dock
def makeDock():
tech_dock = [
'/Applications/Google Chrome.app',
'/Applications/Microsoft Excel.app',
'/Applications/Microsoft Word.app',
'/Applications/Microsoft PowerPoint.app',
'/Applications/Slack.app'
]
dock = Dock()
for item in tech_dock:
if os.path.exists(item):
item = dock.makeDockAppEntry(item)
dock.items['persistent-apps'].append(item)
dock.save()
makeDock()
def eraseDock():
tech_dock = [
'Google Chrome',
'Microsoft Excel',
'Microsoft Word',
'Microsoft PowerPoint',
'Slack'
]
dock = Dock()
for item in tech_dock:
item = dock.removeDockEntry(item)
dock.save()
#eraseDock()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment