# electron-trubar

> Electron TruBar is a package for fully-customizable titlebars. Works on Linux, Windows & Mac on the lastest versions of Node.js and ElectronJS

Latest version **1.0.9** (published 2022-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install electron-trubar
pnpm add electron-trubar
yarn add electron-trubar
bun add electron-trubar
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2022-08-12 |
| First published | 2022-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Parking Master |
| Maintainers | parking-master |
| Keywords | title, titlebar, electron, app, desktop |

## Links

- npm: https://www.npmjs.com/package/electron-trubar
- Repository: https://github.com/Parking-Master/electron-trubar
- Homepage: https://github.com/Parking-Master/electron-trubar#readme
- Issues: https://github.com/Parking-Master/electron-trubar/issues
- npm.io page: https://npm.io/package/electron-trubar

## Dependencies (2)

- [transparent-titlebar](https://npm.io/package/transparent-titlebar.md) ^0.2.0
- [electron-update-window-options](https://npm.io/package/electron-update-window-options.md) ^1.1.1

## Recent versions

- 1.0.9 (latest) — 2022-08-12
- 1.0.8 — 2022-06-29
- 1.0.7 — 2022-06-29
- 1.0.6 — 2022-06-28
- 1.0.5 — 2022-06-28
- 1.0.4 — 2022-06-28
- 1.0.3 — 2022-06-28
- 1.0.2 — 2022-06-28
- 1.0.1 — 2022-06-28
- 1.0.0 — 2022-06-28

## README

# Electron TruBar (electron-trubar)
The fastest and easiest way to customize any electron app window through the main process.

## Installing it
```
npm install electron-trubar --save
```
## What it includes
`backgroundColor` - String | Color/Hex
<br>
`textColor` - String | Color/Hex
<br>
`seamColor` - String | Color/Hex
<br>
`seam` - Boolean | Seamless/Seam
<br>
`title` - String | Title/Text
<br>
`height` - Number | Integer/Float
<br>
`trafficLightX` - Number | Integer/Float
<br>
`trafficLightY` - Number | Integer/Float

## Definitions
`backgroundColor` - Controls the background color of the titlebar.
<br>
`textColor` - Controls the foreground color of the titlebar.
<br>
`seamColor` - Controls the seam color of the titlebar.
<br>
`seam` - Controls whether the seam is shown on the titlebar.
<br>
`title` - Controls the title for of the titlebar.
<br>
`height` - Controls the height of the titlebar.
<br>
`trafficLightX` - Controls the X Axis position of the traffic lights.
<br>
`trafficLightY` - Controls the Y Axis position of the traffic lights.

## Example
```
npm install electron-trubar --save
```

##### main.js
```
const { app, BrowserWindow } = require("electron");
const TruBar = require("electron-trubar");

app.on("ready", function() {
  const mainWindow = new BrowserWindow({ ... });
  TruBar(mainWindow, {
    backgroundColor: "#333",
    textColor: "#fff",
    seam: true,
    seamColor: "#eee",
    height: 20,
    trafficLightX: 6.5,
    trafficLightY: 6.5,
    title: "My app"
  });
});
```

### Output

<br>

#### White
![Example Titlebar (White)](https://raw.githubusercontent.com/Parking-Master/Parking-Master/main/img/white-bar.png)

#### Red
![Example Titlebar (Red)](https://raw.githubusercontent.com/Parking-Master/Parking-Master/main/img/red-bar.png)

#### Black
![Example Titlebar (Black)](https://raw.githubusercontent.com/Parking-Master/Parking-Master/main/img/black-bar.png)

## License
__MIT__

---
_Source: https://npm.io/package/electron-trubar · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
