Skip to content

Command and exec applets ​

These are the two kinds of applet you define yourself, in panel.toml.

command ​

A command applet is a chip with an icon and a label that runs a program when you click or scroll on it. Each gesture takes a program and its arguments as a list. No shell is involved, so an argument with spaces is one list item and nothing needs quoting.

toml
[applets.screenshot]
extends = "command"
icon = "camera-photo-symbolic"
tooltip-format = "Select a screenshot region"
on-click = ["glimpse-shot", "--region"]

[[panels]]
right = ["screenshot", "network", "audio"]

Give every command applet its own name and extends = "command".

For pipes, && or $VARIABLES, run the shell yourself with ["sh", "-c", "<command line>"]. env sets variables for every program the chip runs:

toml
[applets.volume-up]
extends = "command"
icon = "audio-volume-high-symbolic"
env = { PULSE_SINK = "@DEFAULT_SINK@" }
on-click = ["sh", "-c", "pactl set-sink-volume $PULSE_SINK +5% && notify-send Louder"]
[applets.command]

Your own commands on the bar.

envtable of stringsnot set by default

Variables set for every program this chip runs, replacing any with the same name.

iconstringnot set by default

A themed icon name, or the absolute path to an image. Prefer a -symbolic name, which follows the bar's color.

inherit-envboolean default true

Start every program from the panel's environment. When off, a program gets only XDG_RUNTIME_DIR, WAYLAND_DISPLAY, DISPLAY, its activation token and env.

labelstringnot set by default

Text beside your icon.

on-clicklist of stringsnot set by default

What a left click runs.

on-middle-clicklist of stringsnot set by default

What a middle click runs.

on-scroll-downlist of stringsnot set by default

What scrolling down runs, once per notch.

on-scroll-leftlist of stringsnot set by default

What scrolling left runs, once per notch.

on-scroll-rightlist of stringsnot set by default

What scrolling right runs, once per notch.

on-scroll-uplist of stringsnot set by default

What scrolling up runs, once per notch.

tooltip-formatstringnot set by default

What the bar's tooltip reads. Plain text. Unset shows no tooltip.

Left and middle click each run their own command, as do the four scroll directions. Each wheel notch runs once; other mouse buttons do nothing.

An absolute SVG icon path works. If the file is missing, the chip uses system-run-symbolic.

exec ​

An exec applet is a program installed with a desktop entry that declares Implements=me.aresa.Glimpse.Applet1. Place it on a panel by its desktop-file id. A table named by the same id passes it options:

toml
[[panels]]
right = ["me.aresa.GlimpseTodo", "network", "audio"]

[applets."me.aresa.GlimpseTodo"]
options = { title = "Groceries" }

To run a second copy with other options, give it a name, extends = "exec", and the id in applet:

toml
[applets.work-todo]
extends = "exec"
applet = "me.aresa.GlimpseTodo"
options = { title = "Work" }
[applets.exec]

A third-party applet.

appletstringnot set by default

The desktop-file id, e.g. me.aresa.GlimpseTodo for the todo example.

envtable of strings default {}

Variables set for the applet process on top of the panel's environment.

optionstable of values default {}

Passed to the applet as written.

Exec applets need the systemd user manager. If an id is not installed or the applet cannot start, no chip appears. Check the panel log for the reason; glimpsectl applet list --installed lists the installed applets.

Released under the BSD 3-Clause license.