Skip to content

Commit 578dc84

Browse files
authored
Merge pull request #22 from homebysix/1.0.4
v1.0.4 merge to master
2 parents 79d3bb2 + 63bdeb5 commit 578dc84

2 files changed

Lines changed: 37 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
All 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

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,29 @@ for item in tech_dock:
130130
dock.items["persistent-apps"].append(item)
131131
dock.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+

0 commit comments

Comments
 (0)