Creating budgie applets

These are some notes from a recent conversation I had about how best to start developing new applets. Hopefully this is useful for an initial primer.

when developing applets its probably best to treat it as a whole app

  • develop it separately to run within a container on a window such as
    a Gtk Grid or Box. Then when ready to make the applet it is easy
    enough to take that container and add it to the equivalent of a window - the Budgie Popover.

Examples should be consulted - lots of python & vala based examples on budgie-extras

The simplest is budgie-rotationlock

  • this just responds to a click.

Another is https://github.com/UbuntuBudgie/budgie-extras/tree/master/budgie-clockworks
that shows a Budgie Popover when clicking on the applet in the panel.

Essential API doc for reference - https://lazka.github.io/pgi-docs/ & https://valadoc.org/

budgie applets must either be placed globally in
/usr/lib/budgie-desktop/plugins or locally
~/.local/share/budgie-desktop/plugins

All applets have a .plugin file and a “module file” - referenced in
the .plugin file. With those two things it will appear in
budgie-desktop-settings - panel applets.

Note - you have to restart the panel for changes to take effect i.e.
budgie-panel --replace &


We also have applet templates for you to get going with:

1 Like

Do you have a C example? I want to create applets to the wider Budgie community (i.e. Ubuntu, Solus and beyond) but I’m not really willing to learn Vala (which won’t serve me outside of GNOME programming while both Python and C synergise with my studies) and Python isn’t really accepted by the Solus devs (and I really want to get better used to C).

Our budgie-indicator-applet is written in C if that helps

Alternatively just take a vala template applet, compile it and look at the generated C code.