Skip to content

Commit

Permalink
update branch
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Setch <[email protected]>
  • Loading branch information
setchy committed Aug 16, 2024
1 parent ab7bcc2 commit 80633dd
Show file tree
Hide file tree
Showing 14 changed files with 354 additions and 44 deletions.
10 changes: 5 additions & 5 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ This module provides boilerplate for setting up a menubar application using Elec

✅ Only one dependency, and one peer-dependency.

✅ Works on macOS, Windows and most Linuxes. See [details]().
✅ Works on macOS, Windows and most Linuxes. See [details](_media/WORKING_PLATFORMS.md).

✅ 💥 [**3.6kB minified + gzipped**](https://bundlephobia.com/result?p=menubar) 💥

| <img src="" height="250px" /> | <img src="" height="250px" /> | <img src="" height="250px" /> |
| <img src="_media/screenshot-macos-dark.png" height="250px" /> | <img src="_media/screenshot-windows.png" height="250px" /> | <img src="_media/screenshot-linux.png" height="250px" /> |
| :-----------------------------------------------------------: | :--------------------------------------------------------: | :------------------------------------------------------: |
| macOS Mojave 10.14 | Windows 10 | Ubuntu 18.04 |

Expand Down Expand Up @@ -77,7 +77,7 @@ The return value of `menubar()` is a `Menubar` class instance, which has these p
- `showWindow()`: show the menubar window,
- `hideWindow()`: hide the menubar window

See the reference [API docs]().
See the reference [API docs](_media/_menubar_.menubar.md).

## `menubar()` Options

Expand All @@ -101,7 +101,7 @@ You can pass an optional options object into the `menubar({ ... })` function:
- `showDockIcon` (default false) - Configure the visibility of the application dock icon.
- `showOnRightClick` (default false) - Show the window on 'right-click' event instead of regular 'click'

See the reference [API docs]().
See the reference [API docs](_media/_types_.options.md).

## Events

Expand Down Expand Up @@ -130,7 +130,7 @@ The `Menubar` class is an event emitter:

## API Docs

See the reference [API docs]().
See the reference [API docs](_media/globals.md).

## Tips

Expand Down
27 changes: 27 additions & 0 deletions doc/_media/WORKING_PLATFORMS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Platforms where `menubar` is known to work

This document is still a work-in-progress. If you have tested `menubar` with a platform that is not listed under here, I would greatly appreciate a PR!

## macOS

| Version | Working Status | Known Issues |
| ----------------- | -------------- | -------------------------------------------------------------------------------------------------------------- |
| 14.15 Sonoma | ✅ Good | |
| 10.14 Mojave | ✅ Good | [#147](https://github.com/maxogden/menubar/issues/147), [#215](https://github.com/maxogden/menubar/issues/215) |
| 10.13 High Sierra | ✅ Good | |

## Windows

| Version | Working Status | Known Issues |
| ---------- | -------------- | ------------ |
| Windows 11 | ✅ Good | |
| Windows 10 | ✅ Good | |
| Windows 8 | ✅ Good | |

## Linux

| Distribution | Desktop Environment | Working Status | Known Issues |
| ------------- | ------------------- | -------------- | ------------------------------------------------------ |
| openSUSE 13.1 | Xfce 4.10.1 | ❌ Bad | [#123](https://github.com/maxogden/menubar/issues/123) |
| Ubuntu 18.04 | Unity | ✅ Good | |
| Ubuntu 14.04 | Unity | ❌ Bad | [#68](https://github.com/maxogden/menubar/issues/68) |
147 changes: 147 additions & 0 deletions doc/_media/_menubar_.menubar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
> **[menubar](../README.md)**
[Globals](../globals.md) / ["Menubar"](../modules/_menubar_.md) / [Menubar](_menubar_.menubar.md) /

# Class: Menubar

## Hierarchy

* `EventEmitter`

* **Menubar**

## Index

### Constructors

* [constructor](_menubar_.menubar.md#constructor)

### Accessors

* [app](_menubar_.menubar.md#app)
* [positioner](_menubar_.menubar.md#positioner)
* [tray](_menubar_.menubar.md#tray)
* [window](_menubar_.menubar.md#window)

### Methods

* [getOption](_menubar_.menubar.md#getoption)
* [hideWindow](_menubar_.menubar.md#hidewindow)
* [setOption](_menubar_.menubar.md#setoption)
* [showWindow](_menubar_.menubar.md#showwindow)

## Constructors

### constructor

\+ **new Menubar**(`app`: `App`, `options?`: `Partial<Options>`): *[Menubar](_menubar_.menubar.md)*

*Defined in [Menubar.ts:24](https://github.com/adam-lynch/menubar/blob/6b93752/src/Menubar.ts#L24)*

**Parameters:**

Name | Type |
------ | ------ |
`app` | `App` |
`options?` | `Partial<Options>` |

**Returns:** *[Menubar](_menubar_.menubar.md)*

## Accessors

### app

**app**:

*Defined in [Menubar.ts:47](https://github.com/adam-lynch/menubar/blob/6b93752/src/Menubar.ts#L47)*

___

### positioner

**positioner**:

*Defined in [Menubar.ts:56](https://github.com/adam-lynch/menubar/blob/6b93752/src/Menubar.ts#L56)*

___

### tray

**tray**:

*Defined in [Menubar.ts:69](https://github.com/adam-lynch/menubar/blob/6b93752/src/Menubar.ts#L69)*

___

### window

**window**:

*Defined in [Menubar.ts:83](https://github.com/adam-lynch/menubar/blob/6b93752/src/Menubar.ts#L83)*

## Methods

### getOption

**getOption**<**K**>(`key`: `K`): *`Options[K]`*

*Defined in [Menubar.ts:92](https://github.com/adam-lynch/menubar/blob/6b93752/src/Menubar.ts#L92)*

**Type parameters:**

**K**: *keyof Options*

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`key` | `K` | The option key to retrieve, see [Options](../interfaces/_types_.options.md). |

**Returns:** *`Options[K]`*

___

### hideWindow

**hideWindow**(): *void*

*Defined in [Menubar.ts:99](https://github.com/adam-lynch/menubar/blob/6b93752/src/Menubar.ts#L99)*

**Returns:** *void*

___

### setOption

**setOption**<**K**>(`key`: `K`, `value`: `Options[K]`): *void*

*Defined in [Menubar.ts:115](https://github.com/adam-lynch/menubar/blob/6b93752/src/Menubar.ts#L115)*

**Type parameters:**

**K**: *keyof Options*

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`key` | `K` | The option key to modify, see [Options](../interfaces/_types_.options.md). |
`value` | `Options[K]` | The value to set. |

**Returns:** *void*

___

### showWindow

**showWindow**(`trayPos?`: `Electron.Rectangle`): *`Promise<void>`*

*Defined in [Menubar.ts:124](https://github.com/adam-lynch/menubar/blob/6b93752/src/Menubar.ts#L124)*

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`trayPos?` | `Electron.Rectangle` | The bounds to show the window in. |

**Returns:** *`Promise<void>`*
122 changes: 122 additions & 0 deletions doc/_media/_types_.options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
> **[menubar](../README.md)**
[Globals](../globals.md) / ["types"](../modules/_types_.md) / [Options](_types_.options.md) /

# Interface: Options

## Hierarchy

* **Options**

## Table of Contents

### Properties

* [browserWindow](_types_.options.md#browserwindow)
* [dir](_types_.options.md#dir)
* [icon](_types_.options.md#optional-icon)
* [index](_types_.options.md#index)
* [loadUrlOptions](_types_.options.md#optional-loadurloptions)
* [preloadWindow](_types_.options.md#optional-preloadwindow)
* [showDockIcon](_types_.options.md#optional-showdockicon)
* [showOnAllWorkspaces](_types_.options.md#optional-showonallworkspaces)
* [showOnRightClick](_types_.options.md#optional-showonrightclick)
* [tooltip](_types_.options.md#tooltip)
* [tray](_types_.options.md#optional-tray)
* [windowPosition](_types_.options.md#optional-windowposition)

## Properties

### browserWindow

**browserWindow**: *`BrowserWindowConstructorOptions`*

*Defined in [types.ts:23](https://github.com/maxogden/menubar/blob/c7d6640/src/types.ts#L23)*

___

### dir

**dir**: *string*

*Defined in [types.ts:27](https://github.com/maxogden/menubar/blob/c7d6640/src/types.ts#L27)*

___

### `Optional` icon

**icon**? : *string | `NativeImage`*

*Defined in [types.ts:34](https://github.com/maxogden/menubar/blob/c7d6640/src/types.ts#L34)*

___

### index

**index**: *string | false*

*Defined in [types.ts:43](https://github.com/maxogden/menubar/blob/c7d6640/src/types.ts#L43)*

___

### `Optional` loadUrlOptions

**loadUrlOptions**? : *`LoadURLOptions`*

*Defined in [types.ts:51](https://github.com/maxogden/menubar/blob/c7d6640/src/types.ts#L51)*

___

### `Optional` preloadWindow

**preloadWindow**? : *undefined | false | true*

*Defined in [types.ts:56](https://github.com/maxogden/menubar/blob/c7d6640/src/types.ts#L56)*

___

### `Optional` showDockIcon

**showDockIcon**? : *undefined | false | true*

*Defined in [types.ts:61](https://github.com/maxogden/menubar/blob/c7d6640/src/types.ts#L61)*

___

### `Optional` showOnAllWorkspaces

**showOnAllWorkspaces**? : *undefined | false | true*

*Defined in [types.ts:66](https://github.com/maxogden/menubar/blob/c7d6640/src/types.ts#L66)*

___

### `Optional` showOnRightClick

**showOnRightClick**? : *undefined | false | true*

*Defined in [types.ts:70](https://github.com/maxogden/menubar/blob/c7d6640/src/types.ts#L70)*

___

### tooltip

**tooltip**: *string*

*Defined in [types.ts:74](https://github.com/maxogden/menubar/blob/c7d6640/src/types.ts#L74)*

___

### `Optional` tray

**tray**? : *`Tray`*

*Defined in [types.ts:78](https://github.com/maxogden/menubar/blob/c7d6640/src/types.ts#L78)*

___

### `Optional` windowPosition

**windowPosition**? : *"trayLeft" | "trayBottomLeft" | "trayRight" | "trayBottomRight" | "trayCenter" | "trayBottomCenter" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "topCenter" | "bottomCenter" | "leftCenter" | "rightCenter" | "center"*

*Defined in [types.ts:83](https://github.com/maxogden/menubar/blob/c7d6640/src/types.ts#L83)*
14 changes: 14 additions & 0 deletions doc/_media/globals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
> **[menubar](README.md)**
[Globals](globals.md) /

# menubar

## Index

### External modules

* ["Menubar"](modules/_menubar_.md)
* ["index"](modules/_index_.md)
* ["types"](modules/_types_.md)
* ["util/getWindowPosition"](modules/_util_getwindowposition_.md)
Binary file added doc/_media/screenshot-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_media/screenshot-macos-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_media/screenshot-windows.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 80633dd

Please sign in to comment.