Last active
February 26, 2019 20:23
-
-
Save zackn9ne/8183cd12667fb04a24972649685ec9a1 to your computer and use it in GitHub Desktop.
dock creation mode ON 🛢️ dependancy: https://raw.githubusercontent.com/homebysix/docklib/4f3e173367f24b034c60092472c9523d8c7ddfca/docklib.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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