Code formatting

It is highly recommended to have a consistent code format across all your modules.

Code sections

It is highly recommended to have 4 different sections for every .inc or .ini file:

; THIS IS THE HEADER SECTION, THOUGH NORMALLY I DON'T RULE THIS SECTION OUT

[Rainmeter]
Update=-1

; This is the place to include variables

; ---------------------------------------------------------------------------- ;
;                                   Function                                   ;
; ---------------------------------------------------------------------------- ;

; This is where you should put & include all the measures

; ---------------------------------------------------------------------------- ;
;                                  MeterStyles                                 ;
; ---------------------------------------------------------------------------- ;

; This is where you should put & include all the meter styles

; ---------------------------------------------------------------------------- ;
;                                    Content                                   ;
; ---------------------------------------------------------------------------- ;

; This is wherre you should put & include all the meters

Naming

Of course, you can name however you want, but here are some styles that I recommend

Variables

#element_Name# where Name is a value for element (e.g. #Pri_Color#)

#n# where n is a short form or first letter of the variable name name (e.g. #R#)

Meters

[Element.MeterType] where Element is what meters make of, and MeterType is the type of the meters.

[GroupIndex] where Group is what the meter is part of (for example, a list) and Indexis an integer appended to the meter. Useful for multiple elements of a list

MeterStyles

[Element.MeterType:S] for a style for MeterType of Element

[Level.Element:S] for a style which is above the main module file (e.g. Core) and is applied to a single meter to make Element.

[ElementStyle] for a quick low-level meter style for Element

Measures

[mFunction] for a measure with Function (e.g. toggle for a toggle function, CPUPer for returning the percentage of CPU usage)

Last updated