File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33All notable changes to this project will be documented in this file. This project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
44
5- ## [ 1.0.4] - Unreleased
5+
6+ ## [ Unreleased]
7+
8+ Nothing yet.
9+
10+
11+ ## [ 1.0.4] - 2019-10-08
612
713### Fixed
814
@@ -53,5 +59,8 @@ All notable changes to this project will be documented in this file. This projec
5359- Initial release
5460
5561
56- [ Unreleased ] : https://github.com/homebysix/docklib/compare/v1.0.1...HEAD
62+ [ Unreleased ] : https://github.com/homebysix/docklib/compare/v1.0.4...HEAD
63+ [ 1.0.4 ] : https://github.com/homebysix/docklib/compare/v1.0.3...v1.0.4
64+ [ 1.0.3 ] : https://github.com/homebysix/docklib/compare/v1.0.2...v1.0.3
65+ [ 1.0.2 ] : https://github.com/homebysix/docklib/compare/v1.0.1...v1.0.2
5766[ 1.0.1 ] : https://github.com/homebysix/docklib/compare/v1.0.0...v1.0.1
Original file line number Diff line number Diff line change @@ -130,3 +130,29 @@ for item in tech_dock:
130130 dock.items[" persistent-apps" ].append(item)
131131dock.save()
132132```
133+
134+ Or if you prefer using a [ list comprehension] ( https://www.pythonforbeginners.com/basics/list-comprehensions-in-python ) :
135+
136+ ``` python
137+ import os
138+ from docklib import Dock
139+
140+ tech_dock = [
141+ " /Applications/Google Chrome.app" ,
142+ " /Applications/App Store.app" ,
143+ " /Applications/Managed Software Center.app" ,
144+ " /Applications/System Preferences.app" ,
145+ " /Applications/Utilities/Activity Monitor.app" ,
146+ " /Applications/Utilities/Console.app" ,
147+ " /Applications/Utilities/Disk Utility.app" ,
148+ " /Applications/Utilities/Migration Assistant.app" ,
149+ " /Applications/Utilities/Terminal.app" ,
150+ ]
151+ dock = Dock()
152+ dock.items[" persistent-apps" ] = [
153+ dock.makeDockAppEntry(item) for item in tech_dock if os.path.exists(item)
154+ ]
155+ dock.save()
156+ ```
157+
158+
You can’t perform that action at this time.
0 commit comments