Plugins Overview
In SketchyBar, a "plugin" is simply an executable script that the bar calls to get information. These scripts are the primary mechanism for populating your bar with dynamic data.
The repository includes a set of default plugins to get you started. They demonstrate best practices for interacting with SketchyBar from a script.
Location
The default plugins are located in ~/.config/sketchybar/plugins/
. It's a good practice to keep all your custom scripts in this directory as well.
Core Concepts
- Execution: A plugin is run by SketchyBar when its associated item is triggered by a timer (
update_freq
) or an event (--subscribe
). - Updating Items: The main purpose of a plugin is to call
sketchybar --set
to update the properties (likelabel
oricon
) of its associated item. - Environment Variables: Plugins rely on environment variables provided by SketchyBar to know which item to update (
$NAME
) and to receive data from events ($SENDER
,$INFO
).
Default Plugins
Here are the default plugins included with SketchyBar. Click on each one to see its source code and a detailed explanation.