{"id":15033136,"url":"https://github.com/sindresorhus/dockprogress","last_synced_at":"2025-05-16T05:07:13.228Z","repository":{"id":40617398,"uuid":"123488065","full_name":"sindresorhus/DockProgress","owner":"sindresorhus","description":"Show progress in your app's Dock icon","archived":false,"fork":false,"pushed_at":"2024-03-30T15:35:52.000Z","size":3476,"stargazers_count":1301,"open_issues_count":3,"forks_count":59,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-05-15T03:21:16.211Z","etag":null,"topics":["dock","icon","macos","progress-bar","progress-circle","swift","swift-package"],"latest_commit_sha":null,"homepage":"https://swiftpackageindex.com/sindresorhus/DockProgress/documentation/dockprogress/dockprogress","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sindresorhus.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","buy_me_a_coffee":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2018-03-01T20:22:12.000Z","updated_at":"2025-05-12T16:00:13.000Z","dependencies_parsed_at":"2024-02-22T18:04:35.008Z","dependency_job_id":"11fbeda0-f990-4cf9-8f07-bdf8e890d995","html_url":"https://github.com/sindresorhus/DockProgress","commit_stats":{"total_commits":66,"total_committers":4,"mean_commits":16.5,"dds":0.06060606060606055,"last_synced_commit":"639ca66f19dda6f8bf73470f186447abb1a5a2a2"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2FDockProgress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2FDockProgress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2FDockProgress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2FDockProgress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/DockProgress/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471060,"owners_count":22076585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dock","icon","macos","progress-bar","progress-circle","swift","swift-package"],"created_at":"2024-09-24T20:20:12.658Z","updated_at":"2025-05-16T05:07:13.177Z","avatar_url":"https://github.com/sindresorhus.png","language":"Swift","readme":"# DockProgress\n\n\u003e Show progress in your app's Dock icon\n\n## Requirements\n\nmacOS 10.15+\n\n## Install\n\nAdd `https://github.com/sindresorhus/DockProgress` in the [“Swift Package Manager” tab in Xcode](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app).\n\n*Latest version: 4.3.1*\n\n## API\n\n[See the API docs.](https://swiftpackageindex.com/sindresorhus/DockProgress/documentation/dockprogress/dockprogress)\n\n## Usage\n\n### Manually set the progress\n\n```swift\nimport DockProgress\n\nfoo.onUpdate = { progress in\n\tDockProgress.progress = progress\n}\n```\n\n### Specify a [`Progress` instance](https://developer.apple.com/documentation/foundation/progress)\n\n```swift\nimport Foundation\nimport DockProgress\n\nlet progress = Progress(totalUnitCount: 1)\nprogress?.becomeCurrent(withPendingUnitCount: 1)\n\nDockProgress.progressInstance = progress\n```\n\nThe given `Progress` instance is weakly stored. It's up to you to retain it.\n\n## Styles\n\nIt comes with five styles. PR welcome for more.\n\nCheck out the example app in the Xcode project.\n\nYou can also draw a custom progress with `.custom(drawHandler: (_ rect: CGRect) -\u003e Void)`.\n\n### Bar\n\n![](screenshot-bar.gif)\n\n```swift\nimport DockProgress\n\nDockProgress.style = .bar\n```\n\nThis is the default.\n\n### Squircle\n\n\u003cimg src=\"screenshot-squircle.gif\" width=\"158\" height=\"158\"\u003e\n\n```swift\nimport DockProgress\n\nDockProgress.style = .squircle(color: .white.withAlphaComponent(0.5))\n```\n\nBy default, it should perfectly fit a macOS 11 and later icon, but there is an `inset` parameter if you need to make any adjustments.\n\n### Circle\n\n![](screenshot-circle.gif)\n\n```swift\nimport DockProgress\n\nDockProgress.style = .circle(radius: 55, color: .systemBlue)\n```\n\n### Badge\n\n![](screenshot-badge.gif)\n\n```swift\nimport DockProgress\n\nDockProgress.style = .badge(color: .systemBlue, badgeValue: { getDownloadCount() })\n```\n\nLarge `badgeValue` numbers will be written in kilo short notation, for example, `1012` → `1k`.\n\n**Note:** The `badgeValue` is not meant to be used as a numeric percentage. It's for things like count of downloads, number of files being converted, etc.\n\n### Pie\n\n\u003cimg src=\"screenshot-pie.gif\" width=\"150\" height=\"150\"\u003e\n\n```swift\nimport DockProgress\n\nDockProgress.style = .pie(color: .systemBlue)\n```\n\n## Related\n\n- [Defaults](https://github.com/sindresorhus/Defaults) - Swifty and modern UserDefaults\n- [KeyboardShortcuts](https://github.com/sindresorhus/KeyboardShortcuts) - Add user-customizable global keyboard shortcuts to your macOS app\n- [LaunchAtLogin](https://github.com/sindresorhus/LaunchAtLogin) - Add \"Launch at Login\" functionality to your macOS app\n- [More…](https://github.com/search?q=user%3Asindresorhus+language%3Aswift+archived%3Afalse\u0026type=repositories)\n","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://buymeacoffee.com/sindresorhus","https://sindresorhus.com/donate"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fdockprogress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fdockprogress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fdockprogress/lists"}