{"id":23045280,"url":"https://github.com/fronterior/electget","last_synced_at":"2025-08-14T23:31:41.426Z","repository":{"id":56841471,"uuid":"471806845","full_name":"fronterior/electget","owner":"fronterior","description":"Electron tools for creating Windows widgets that are fixed to desktop.","archived":false,"fork":false,"pushed_at":"2022-06-01T11:09:04.000Z","size":75,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T05:25:56.041Z","etag":null,"topics":["electron","macos","napi","node-ffi","windows"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/fronterior.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}},"created_at":"2022-03-19T20:35:53.000Z","updated_at":"2025-07-25T06:46:39.000Z","dependencies_parsed_at":"2022-08-29T12:51:09.450Z","dependency_job_id":null,"html_url":"https://github.com/fronterior/electget","commit_stats":null,"previous_names":["fronterior/electget","lowfront/electget"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fronterior/electget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fronterior%2Felectget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fronterior%2Felectget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fronterior%2Felectget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fronterior%2Felectget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fronterior","download_url":"https://codeload.github.com/fronterior/electget/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fronterior%2Felectget/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270499979,"owners_count":24595149,"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","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["electron","macos","napi","node-ffi","windows"],"created_at":"2024-12-15T21:19:26.911Z","updated_at":"2025-08-14T23:31:41.135Z","avatar_url":"https://github.com/fronterior.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Electget\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"electget\" src=\"https://raw.githubusercontent.com/lowfront/electget/master/logo.svg\" height=\"170px\" /\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n`Electron` tools for creating Windows widgets that are fixed to desktop. This package provides features for widget creation of your Electron application.\n\n- [Windows, macOS] Prevent `BrowserWindow` from being hidden in ShowDesktop.\n- [Windows] Prevent `BrowserWindow` from being minimized.\n- [Windows] Prevent `BrowserWindow` from being hidden in AeroPeek.\n- [Windows] Prevent changes in the `BrowserWindow` order.\n- [Windows] Move `BrowserWindow` to the bottom of the windows.\n\n## Install\n\nThis package uses `ffi-napi`, so you must meet the [ffi-napi requirements](https://github.com/node-ffi-napi/node-ffi-napi#installation) before installation.\n\n```\nnpm i electget\n```\n\n## Usage\n\nElectget is available in the Electron main process.\n\n```js\nimport electget from 'electget';\n\nfunction createWindow() {\n  const win = new BrowserWindow({\n    title: 'Electget Test',\n    height: 600,\n    width: 800,\n  });\n\n  loadWindow(win);\n\n  // [Windows] Prevent BrowserWindow from being hidden in AeroPeek.\n  electget.preventFromAeroPeek(win);\n\n  // [Windows, macOS] Prevent BrowserWindow from being hidden in ShowDesktop.\n  electget.preventFromShowDesktop(win);\n\n  // [Windows] Prevent changes in the BrowserWindow order.\n  electget.preventChangeZOrder(win);\n\n  // [Windows] Move BrowserWindow to the bottom of the windows\n  electget.moveToBottom(win);\n\n  return win;\n}\n```\n\n### Methods\n\n#### [`Windows`] alwaysOnBottom(browserWindow)\n\n- `win` BrowserWindow - Target BrowserWindow object.\n\n`BrowserWindow` is fixed to the bottom without being minimized.\nApply `moveToBottom`, `preventChangeZOrder`, `preventFromShowDesktop` at once.\n\n#### [`Windows`] cancelAlwaysOnBottom(browserWindow)\n\n- `win` BrowserWindow - Target BrowserWindow object.\n\nCancel of `alwaysOnBottom` method.\n\n#### [`Windows`] preventFromAeroPeek(win)\n\n- `win` Buffer|BrowserWindow - Target BrowserWindow object or Buffer returned by getNativeWindowHandle.\n\nPrevent `BrowserWindow` from being hidden in AeroPeek.\n\n#### [`Windows`, `macOS`] preventFromShowDesktop(win)\n\n- `win` Buffer|BrowserWindow - Target BrowserWindow object or Buffer returned by getNativeWindowHandle.\n\nPrevent `BrowserWindow` from being hidden in ShowDesktop and minimized.\n\n#### [`Windows`, `macOS`] cancelPreventFromShowDesktop(win)\n\n- `win` Buffer|BrowserWindow - Target BrowserWindow object or Buffer returned by getNativeWindowHandle.\n\nCancel of `preventFromShowDesktop` method.\n\n#### [`Windows`] preventChangeZOrder(browserWindow)\n\n- `win` BrowserWindow - Target BrowserWindow object.\n\nReturns `function` - Cancel of `preventChangeZOrder` method.\n\nPrevent changes in the `BrowserWindow` order.\n\n#### [`Windows`] cancelPreventChangeZOrder(browserWindow)\n\n- `win` BrowserWindow - Target BrowserWindow object.\n\nReturns `function` - Cancel of `preventChangeZOrder` method.\n\nCancel of `preventChangeZOrder` method.\n\n#### [`Windows`] moveToBottom(win)\n\n- `win` Buffer|BrowserWindow - Target BrowserWindow object or Buffer returned by getNativeWindowHandle.\n\nMove `BrowserWindow` to the bottom of the windows.\n\n## Guidelines for Using Webpack\n\nBecause `Webpack` bundles the source code, the following error occurs when `Webpack` is used for the main process: `Error: No native build was found ...`\n\nYou can install the [webpack-node-externals](https://www.npmjs.com/package/webpack-node-externals) package and remove the node package from the bundle with the `Webpack` externals setting as [follows](https://github.com/node-ffi-napi/node-ffi-napi/issues/157#issuecomment-846426023):\n\n```js\n// webpack.config.js\nconst nodeExternals = require('webpack-node-externals');\nmodule.exports = {\n  ...\n  externals: [nodeExternals()],\n  ...\n}\n```\n\n## Roadmap\n\n- [ ] Method failure check.\n- [x] Add MacOS support.\n- [ ] Add test code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffronterior%2Felectget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffronterior%2Felectget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffronterior%2Felectget/lists"}