Zebar lets you create customizable and cross-platform desktop widgets.
Installation • Intro • FAQ • Contributing ↗
Downloads for Windows, MacOS, and Linux are available in the latest release.
For building locally, follow the instructions here.
Click the Zebar icon in your system tray to open the GUI interface.
Navigate to the marketplace within the GUI to browse and install widget packs.
Widgets can be set to run on startup by right clicking the Zebar tray icon then going to Widget packs
-> <pack name>
-> <widget name>
-> Run on startup
and clicking the widget name to check it.
Widgets are powered by native webviews (similar to Electron, but more lightweight).
Zebar looks within the ~/.glzr/zebar
directory for directories containing a zpack.json
file. Each zpack.json
file defines a widget pack. Each widget pack can contain multiple widgets, each defined individually within the zpack.json
file.
For example, a widget pack config could be located at ~/.glzr/zebar/example-widget/zpack.json
, which would create a widget pack with an id of example-widget
.
Zebar only looks for zpack.json
files one level deep within the ~/.glzr/zebar
directory, so ~/glzr/zebar/example-widget/widget-1/zpack.json
is invalid.
In the My widgets
tab of the Zebar GUI, you can click Create new pack
to generate a widget pack scaffold with the given name and description.
Within each widget pack, in the Widgets
section you can click Add widget
to create a new widget within that pack. When creating a new widget you can pick between some templates to get you started.
Apart from the React buildless template, other available templates require you to have Node.js and a package manager (npm/pnpm) installed. For these templates, run the build command (e.g. pnpm build) from the widget directory after any source code changes.
To edit a marketplace widget without fear of your changes being overridden, you should copy the folder from the marketplace directory (located at %AppData%/zebar/downloads/
) to your own Zebar directory (located at ~/.glzr/zebar/
).
DO NOT re-publish other peoples widgets without permission.
Widgets are stored in packs, with each pack being defined by a zpack.json
file. Each pack can contain multiple widgets, each individually defined within zpack.json
.
Widgets consist of an HTML file, and any surrounding assets (e.g. CSS, JS, images, etc.).
The schema for zpack.json
can be found here although all options can also be configured via the GUI.
Zebar exposes various system information (referred to as "providers") which can be used and displayed by your frontend. This includes stats like CPU usage, battery info, various window manager integrations, and lots more. See Providers for a list of available providers.
Q: Help! On Windows, Zebar is failing to start?
In some cases, updating to the latest Microsoft Webview2 version is needed (standalone download). Run the "Evergreen Standalone Installer" as administrator.
Through the zebar
NPM package, Zebar exposes various system information via reactive "providers". Providers are a collection of functions and variables that can change over time.
No config options.
Variable | Description | Return type |
---|---|---|
deviceId |
Device ID. | string |
name |
Friendly display name of device. | string |
volume |
Volume as a % of maximum volume. Returned value is between 0 and 100 . |
number |
type |
Type of the device. | 'playback' | 'recording' |
isDefaultPlayback |
true if the device is selected as the default playback device. |
boolean |
isDefaultRecording |
true if the device is selected as the default recording device. |
boolean |
Variable | Description | Return type |
---|---|---|
deviceId |
Device ID to set the volume of. | string | undefined |
Option | Description | Option type | Default value |
---|---|---|---|
refreshInterval |
How often this provider refreshes in milliseconds. | number |
5000 |
Option | Description | Option type | Default value |
---|---|---|---|
refreshInterval |
How often this provider refreshes in milliseconds. | number |
5000 |
Variable | Description | Return type | Supported OS |
---|---|---|---|
frequency |
TODO | number |
|
usage |
TODO | number |
|
logicalCoreCount |
TODO | number |
|
physicalCoreCount |
TODO | number |
|
vendor |
TODO | string |
Option | Description | Option type | Default value |
---|---|---|---|
formatting |
Formatting of the current date into a custom string format. Affects the output of formatted . Refer to table of tokens for available date/time tokens. Examples: - 'yyyy LLL dd' -> 2023 Feb 13 - "HH 'hours and' mm 'minutes'" -> 20 hours and 55 minutes |
string |
EEE d MMM t |
timezone |
Either a UTC offset (eg. UTC+8 ) or an IANA timezone (eg. America/New_York ). Affects the output of formatted .A full list of available IANA timezones can be found here. |
string |
local |
locale |
An ISO-639-1 locale, which is either a 2-letter language code (eg. en ) or a 4-letter language + country code (eg. en-gb ). Affects the output of formatted .A full list of ISO-639-1 locales can be found here. |
string |
|
refreshInterval |
How often this provider refreshes in milliseconds. | number |
1000 |
Option | Description | Option type | Default value |
---|---|---|---|
refreshInterval |
How often this provider refreshes in milliseconds. | number |
60000 |
Variable | Description | Return type | Supported OS |
---|---|---|---|
disks |
Available disks on the system. | Disk[] |
Variable | Description | Return type |
---|---|---|
name |
Disk name. | string | null |
fileSystem |
File system used on the disk (e.g. EXT4 , NTFS ). |
string |
mountPoint |
Mount point of the disk (e.g. / , C:\\ ). |
string |
totalSpace |
Total disk size. | DataSizeMeasure |
availableSpace |
Available disk size. | DataSizeMeasure |
isRemovable |
Whether the disk is removable. | boolean |
driveType |
Type of disk (e.g. HDD , SSD ). |
string |
Variable | Description | Return type |
---|---|---|
bytes |
Raw byte value. | number |
siValue |
Bytes converted in according to the SI standard. 1000 bytes in a kilobyte. | number |
siUnit |
Unit of the converted bytes in according to the SI standard. KB, MB, ... | string |
iecValue |
Bytes converted in according to the IEC standard. 1024 bytes in a kibibyte. | number |
iecUnit |
Unit of the converted bytes in according to the IEC standard. KiB, MiB, ... | string |
No config options.
Option | Description | Option type | Default value |
---|---|---|---|
refreshInterval |
How often this provider refreshes in milliseconds. | number |
60000 |
Option | Description | Option type | Default value |
---|---|---|---|
refreshInterval |
How often this provider refreshes in milliseconds. | number |
3600000 |
Variable | Description | Return type | Supported OS |
---|---|---|---|
address |
TODO | string |
|
approxCity |
TODO | string |
|
approxCountry |
TODO | string |
|
approxLatitude |
TODO | number |
|
approxLongitude |
TODO | number |
Option | Description | Option type | Default value |
---|---|---|---|
refreshInterval |
How often this provider refreshes in milliseconds. | number |
5000 |
Variable | Description | Return type | Supported OS |
---|---|---|---|
layout |
Current keyboard layout, for example 'en-US'. | string |
No config options.
No config options.
Variable | Description | Return type | Supported OS |
---|---|---|---|
currentSession |
Currently playing media session. | MediaSession | null |
|
allSessions |
All active media sessions. | MediaSession[] |
Variable | Description | Return type |
---|---|---|
sessionId |
Unique identifier for the media session. | string |
title |
Title of the media session. | string |
artist |
Artist of the media session. | string | null |
albumTitle |
Album title of the media session. | string | null |
albumArtist |
Artist of the album (may differ from track artist). | string | null |
trackNumber |
Position of the track within its album. | number |
startTime |
Timestamp (in seconds) where playback begins. | number |
endTime |
Timestamp (in seconds) where playback ends. | number |
position |
Timestamp (in seconds) of current playback position. | number |
isPlaying |
Whether the media session is currently playing. | boolean |
isCurrentSession |
Whether this is the currently active session (i.e. currentSession ). |
boolean |
Variable | Description | Return type |
---|---|---|
sessionId |
ID of the session to control. If undefined , the current session is used. |
string | undefined |
Option | Description | Option type | Default value |
---|---|---|---|
refreshInterval |
How often this provider refreshes in milliseconds. | number |
5000 |
Variable | Description | Return type | Supported OS |
---|---|---|---|
usage |
TODO | number |
|
freeMemory |
TODO | number |
|
usedMemory |
TODO | number |
|
totalMemory |
TODO | number |
|
freeSwap |
TODO | number |
|
usedSwap |
TODO | number |
|
totalSwap |
TODO | number |
Option | Description | Option type | Default value |
---|---|---|---|
refreshInterval |
How often this provider refreshes in milliseconds. | number |
5000 |
Variable | Description | Return type |
---|---|---|
received |
Received bytes per second. | DataSizeMeasure |
transmitted |
Transmitted bytes per second. | DataSizeMeasure |
totalReceived |
Total received bytes. | DataSizeMeasure |
totalTransmitted |
Total transmitted bytes. | DataSizeMeasure |
Variable | Description | Return type |
---|---|---|
bytes |
Raw byte value. | number |
siValue |
Bytes converted in according to the SI standard. 1000 bytes in a kilobyte. | number |
siUnit |
Unit of the converted bytes in according to the SI standard. KB, MB, ... | string |
iecValue |
Bytes converted in according to the IEC standard. 1024 bytes in a kibibyte. | number |
iecUnit |
Unit of the converted bytes in according to the IEC standard. KiB, MiB, ... | string |
No config options.
Variable | Description | Return type | Supported OS |
---|---|---|---|
icons |
All Windows taskbar system tray icons. | SystrayIcon[] |
Variable | Description | Return type |
---|---|---|
id |
ID of the icon. | string |
iconBytes |
Icon image as a PNG byte array. | number[] |
iconBlob |
Icon image as a PNG blob. | Blob |
iconHash |
Hash of the icon image. Used to determine if the icon image has changed. | string |
iconUrl |
Icon image URL ready to be be referenced in <img> elements. |
string |
tooltip |
Tooltip text when hovering over the icon. | string |
Option | Description | Option type | Default value |
---|---|---|---|
latitude |
Latitude to retrieve weather for. If not provided, latitude is instead estimated based on public IP. | number | undefined |
undefined |
longitude |
Longitude to retrieve weather for. If not provided, longitude is instead estimated based on public IP. | number | undefined |
undefined |
refreshInterval |
How often this provider refreshes in milliseconds. | number |
3600000 |
Variable | Description | Return type | Supported OS |
---|---|---|---|
isDaytime |
TODO | string |
|
status |
TODO | WeatherStatus |
|
celsiusTemp |
TODO | number |
|
fahrenheitTemp |
TODO | number |
|
windSpeed |
TODO | number |