{"id":13671111,"url":"https://github.com/hacdias/electron-menubar","last_synced_at":"2025-12-30T21:17:14.343Z","repository":{"id":52419433,"uuid":"115187358","full_name":"hacdias/electron-menubar","owner":"hacdias","description":"Easy way to create an electron menubar application.","archived":true,"fork":false,"pushed_at":"2022-02-27T16:52:01.000Z","size":28,"stargazers_count":39,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T06:46:36.148Z","etag":null,"topics":["electron","menubar","nodejs","tray-application"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/hacdias.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":"2017-12-23T10:10:12.000Z","updated_at":"2024-10-05T03:37:21.000Z","dependencies_parsed_at":"2022-09-04T10:32:06.673Z","dependency_job_id":null,"html_url":"https://github.com/hacdias/electron-menubar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacdias%2Felectron-menubar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacdias%2Felectron-menubar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacdias%2Felectron-menubar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacdias%2Felectron-menubar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hacdias","download_url":"https://codeload.github.com/hacdias/electron-menubar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251154292,"owners_count":21544475,"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":["electron","menubar","nodejs","tray-application"],"created_at":"2024-08-02T09:00:59.336Z","updated_at":"2025-12-30T21:17:14.304Z","avatar_url":"https://github.com/hacdias.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# electron-menubar\n\n\u003e ⚠️ Package no longer maintained. Please [contact me](https://hacdias.com/contact) if you want to become its maintainer.\n\n[![npm](https://img.shields.io/npm/v/electron-menubar.svg?style=flat-square)](https://www.npmjs.com/package/electron-menubar)\n[![Travis](https://img.shields.io/travis/hacdias/electron-menubar.svg?style=flat-square)](https://travis-ci.org/hacdias/electron-menubar)\n\nThis lets you create a menubar very easily with Electron.\n\n## Install\n\n```\nnpm install --save electron-menubar\n```\n\n## Documentation\n\n### Class `Menubar`\n\n#### `new Menubar([options])`\n\n- `options` Object (optional)\n    - `icon` String. The tray's icon. Defaults to `app.getAppPath()/icon.png`.\n    - `index` String. The index file for the window. Defaults to `app.getAppPath()/index.html`.\n    - `preloadWindow` Boolean. Tells if the window must be preloaded. Defaults to `false`.\n    - `showDockIcon` Boolean. Default is `false`.\n    - `showOnRightClick` Boolean. Default is `false`.\n    - `showOnAllWorkspaces` Boolean. Default is `false`.\n    - `tooltip` String. The tray's tooltip.\n    \n#### Methods\n\n- `menubar.isReady()` tells if the menubar is already ready.\n- `menubar.hide()` hides the window.\n- `menubar.show()` shows the window.\n\n#### Events\n\n- `ready`\n- `create-window`\n- `after-create-window`\n- `hide`\n- `after-hide`\n- `show`\n- `after-show`\n\n### Class `Positioner`\n\n- `Positioner.getTaskbarPosition()` returns the position of the taskbar: `top|right|bottom|left`.\n- `Positioner.position(window, trayBounds, [alignment])` positions the window in a certain place.\n    - `window` BrowserWindow. Is the window to position.\n    - `trayBounds` Rectangle. Are the bounds from the Electron.Tray.\n    - `alignment` Object. Are the positions to position the window.\n        - `alignment.x` String. Defaults to `center`. Can be `left|center|right`.\n        - `alignment.y` String. Defaults to `center`. Can be `up|center|down`.\n- `Positioner.calculate(windowBounds, trayBounds, [alignment])` only calculates the position and returns an Object `{x: n, y: k}`.\n    - `windowBounds` Rectangle. A BrowserWindow bounds.\n    - `trayBounds` Rectangle. Are the bounds from the Electron.Tray.\n    - `alignment` Object. Are the positions to position the window.\n        - `alignment.x` String. Defaults to `center`. Can be `left|center|right`.\n        - `alignment.y` String. Defaults to `center`. Can be `up|center|down`.\n\n## Credits\n\nThe code of this project is mainly based on [`menubar`](https://github.com/maxogden/menubar) and [`electron-traywindow-positioner`](https://github.com/pixtron/electron-traywindow-positioner) with some improvements and cleaning.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhacdias%2Felectron-menubar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhacdias%2Felectron-menubar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhacdias%2Felectron-menubar/lists"}