{"id":15013093,"url":"https://github.com/tauri-apps/tauri-plugin-positioner","last_synced_at":"2025-04-06T20:12:33.487Z","repository":{"id":37021563,"uuid":"429534938","full_name":"tauri-apps/tauri-plugin-positioner","owner":"tauri-apps","description":"[READ ONLY] This repository is a mirror, for issue tracking and development head to: https://github.com/tauri-apps/plugins-workspace","archived":false,"fork":false,"pushed_at":"2024-10-20T11:55:25.000Z","size":1338,"stargazers_count":92,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"v1","last_synced_at":"2024-10-29T15:44:09.309Z","etag":null,"topics":["javascript","rust","tauri","tauri-apps","tauri-plugin","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/tauri-apps/plugins-workspace","language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tauri-apps.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.spdx","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},"funding":{"github":["JonasKruckenberg"],"open_collective":null,"custom":["https://paypal.me/jonaskruckie"]}},"created_at":"2021-11-18T18:19:27.000Z","updated_at":"2024-10-12T01:12:13.000Z","dependencies_parsed_at":"2023-12-08T18:42:24.959Z","dependency_job_id":"86729bdf-d91d-4c71-9aaa-cc218ecfb1c0","html_url":"https://github.com/tauri-apps/tauri-plugin-positioner","commit_stats":{"total_commits":25,"total_committers":4,"mean_commits":6.25,"dds":0.4,"last_synced_commit":"45525380c428750eb6baf14808cae58ff5ec64ca"},"previous_names":["jonaskruckenberg/tauri-plugin-positioner"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Ftauri-plugin-positioner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Ftauri-plugin-positioner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Ftauri-plugin-positioner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Ftauri-plugin-positioner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tauri-apps","download_url":"https://codeload.github.com/tauri-apps/tauri-plugin-positioner/tar.gz/refs/heads/v1","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353729,"owners_count":20925329,"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":["javascript","rust","tauri","tauri-apps","tauri-plugin","typescript"],"created_at":"2024-09-24T19:43:43.937Z","updated_at":"2025-04-06T20:12:33.469Z","avatar_url":"https://github.com/tauri-apps.png","language":"Rust","funding_links":["https://github.com/sponsors/JonasKruckenberg","https://paypal.me/jonaskruckie","https://opencollective.com/tauri"],"categories":[],"sub_categories":[],"readme":"![plugin-positioner](https://github.com/tauri-apps/plugins-workspace/raw/v1/plugins/positioner/banner.png)\n\nPosition your windows at well-known locations.\n\nThis plugin is a port of [electron-positioner](https://github.com/jenslind/electron-positioner) for Tauri.\n\n## Install\n\n_This plugin requires a Rust version of at least **1.67**_\n\nThere are three general methods of installation that we can recommend.\n\n1. Use crates.io and npm (easiest, and requires you to trust that our publishing pipeline worked)\n2. Pull sources directly from Github using git tags / revision hashes (most secure)\n3. Git submodule install this repo in your tauri project and then use file protocol to ingest the source (most secure, but inconvenient to use)\n\nInstall the Core plugin by adding the following to your `Cargo.toml` file:\n\n`src-tauri/Cargo.toml`\n\n```toml\n[dependencies]\ntauri-plugin-positioner = \"1.0\"\n# or through git\ntauri-plugin-positioner = { git = \"https://github.com/tauri-apps/plugins-workspace\", branch = \"v1\" }\n```\n\nYou can install the JavaScript Guest bindings using your preferred JavaScript package manager:\n\n\u003e Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.\n\n```sh\npnpm add tauri-plugin-positioner-api\n# or\nnpm add tauri-plugin-positioner-api\n# or\nyarn add tauri-plugin-positioner-api\n```\n\nOr through git:\n\n```sh\npnpm add https://github.com/tauri-apps/tauri-plugin-positioner#v1\n# or\nnpm add https://github.com/tauri-apps/tauri-plugin-positioner#v1\n# or\nyarn add https://github.com/tauri-apps/tauri-plugin-positioner#v1\n```\n\n## Usage\n\nFirst you need to register the core plugin with Tauri:\n\n`src-tauri/src/main.rs`\n\n```rust\nfn main() {\n    tauri::Builder::default()\n        .plugin(tauri_plugin_positioner::init())\n        // This is required to get tray-relative positions to work\n        .on_system_tray_event(|app, event| {\n           tauri_plugin_positioner::on_tray_event(app, \u0026event);\n        })\n        .run(tauri::generate_context!())\n        .expect(\"error while running tauri application\");\n}\n```\n\nAfterwards all the plugin's APIs are available through the JavaScript guest bindings:\n\n```javascript\nimport { move_window, Position } from \"tauri-plugin-positioner-api\";\n\nmove_window(Position.TopRight);\n```\n\nIf you only intend on moving the window from rust code, you can import the Window trait extension instead of registering the plugin:\n\n```rust\nuse tauri_plugin_positioner::{WindowExt, Position};\n\nlet mut win = app.get_window(\"main\").unwrap();\nlet _ = win.move_window(Position::TopRight);\n```\n\n## Contributing\n\nPRs accepted. Please make sure to read the Contributing Guide before making a pull request.\n\n## Partners\n\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"middle\"\u003e\n        \u003ca href=\"https://crabnebula.dev\" target=\"_blank\"\u003e\n          \u003cimg src=\"https://github.com/tauri-apps/plugins-workspace/raw/v1/.github/sponsors/crabnebula.svg\" alt=\"CrabNebula\" width=\"283\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\nFor the complete list of sponsors please visit our [website](https://tauri.app#sponsors) and [Open Collective](https://opencollective.com/tauri).\n\n## License\n\nCode: (c) 2021 - Jonas Kruckenberg. 2021 - Present - The Tauri Programme within The Commons Conservancy.\n\nMIT or MIT/Apache 2.0 where applicable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftauri-apps%2Ftauri-plugin-positioner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftauri-apps%2Ftauri-plugin-positioner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftauri-apps%2Ftauri-plugin-positioner/lists"}