{"id":22427566,"url":"https://github.com/inket/mbpopup","last_synced_at":"2025-06-10T14:09:51.653Z","repository":{"id":56920180,"uuid":"66533474","full_name":"inket/MBPopup","owner":"inket","description":"macOS status bar popups done right 😎","archived":false,"fork":false,"pushed_at":"2023-07-08T04:04:02.000Z","size":107,"stargazers_count":112,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-10T12:56:32.642Z","etag":null,"topics":["carthage","cocoapods","framework","macos","popup","status-bar","swift"],"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/inket.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}},"created_at":"2016-08-25T06:59:24.000Z","updated_at":"2025-03-29T02:39:43.000Z","dependencies_parsed_at":"2022-08-21T04:20:26.612Z","dependency_job_id":null,"html_url":"https://github.com/inket/MBPopup","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inket%2FMBPopup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inket%2FMBPopup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inket%2FMBPopup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inket%2FMBPopup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inket","download_url":"https://codeload.github.com/inket/MBPopup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inket%2FMBPopup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259089057,"owners_count":22803670,"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":["carthage","cocoapods","framework","macos","popup","status-bar","swift"],"created_at":"2024-12-05T20:12:18.830Z","updated_at":"2025-06-10T14:09:51.602Z","avatar_url":"https://github.com/inket.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"## MBPopup\n![](https://img.shields.io/badge/Swift-5.8-orange.svg) ![](https://img.shields.io/badge/SwiftPM-supported-brightgreen.svg)\n\nMBPopup is a macOS framework for easily adding a customizable status bar popup to your apps.\n\nMBPopup is based on [Popup by shpakovski](https://github.com/shpakovski/Popup),\nafter it had been used in [HAPU](https://mahdi.jp/apps/hapu) for 3+ years and incrementally improved on,\nand is now rewritten for Swift and improved for the Swift era.\n\nMore importantly, multiple parts have been rewritten in order to replicate the behavior of system menu bar items:\n- Opens with the right event\n- Closes on escape\n- Allows peeking (hold click to open then release to close)\n- Opens in the correct screen when clicked from a different (in)active screen\n- Changes focus as expected\n- etc.\n\nWhile also,\n- Reacting to Auto Layout constraints as expected\n- Providing callbacks for user actions\n- Allowing for different states when modifier keys are used\n\nMBPopup is App Store-approved and is currently being used in the app [stts](https://itunes.apple.com/app/stts/id1187772509?ls=1\u0026mt=12):\n\n\u003cimg src=\"https://i.imgur.com/OAK3hR0.png\" width=\"218\" height=\"324\" /\u003e\n\n\n### Usage\n\n(For more examples, check the __Example__ project, or [stts' source](https://github.com/inket/stts))\n\n1. Add MBPopup via Swift Package Manager\n\n2. Use MBPopup in your app:\n\n```swift\nimport MBPopup\n\nlet myView = NSView(frame: CGRect(x: 0, y: 0, width: 200, height: 300))\nlet popupController = MBPopupController(contentView: myView)\n\n// Use popupController.statusItem to customize the NSStatusItem, set a title or an image\npopupController.statusItem.button?.title = \"Test\"\npopupController.statusItem.length = 70\n\n// Use popupController.backgroundView to customize the popup's background\npopupController.backgroundView.backgroundColor = NSColor.windowBackgroundColor // Default value\n\n// Customize animations, view sizes\npopupController.openDuration = 0.15 // Default value\npopupController.closeDuration = 0.2 // Default value\npopupController.arrowSize = CGSize(width: 12, height: 8) // Default value\npopupController.contentInset = 1 // Default value\n\n// Use callbacks to user actions (optional)\npopupController.shouldOpenPopup = { keys in return true }\npopupController.willOpenPopup = { keys in debugPrint(\"Will open popup!\") }\npopupController.didOpenPopup = { debugPrint(\"Opened popup!\") }\npopupController.willClosePopup = { debugPrint(\"Will close popup!\") }\npopupController.didClosePopup = { debugPrint(\"Closed popup!\") }\n\n// Resize your popup to your liking\npopupController.resizePopup(width: 300, height: 400)\n```\n\n#### Contact\n\n[@inket](https://github.com/inket) / [@inket](https://mastodon.social/inket) on Mastodon / [mahdi.jp](https://mahdi.jp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finket%2Fmbpopup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finket%2Fmbpopup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finket%2Fmbpopup/lists"}