{"id":19492471,"url":"https://github.com/mrkai77/dynamicnotchkit","last_synced_at":"2025-04-04T10:02:28.913Z","repository":{"id":232301623,"uuid":"683238004","full_name":"MrKai77/DynamicNotchKit","owner":"MrKai77","description":"Seamlessly adapt your macOS app to the notch era.","archived":false,"fork":false,"pushed_at":"2025-03-27T09:32:15.000Z","size":30520,"stargazers_count":216,"open_issues_count":3,"forks_count":16,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-03T14:18:27.407Z","etag":null,"topics":["dynamic-notch","macos","notch","package","swift","swift-package","swiftui","user-interface"],"latest_commit_sha":null,"homepage":"","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/MrKai77.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,"publiccode":null,"codemeta":null}},"created_at":"2023-08-26T00:13:54.000Z","updated_at":"2025-04-02T12:18:30.000Z","dependencies_parsed_at":"2024-10-17T09:12:48.076Z","dependency_job_id":"2b13ba6a-ca99-4a8b-813d-88f0a6c021b7","html_url":"https://github.com/MrKai77/DynamicNotchKit","commit_stats":{"total_commits":66,"total_committers":6,"mean_commits":11.0,"dds":"0.36363636363636365","last_synced_commit":"0f2213c671585db887f53e86812134a7a6cc74e5"},"previous_names":["mrkai77/dynamicnotchkit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrKai77%2FDynamicNotchKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrKai77%2FDynamicNotchKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrKai77%2FDynamicNotchKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrKai77%2FDynamicNotchKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrKai77","download_url":"https://codeload.github.com/MrKai77/DynamicNotchKit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149510,"owners_count":20891954,"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":["dynamic-notch","macos","notch","package","swift","swift-package","swiftui","user-interface"],"created_at":"2024-11-10T21:21:17.546Z","updated_at":"2025-04-04T10:02:28.857Z","avatar_url":"https://github.com/MrKai77.png","language":"Swift","readme":"# DynamicNotchKit\n\n## Examples:\n\n| \u003cimg src=\"media/output-device.gif\" width=\"100%\"/\u003e | \u003cimg src=\"media/battery.gif\" width=\"100%\"/\u003e |\n| -------- | ------- |\n| \u003cimg src=\"media/info-panel.png\" width=\"100%\"/\u003e  | \u003cimg src=\"media/window-management.gif\" width=\"100%\"/\u003e |\n\n## Installation\n\nCompatibility: **macOS 12+**\n\nAdd `https://github.com/MrKai77/DynamicNotchKit` in the [“Swift Package Manager” tab in Xcode](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app).\n\n## Usage\n\nIt's really easy! All the UI is handled by SwiftUI. That means, that you can use your existing views *directly* in DynamicNotchKit!\n\nHere's an example:\n```swift\nlet dynamicNotch = DynamicNotch {\n    ContentView()\n}\ndynamicNotch.show(for: 2)\n```\n\nWhere `ContentView` is a View.\n\nNotice the `show(for: 2)`. This will cause the popover to be displayed on the primary screen for two seconds before hiding itself automatically.\nThe available methods to set the DynamicNotch's visibility are:\n- `show(on screen: NSScreen = NSScreen.screens[0], for time: Double = 0)`\n- `hide()`\n- `toggle()`\n\nDynamicNotchKit also supports Macs without a notch, meaning that this package supports _all_ Mac styles! You will see an example of that below.\n\n## DynamicNotchInfo\n\nIn addition, there is also a `DynamicNotchInfo`, which is a fine-tuned version of the DynamicNotch specifically tailored to show general information:\n```swift\nlet notch = DynamicNotchInfo(\n    icon: Image(systemName: \"figure\"),\n    title: \"Figure\",\n    description: \"Looks like a person\"\n)\nnotch.show(for: 2)\n```\n\nThis will result in a popover as so:\n\n\u003cimg src=\"media/demo.gif\" width=\"50%\"/\u003e\n\nFurthermore, there is a `.floating` style, which will **automatically** be used on Macs without a notch:\n\n\u003cimg src=\"media/demo-floating.gif\" width=\"50%\"/\u003e\n\nIn fact, `DynamicNotchInfo` was used 3/4 of the examples above :D\n\nAnyways, there are more methods available, which I haven't listed here, as this package is still in development. I have also added much more detailed documentation to each available public method in the code, so if you are curious, please check there for more usage information!\n\n...I'm probably going to improve these docs later :)\n\nFeel free to ask questions/report issues in the Issues tab!\n\n# License\n\nThis project is licensed under the [MIT license](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrkai77%2Fdynamicnotchkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrkai77%2Fdynamicnotchkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrkai77%2Fdynamicnotchkit/lists"}