Kデスクトップ環境

5.3. SET variables

A script can access SET variables:

A script can also add its own SET variables, providing a default value and a hook to check and set a new value. To do this, the script must:

The subs that serve as hooks for SET variables get called with the proposed value as the first argument. They may (or not) change the actual value in $set{"VAR"}, to the value given or to another one. By convention, they should not &tell anything, and should ignore invalid values.

What goes in $set{"VAR"} must still be human-readable; for things like toggles, it is suggested that the values in $set{"VAR"} should be "on", "off" or similar, and that &doset can set a variable (internal to the script) to 0 or 1, which will be the one actually checked by the script.