An open API service indexing awesome lists of open source software.

https://github.com/parking-master/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
https://github.com/parking-master/electron-trubar

electron electron-app electronjs javascript package title titlebar window

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

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


`textColor` - String | Color/Hex


`seamColor` - String | Color/Hex


`seam` - Boolean | Seamless/Seam


`title` - String | Title/Text


`height` - Number | Integer/Float


`trafficLightX` - Number | Integer/Float


`trafficLightY` - Number | Integer/Float

## Definitions
`backgroundColor` - Controls the background color of the titlebar.


`textColor` - Controls the foreground color of the titlebar.


`seamColor` - Controls the seam color of the titlebar.


`seam` - Controls whether the seam is shown on the titlebar.


`title` - Controls the title for of the titlebar.


`height` - Controls the height of the titlebar.


`trafficLightX` - Controls the X Axis position of the traffic lights.


`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


#### 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__