{"id":29533586,"url":"https://github.com/freethinkel/tauri-nspopover-plugin","last_synced_at":"2026-02-12T18:10:51.021Z","repository":{"id":219073795,"uuid":"747116012","full_name":"freethinkel/tauri-nspopover-plugin","owner":"freethinkel","description":"NSPopover plugin for tauri","archived":false,"fork":false,"pushed_at":"2026-01-15T13:50:21.000Z","size":1420,"stargazers_count":137,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-15T17:45:58.748Z","etag":null,"topics":["cargo","macos","menu","menuapp","nspopover","popover","rust","statusbar","tauri"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/freethinkel.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,"zenodo":null}},"created_at":"2024-01-23T09:49:42.000Z","updated_at":"2026-01-15T13:50:26.000Z","dependencies_parsed_at":"2024-04-08T07:42:09.104Z","dependency_job_id":"10707f66-8655-41cc-9d20-9ce8b18b15d4","html_url":"https://github.com/freethinkel/tauri-nspopover-plugin","commit_stats":null,"previous_names":["freethinkel/tauri-nspopover-plugin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/freethinkel/tauri-nspopover-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freethinkel%2Ftauri-nspopover-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freethinkel%2Ftauri-nspopover-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freethinkel%2Ftauri-nspopover-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freethinkel%2Ftauri-nspopover-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freethinkel","download_url":"https://codeload.github.com/freethinkel/tauri-nspopover-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freethinkel%2Ftauri-nspopover-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29375803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cargo","macos","menu","menuapp","nspopover","popover","rust","statusbar","tauri"],"created_at":"2025-07-17T00:01:51.521Z","updated_at":"2026-02-12T18:10:51.016Z","avatar_url":"https://github.com/freethinkel.png","language":"Rust","funding_links":[],"categories":["Development"],"sub_categories":["Plugins"],"readme":"# Tauri Plugin NSpopover\n\nOnly for MacOS\n\n\u003cdiv style=\"display: flex; justify-content: center;\"\u003e\n  \u003cimg src=\"./screenshots/example.png\" width=\"300\"/\u003e\n\u003c/div\u003e\n\n## Install\n\n```toml\n# Cargo.toml\n[dependencies]\ntauri-plugin-nspopover = { git = \"https://github.com/freethinkel/tauri-nspopover-plugin.git\", version = \"4.0.1\" }\n```\n\n```json\n// package.json\n\"dependencies\": {\n  \"tauri-plugin-nspopover\": \"git+https://github.com/freethinkel/tauri-nspopover-plugin\"\n}\n```\n\n## Usage\n\n```rust\n// main.rs\nuse tauri::{ActivationPolicy, Manager};\nuse tauri_plugin_nspopover::{AppExt, ToPopoverOptions, WindowExt};\n\nfn main() {\n    tauri::Builder::default()\n        .setup(|app| {\n          app.set_activation_policy(ActivationPolicy::Accessory);\n          let window = app.handle().get_webview_window(\"main\").unwrap();\n\n          window.to_popover(ToPopoverOptions {\n            is_fullsize_content: true,\n          });\n\n          Ok(())\n        })\n        .plugin(tauri_plugin_nspopover::init())\n        .run(tauri::generate_context!())\n        .expect(\"error while running tauri application\");\n}\n```\n\n```ts\n// main.ts\nimport { TrayIcon } from \"@tauri-apps/api/tray\";\nimport { isOpen, show, hide } from \"tauri-plugin-nspopover\";\n\nTrayIcon.new({\n  id: \"main\",\n  async action(event) {\n    console.log(event);\n    if (\n      event.type === \"Click\" \u0026\u0026\n      event.buttonState === \"Up\" \u0026\u0026\n      event.button === \"Left\"\n    ) {\n      const isShown = await isOpen();\n\n      if (isShown) {\n        hide();\n      } else {\n        show();\n      }\n    }\n  },\n});\n```\n\nOR you can use rust api\n\n```rust\nfn main() {\n    tauri::Builder::default()\n        .plugin(tauri_plugin_shell::init())\n        .plugin(tauri_plugin_nspopover::init())\n        .setup(|app| {\n          app.set_activation_policy(ActivationPolicy::Accessory);\n          let window = app.handle().get_webview_window(\"main\").unwrap();\n          window.to_popover(ToPopoverOptions {\n              is_fullsize_content: true,\n          });\n\n          let tray = app.tray_by_id(\"main\").unwrap();\n          let handle = app.handle().clone();\n\n          tray.on_tray_icon_event(move |_, event| match event {\n              TrayIconEvent::Click {\n                  button,\n                  button_state,\n                  ..\n              } =\u003e {\n                  if button == MouseButton::Left \u0026\u0026 button_state == MouseButtonState::Up {\n                      if !handle.is_popover_shown() {\n                          handle.show_popover();\n                      } else {\n                          handle.hide_popover();\n                      }\n                  }\n              }\n              _ =\u003e {}\n          });\n\n          Ok(())\n        })\n        .run(tauri::generate_context!())\n        .expect(\"error while running tauri application\");\n}\n```\n\n```json\n// tauri.config.json\n\"systemTray\": {\n  \"iconPath\": \"icons/statusbar-icon.png\",\n  \"iconAsTemplate\": true,\n  \"id\": \"main\"\n},\n...\n\"windows\": [\n  {\n    \"fullscreen\": false,\n    \"visible\": false,\n    \"title\": \"example\",\n    \"width\": 300,\n    \"height\": 450,\n    \"transparent\": true\n  }\n]\n```\n\n## Permissions\n\nDon't forget to add the necessary permissions to your `src-tauri/capabilities/default.json` file.\n\n```json\n...\n  \"nspopover:allow-show-popover\",\n  \"nspopover:allow-hide-popover\",\n  \"nspopover:allow-is-popover-shown\",\n  \"core:tray:allow-new\",\n  \"core:tray:default\"\n...\n```\n\n## Example\n\n```sh\ngit clone https://github.com/freethinkel/tauri-plugin-nspopover\ncd tauri-plugin-nspopover/example\npnpm install\npnpm tauri dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreethinkel%2Ftauri-nspopover-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreethinkel%2Ftauri-nspopover-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreethinkel%2Ftauri-nspopover-plugin/lists"}