Dev:Flipswitch

libflipswitch is a library used to implement a centralized toggle system.

How to make a new switch
Save this NIC template to the  directory and call   to get a premade switch.

Add instructions about writing code.

Secondary action
In the file  you can find the key "alternate-action-url", which will enable you to open a URI when the secondary action of the switch is invoked, in case it is not implemented in code. The default value is "prefs:".

How to make a template bundle
These bundles contain information about how a switch glyph (the image that the user sees for a given switch) is rendered when it is used in a button returned by the appropriate method of the FlipSwitch panel. Bundles contain an  file and optionally image files. Here is an example of an, taken from SwitchIcons:

Keys not specified in the following table can use the same values as the example given.

array can contain dictionaries with the following keys:

For more information, see here