Skip to content

Widgets Custom

prankstr edited this page Jun 6, 2026 · 3 revisions

Custom

User-defined widgets for script output, buttons, and custom indicators.

Custom widgets use the custom-<name> prefix. Each instance gets its own [widgets.custom-<name>] config section.

Options

Option Type Default Description
icon string Icon name, or glyph:<value> for a literal side glyph
icons table Map Waybar-style JSON alt values to icons or glyph:<value>
image string Path to an image file (SVG, PNG, etc.). Takes precedence over icon
label string "" Static label text (also used as fallback when exec returns empty)
exec string Shell command whose stdout becomes the label
template string Format string with {output} / {text}, {alt}, and {percentage} placeholders
interval integer 0 Re-run exec every N seconds (0 = run once at startup)
continuous bool false Treat exec as a long-running line-buffered stream
restart_interval integer Auto-restart delay for continuous commands after they exit
on_click string Command to run on left-click (re-runs exec afterward)
tooltip string Static tooltip text
max_chars integer Truncate label to N characters with ellipsis (minimum 1; unset = no limit)
background_color string Custom background color (hex)

When exec returns empty output and no label fallback is set, the widget auto-hides until the next non-empty result.

Output Modes

Plain text output sets the widget label. If output parses as JSON with at least one supported Waybar-style field, VibePanel uses the structured fields instead.

Supported JSON fields:

Field Type Description
text string Label text
tooltip string Tooltip text. Empty string clears tooltip
class string or array CSS class or classes applied to the widget surface
alt string Key used to pick an icon from [widgets.custom-<name>.icons]
percentage number Numeric value available as {percentage} in template

VibePanel supports the output format, not Waybar's config surface. Use template and icons instead of Waybar format, format-icons, signal, or return-type options.

In continuous = true mode, the command must flush one update per line. If restart_interval is set, VibePanel restarts the command after it exits, with crash-loop protection.

Examples

Power Button

[widgets]
right = ["custom-power", "tray", "clock"]

[widgets.custom-power]
icon = "system-shutdown-symbolic"
label = "Power"
tooltip = "Power menu"
on_click = "wlogout"
on_click_right = "systemctl suspend"

Distro Logo

[widgets]
right = ["custom-distro", "clock"]

[widgets.custom-distro]
image = "/usr/share/pixmaps/distro-logo.svg"
tooltip = "My Distro"

Streaming Waybar JSON

[widgets]
right = ["custom-monitor", "clock"]

[widgets.custom-monitor]
exec = "stdbuf -oL my-monitor --json"
continuous = true
restart_interval = 5
template = "{text} {percentage}%"

[widgets.custom-monitor.icons]
normal = "memory-symbolic"
warning = "glyph:!"
critical = "glyph:!!"

Styling

Class Description
.custom-<name> Instance-specific class (e.g. .custom-power)
.custom-icon-glyph Literal glyph side icon from glyph:<value>
.clickable Added when any click handler is set

Clone this wiki locally