Components are the parts of the panels that make the panel live. They show status, serve as the gates for menus, etc etc.

A component

component "core/clock" {
  label "Clock"     // reserved: the item's name
  format "%I:%M %p" // everything else is an option
}

Where:

  • label is an internal field used by the panels to identify the component.
  • Every other attribute serves as an option for the component.

Style classes

.component {
  color: var(--text);
  color-faded: var(--subtext);
  color-invert: var(--base);
  color-primary: var(--primary);
  font-size: 12px;
  icon-size: 14px;
  gap: 5px;
  padding-v: 5px;
  padding-h: 9px;
  hover-background: var(--primary-a18);
  hover-radius: 4px;
}

.component.vertical { font-size: 15px; icon-size: 18px; gap: 8px; padding-v: 4px; padding-h: 5px; }

.component.faded     { color: var(--subtext); }
.component.invert    { color: var(--base); }
.component.primary   { color: var(--primary); }
.component.secondary { color: var(--yellow); }
.component.danger    { color: var(--red); }

The built-in components

core/icon

A simple clickable icon.

OptionTypeDefaultNotes
actionstringnoneIPC action dispatched on click, e.g. "panel.main.toggle".
menustringnoneMenu to open, e.g. "menus/quick".
exec/exec-altstring arraynoneSystem commands. (left/right click)
iconstring"applications-system-symbolic"A free-desktop icon name.
iconstablenone"one of these"
component "core/icon" {
  label "Quick settings"
  menu "menus/quick"
  // or
  exec "sh" "-c" "some command here"
  icon "preferences-system-symbolic"
}

core/clock

Clock.

OptionTypeDefaultNotes
formatstring"%H:%M"chrono format specifier.
update-timeint (s)60Seconds between repaints.
component "core/clock" {
  label "Clock"
  format "%I:%M %p · %b %-d"
  "update-time" 30
}

core/workspaces

Compositor workspaces.

OptionTypeDefaultNotes
allbool#falseWorkspaces from every output.
textbool#falseInclude the name.
"override-text"tablenoneList of workspace index/name to replacement text.
component "core/workspaces" {
  label "Workspaces"
  text #true
  "override-text" {
    "1" "󰈹"
    "2" ""
  }
}

core/window

The focused window.

OptionTypeDefaultNotes
iconbool#trueShow or not the icon.
namebool#trueApp name.
titlebool#trueWindow title.
"name-width"number (px)180Clipped on overflow. 0 disables the cap.
"title-width"number (px)320Same as "name-width".

core/windows

A simple dock-able window list.

OptionTypeDefaultNotes
"icon-size"numberthe .windows icon-size (22px)Overrides the style.
pinnedstring arraynoneApps always shown, even when closed. (Takes the desktop app-id)
"show-titles"bool#falseApp name under each icon.
"title-length"int8Characters before the ellipsis.

The clicks:

  • Left click: focus the app's window, cycle through its instances, or launch it when a pinned app has no open window.
  • Shift + click: cycle to the previous instance.
  • Right click: pin / unpin the app (persisted between sessions).

Note: App id provided are the freedesktop app ids, such as "com.mitchellh.ghostty".


core/system

A simple system monitor.

OptionTypeDefaultNotes
intervalint (s)2Seconds between refreshes.
itemsstring array"cpu" "mem"cpu, mem, temp, net, load.
iconsbool#true
labelsbool#true
percentsbool#true
progressbool#falseProgress bar next to the component.
progress-directionstring"horizontal""horizontal"/"vertical".
icon_namesstring arraynoneIcon overrides.
processesbool#falseProcesses list (costlier)
component "core/system" {
  label "Sysmon"
  interval 5
  items "cpu" "mem" "temp"
  progress #true
  progress-direction "vertical"
}

core/audio

Volume and mute, with optional currently playing track title.

OptionTypeDefaultNotes
"show-percent"bool#falsePrint the volume next to the icon.
"show-track"bool#falsePrint the current track instead. Hard-truncated at 30 chars.

The clicks:

  • Scroll: volume +/-5%.
  • Middle click: toggle mute.
  • Left click: open sounds menu.

core/power

Battery and brightness.

OptionTypeDefault
batteryboolauto
brightnessboolauto

The clicks:

  • scroll: brightness +/-5%,
  • left click: opens brightness menu.

core/network

A simple network status.

OptionTypeDefaultNotes
iconbool#trueThe connection icon.
ssidbool#falsePrint the SSID (or interface) next to it.

core/bluetooth

Bluetooth status.

Yeah this one's bare, no options.


core/notifications

Simple notifications status.

The clicks:

  • Left click: open notifications list.
  • Middle / right click: toggle do not disturb.

core/tray

The system tray.

OptionTypeDefault
spacingnumberthe .component gap

core/separator

A thin line (or a dot) between items.

OptionTypeDefault
circlebool#false
sizenumber2.0
opacitynumber0.1

core/nowplaying

The current playing track as artist - title.

OptionTypeDefault
"show-artist"bool#true
controlsbool#false
"max-length"number40
component "core/nowplaying" {
  label "Now Playing"
  "show-artist" #true
  controls #true
  "max-length" 40
}