{"id":16322308,"url":"https://github.com/p-x9/pock-plugin-template","last_synced_at":"2025-05-14T13:32:44.144Z","repository":{"id":114894580,"uuid":"346402872","full_name":"p-x9/pock-plugin-template","owner":"p-x9","description":"Plugin templete for pock","archived":false,"fork":false,"pushed_at":"2021-03-18T18:01:59.000Z","size":53,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-17T03:44:36.628Z","etag":null,"topics":["pock"],"latest_commit_sha":null,"homepage":"https://github.com/pock/pock","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p-x9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2021-03-10T15:31:56.000Z","updated_at":"2025-01-01T19:49:57.000Z","dependencies_parsed_at":"2023-05-05T12:31:27.804Z","dependency_job_id":null,"html_url":"https://github.com/p-x9/pock-plugin-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-x9%2Fpock-plugin-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-x9%2Fpock-plugin-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-x9%2Fpock-plugin-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-x9%2Fpock-plugin-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p-x9","download_url":"https://codeload.github.com/p-x9/pock-plugin-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254150642,"owners_count":22023005,"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":["pock"],"created_at":"2024-10-10T22:50:32.654Z","updated_at":"2025-05-14T13:32:44.058Z","avatar_url":"https://github.com/p-x9.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Github issues](https://img.shields.io/github/issues/p-x9/pock-plugin-templete)](https://github.com/p-x9/pock-plugin-templete/issues)\n[![Github forks](https://img.shields.io/github/forks/p-x9/pock-plugin-templete)](https://github.com/p-x9/pock-plugin-templete/network/members)\n[![Github stars](https://img.shields.io/github/stars/p-x9/pock-plugin-templete)](https://github.com/p-x9/pock-plugin-templete/stargazers)\n[![Github top language](https://img.shields.io/github/languages/top/p-x9/pock-plugin-templete)](https://github.com/p-x9/pock-plugin-templete/)\n# Pock Plugin Templete\n\n## Usage\n1. `pod install` and open `xxx.xcworkspace` file.\n2. rename `SampleWidget` class to whatever you want. \n   If you have renamed it, you will also need to change the NSPrincipalClass part of the info.plist.\n3. Create the view you want to display.\n   (touch bar's height is 30point)\n4. Assign the instance of the view you want to display to the view property of the Widget class.\n   \n## Optional\n### Author name\nSet the developer's name to `PKWidgetAuthor` in `Info.plist`.\n![Author](resources/author.png)\n\n### Mouse Control\nConform the widget class to the `PKScreenEdgeMouseDelegate` protocol.\n```swift\n/// Mouse entered at location in the touch bar.\nfunc screenEdgeController(_ controller: PKScreenEdgeController, mouseEnteredAtLocation location: NSPoint, in view: NSView)\n\n/// Mouse did move at location in the touch bar.\nfunc screenEdgeController(_ controller: PKScreenEdgeController, mouseMovedAtLocation location: NSPoint, in view: NSView)\n\n///Mouse clicked at location in the touch bar.\nfunc screenEdgeController(_ controller: PKScreenEdgeController, mouseClickAtLocation location: NSPoint, in view: NSView)\n\n//Mouse exited the touch bar at location.\nfunc screenEdgeController(_ controller: PKScreenEdgeController, mouseExitedAtLocation location: NSPoint, in view: NSView)\n```\n\n## Preference View\nSet the preference viewController class's name to `PKWidgetPreferenceClas`s in `Info.plist`.\nViewController class must confirm to `PKWidgetPreference`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-x9%2Fpock-plugin-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp-x9%2Fpock-plugin-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-x9%2Fpock-plugin-template/lists"}