Zebar logo

Zebar Glzr Software Pte. Ltd.

Use this command to install Zebar:
winget install --id=glzr-io.zebar -e

Zebar is a tool for creating customizable and cross-platform taskbars, desktop widgets, and popups.

README

Zebar 🦓

Zebar lets you create customizable and cross-platform desktop widgets.

Discord invite Good first issues

InstallationIntroFAQContributing ↗

zebar-demo

⚙️ Installation

Downloads for Windows, MacOS, and Linux are available in the latest release.

For building locally, follow the instructions here.

🏁 Getting started

On first launch, Zebar generates some default widgets to %userprofile%/.glzr/zebar. This includes various examples and templates to get you started with creating your own widgets.

To create your own widget, a good way to start is by making a copy of one of the boilerplate configs created on first launch.

Widgets can be shared easily:

  1. Zip your widget configuration.
  2. Unzip it into the %userprofile%/.glzr/zebar directory.

🌟 Intro to Zebar

Widgets are powered by native webviews (similar to Electron, but more lightweight).

Each widget consists of:

  1. A config file (with a .zebar.json extension).
  2. An HTML file for markup and styling.

Any frontend framework can be used and boilerplates (e.g. for React, SolidJS) are included in the default widget configs.

Zebar exposes various system information (refered 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.

❓ FAQ

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 adminstrator.

🧩 Providers

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.

Audio

Config

No config options.

Outputs

VariableDescriptionReturn typeSupported OS
defaultPlaybackDeviceDefault audio playback device.AudioDevice | null
defaultRecordingDeviceDefault audio recording device.AudioDevice | null
playbackDevicesAll audio playback devices.AudioDevice[]
recordingDevicesAll audio recording devices.AudioDevice[]
allDevicesAll audio devices (both playback and recording).AudioDevice[]
FunctionDescriptionReturn typeSupported OS
setVolumeSets the volume of an audio device. Changes the volume of the default playback device, unless SetVolumeOptions.deviceId is specified. Parameters: - volume: number Volume as a % of maximum volume. Returned value is between 0 and 100. - options: SetVolumeOptions | undefined Additional options.Promise

Related types

AudioDevice

VariableDescriptionReturn type
deviceIdDevice ID.string
nameFriendly display name of device.string
volumeVolume as a % of maximum volume. Returned value is between 0 and 100.number
typeType of the device.'playback' | 'recording'
isDefaultPlaybacktrue if the device is selected as the default playback device.boolean
isDefaultRecordingtrue if the device is selected as the default recording device.boolean

SetVolumeOptions

VariableDescriptionReturn type
deviceIdDevice ID to set the volume of.string | undefined

Battery

Config

OptionDescriptionOption typeDefault value
refreshIntervalHow often this provider refreshes in milliseconds.number5000

Outputs

VariableDescriptionReturn typeSupported OS
chargePercentBattery charge as a percentage of maximum capacity (aka. 'state of charge'). Returned value is between 0 to 100.number
healthPercentCondition of the battery as a percentage of perfect health. Returned value is between 0 to 100.number
cycleCountNumber of charge/discharge cycles.number
stateState of the battery.'discharging' | 'charging' | 'full' | 'empty' | 'unknown'
isChargingWhether the battery is in a charging state.boolean
timeTillEmptyApproximate time in milliseconds till battery is empty.number | null
timeTillFullApproximate time in milliseconds till battery is fully charged.number | null
powerConsumptionBattery power consumption in watts.number
voltageBattery voltage.number | null

CPU

Config

OptionDescriptionOption typeDefault value
refreshIntervalHow often this provider refreshes in milliseconds.number5000

Outputs

VariableDescriptionReturn typeSupported OS
frequencyTODOnumber
usageTODOnumber
logicalCoreCountTODOnumber
physicalCoreCountTODOnumber
vendorTODOstring

Date

Config

OptionDescriptionOption typeDefault value
formattingFormatting 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 minutesstringEEE d MMM t
timezoneEither 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.stringlocal
localeAn 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
refreshIntervalHow often this provider refreshes in milliseconds.number1000

Outputs

VariableDescriptionReturn typeSupported OS
formattedCurrent date/time as a formatted string.string
newCurrent date/time as a JavaScript Date object. Uses new Date() under the hood.Date
nowCurrent date/time as milliseconds since epoch. Uses Date.now() under the hood.number
isoCurrent date/time as an ISO-8601 string (eg. 2017-04-22T20:47:05.335-04:00). Uses date.toISOString() under the hood.string

Disk

Config

OptionDescriptionOption typeDefault value
refreshIntervalHow often this provider refreshes in milliseconds.number60000

Outputs

VariableDescriptionReturn typeSupported OS
disksAvailable disks on the system.Disk[]

Related types

Disk

VariableDescriptionReturn type
nameDisk name.string | null
fileSystemFile system used on the disk (e.g. EXT4, NTFS).string
mountPointMount point of the disk (e.g. /, C:\\).string
totalSpaceTotal disk size.DataSizeMeasure
availableSpaceAvailable disk size.DataSizeMeasure
isRemovableWhether the disk is removable.boolean
driveTypeType of disk (e.g. HDD, SSD).string

DataSizeMeasure

VariableDescriptionReturn type
bytesRaw byte value.number
siValueBytes converted in according to the SI standard. 1000 bytes in a kilobyte.number
siUnitUnit of the converted bytes in according to the SI standard. KB, MB, ...string
iecValueBytes converted in according to the IEC standard. 1024 bytes in a kibibyte.number
iecUnitUnit of the converted bytes in according to the IEC standard. KiB, MiB, ...string

GlazeWM

Config

No config options.

Outputs

VariableDescriptionReturn typeSupported OS
displayedWorkspaceWorkspace displayed on the current monitor.Workspace
focusedWorkspaceWorkspace that currently has focus (on any monitor).Workspace
currentWorkspacesWorkspaces on the current monitor.Workspace[]
allWorkspacesWorkspaces across all monitors.Workspace[]
allMonitorsAll monitors.Monitor[]
allWindowsAll windows.Window[]
focusedMonitorMonitor that currently has focus.Monitor
currentMonitorMonitor that is nearest to this Zebar widget.Monitor
focusedContainerContainer that currently has focus (on any monitor).Container
tilingDirectionTiling direction of the focused container.TilingDirection
bindingModesActive binding modes.BindingModeConfig[]
isPausedWhether the WM is paused.boolean
FunctionDescriptionReturn typeSupported OS
runCommandInvokes a WM command. Examples: - runCommand("focus --workspace 1") - runCommand("set-floating", containerId) Parameters: - command: string WM command to run (e.g. "focus --workspace 1"). - subjectContainerId: string | undefined (Optional) ID of container to use as subject. If not provided, this defaults to the currently focused container.string

Host

Config

OptionDescriptionOption typeDefault value
refreshIntervalHow often this provider refreshes in milliseconds.number60000

Outputs

VariableDescriptionReturn typeSupported OS
hostnameName used to identify the device in various network-related activities.string | null
osNameName of the operating system. This is Darwin on MacOS, Windows on Windows, or the Linux distro name retrieved from either /etc/os-release or /etc/lsb-release (eg. Debian GNU/Linux on Debian).string | null
osVersionOperating system version. This is the version number on MacOS (eg. 13.2.1), the major version + build number on Windows (eg. 11 22000), or the Linux distro version retrieved from either /etc/os-release or /etc/lsb-release (eg. 9 on Debian 9).string | null
friendlyOsVersionFriendly name of operating system version (eg. MacOS 13.2.1, Windows 10 Pro, Linux Debian GNU/Linux 9).string | null
bootTimeTime when the system booted since UNIX epoch in milliseconds (eg. 1699452379304).string
uptimeTime in milliseconds since boot.string

IP

Config

OptionDescriptionOption typeDefault value
refreshIntervalHow often this provider refreshes in milliseconds.number3600000

Outputs

VariableDescriptionReturn typeSupported OS
addressTODOstring
approxCityTODOstring
approxCountryTODOstring
approxLatitudeTODOnumber
approxLongitudeTODOnumber

Keyboard

Config

OptionDescriptionOption typeDefault value
refreshIntervalHow often this provider refreshes in milliseconds.number5000

Outputs

VariableDescriptionReturn typeSupported OS
layoutCurrent keyboard layout, for example 'en-US'.string

Komorebi

Config

No config options.

Outputs

VariableDescriptionReturn typeSupported OS
displayedWorkspaceWorkspace displayed on the current monitor.KomorebiWorkspace
focusedWorkspaceWorkspace that currently has focus (on any monitor).KomorebiWorkspace
currentWorkspacesWorkspaces on the current monitor.KomorebiWorkspace[]
allWorkspacesWorkspaces across all monitors.KomorebiWorkspace[]
allMonitorsAll monitors.KomorebiMonitor[]
focusedMonitorMonitor that currently has focus.KomorebiMonitor
currentMonitorMonitor that is nearest to this Zebar widget.KomorebiMonitor

Media

Config

No config options.

Outputs

VariableDescriptionReturn typeSupported OS
currentSessionCurrently playing media session.MediaSession | null
allSessionsAll active media sessions.MediaSession[]
FunctionDescriptionReturn typeSupported OS
playPlays the media session. Affects the current media session, unless MediaControlOptions.sessionId is specified. Parameters:options: MediaControlOptions | undefined Additional options.Promise
pausePauses the media session. Affects the current media session, unless MediaControlOptions.sessionId is specified. Parameters:options: MediaControlOptions | undefined Additional options.Promise
togglePlayPauseToggles between playing/pausing the media session. Affects the current media session, unless MediaControlOptions.sessionId is specified. Parameters:options: MediaControlOptions | undefined Additional options.Promise
nextSkips to the next track. Affects the current media session, unless MediaControlOptions.sessionId is specified. Parameters:options: MediaControlOptions | undefined Additional options.Promise
previousSkips to the previous track. Affects the current media session, unless MediaControlOptions.sessionId is specified. Parameters:options: MediaControlOptions | undefined Additional options.Promise

Related types

MediaSession

VariableDescriptionReturn type
sessionIdUnique identifier for the media session.string
titleTitle of the media session.string
artistArtist of the media session.string | null
albumTitleAlbum title of the media session.string | null
albumArtistArtist of the album (may differ from track artist).string | null
trackNumberPosition of the track within its album.number
startTimeTimestamp (in seconds) where playback begins.number
endTimeTimestamp (in seconds) where playback ends.number
positionTimestamp (in seconds) of current playback position.number
isPlayingWhether the media session is currently playing.boolean
isCurrentSessionWhether this is the currently active session (i.e. currentSession).boolean

MediaControlOptions

VariableDescriptionReturn type
sessionIdID of the session to control. If undefined, the current session is used.string | undefined

Memory

Config

OptionDescriptionOption typeDefault value
refreshIntervalHow often this provider refreshes in milliseconds.number5000

Outputs

VariableDescriptionReturn typeSupported OS
usageTODOnumber
freeMemoryTODOnumber
usedMemoryTODOnumber
totalMemoryTODOnumber
freeSwapTODOnumber
usedSwapTODOnumber
totalSwapTODOnumber

Network

Config

OptionDescriptionOption typeDefault value
refreshIntervalHow often this provider refreshes in milliseconds.number5000

Outputs

VariableDescriptionReturn typeSupported OS
defaultInterfaceTODONetworkInterface
defaultGatewayTODOGateway
interfacesTODONetworkInterface[]
trafficReturns the network traffic per second.NetworkTraffic

Related types

NetworkTraffic

VariableDescriptionReturn type
receivedReceived bytes per second.DataSizeMeasure
transmittedTransmitted bytes per second.DataSizeMeasure
totalReceivedTotal received bytes.DataSizeMeasure
totalTransmittedTotal transmitted bytes.DataSizeMeasure

DataSizeMeasure

VariableDescriptionReturn type
bytesRaw byte value.number
siValueBytes converted in according to the SI standard. 1000 bytes in a kilobyte.number
siUnitUnit of the converted bytes in according to the SI standard. KB, MB, ...string
iecValueBytes converted in according to the IEC standard. 1024 bytes in a kibibyte.number
iecUnitUnit of the converted bytes in according to the IEC standard. KiB, MiB, ...string

Systray

Config

No config options.

Outputs

VariableDescriptionReturn typeSupported OS
iconsAll Windows taskbar system tray icons.SystrayIcon[]

Related Types

SystrayIcon

VariableDescriptionReturn type
idID of the icon.string
iconBytesIcon image as a PNG byte array.number[]
iconBlobIcon image as a PNG blob.Blob
iconHashHash of the icon image. Used to determine if the icon image has changed.string
iconUrlIcon image URL ready to be be referenced in <img /> elements.string
tooltipTooltip text when hovering over the icon.string

Weather

Config

OptionDescriptionOption typeDefault value
latitudeLatitude to retrieve weather for. If not provided, latitude is instead estimated based on public IP.number | undefinedundefined
longitudeLongitude to retrieve weather for. If not provided, longitude is instead estimated based on public IP.number | undefinedundefined
refreshIntervalHow often this provider refreshes in milliseconds.number3600000

Outputs

VariableDescriptionReturn typeSupported OS
isDaytimeTODOstring
statusTODOWeatherStatus
celsiusTempTODOnumber
fahrenheitTempTODOnumber
windSpeedTODOnumber
Versions
2.7.0
2.6.1
2.6.0
2.5.1
2.5.0
1.8.1
Website
License