The skrellm is a single process stack of system monitors which supports applying themes to match its appearance to your window manager, Gtk, or any other theme. It displays system resource monitors on your desktop, and it is a suckless rewrite of gkrellm, cured out of its glib and gtk illness. It is as dependency-free as possible, and also multiplatform.
SKrellM running on multiple platforms and using various themes
Advantages
- very small codebase (ca. 6200 SLoC all in all), yet plenty of meters
- unlike gkrellm, no obsolete library dependencies
- platforms are detected automatically at compile-time
- backends are detected automatically and linked in run-time (SDL, X11, GDI)
- plugins are totally backend-independent and easy to write
- themes are single image files, easier to share
- layouts are theme and user customizable
- supports HiDPI displays (kinda)
Disadvantages
- no configuration GUI yet, you need to edit the config file with a text editor for now
Getting Started
Installation
No actual installation needed, SKrellM is a portable executable. On first run, configuration file will be created, which you can edit with any text editor.
Linux
- Download the skrellm to /usr/bin
- Make sure that it's executable: sudo chmod +x /usr/bin/skrellm
If your distro is debian based such as Ubuntu, then you can do this instead:
- Download the deb package
- Run the sudo dpkg -i skrellm_*.deb command in a terminal
Windows
- Download the skrellm.exe to C:\Program Files\SKrellM
Compilation
Just run make in the src directory. No configure, no dependencies, suckless as it should be. The backends' header files are needed, but that's all, linking is done in run-time.
| Command | Description |
|---|---|
| make | Compile the skrellm executable |
| make mbedtls-bin | Download a pre-compiled mbedtls library |
| make mbedtls-src | Download and compile the mbedtls library from source |
| make install | Install the compiled executable |
| make deb | Create a debian package from the compiled executable |
| make clean | Clean compiled files, but do not touch libraries |
| make distclean | Clean everything |
| DEBUG=1 make | Compile with debug information |
If the mbedtls/mbedtls.a static library exists (first run make mbedtls-bin or make mbedtls-src to get it), then SKrellM is compiled automatically with https:// support in skm_load.
Customization
You can download additional themes and fonts and place them in the configuration directory.
Configuration
On Linux the $HOME/.config/skrellm, and on Windows the %APPDATA%\Local\skrellm directory is used with the following files:
config
Warning
There's not much error checking, make sure the config file is syntactically correct!
This is a simple INI file with key=value pairs in each line. For example:
width=64 geometry=-0+32 refresh=250 levels=75,90,95 theme=default plugins=hostname,uname,date,time,cpu,proc,net,disk,df,mem,bcdclock,uptime time=%H:%M,%S cpu=+ net=enp2s0,ath0
| Key | Description |
|---|---|
| backend | (optional) you can disable the autodetection and force using a backend |
| dock | if 1 then tells the WM to threat its window as dock |
| width | width of the meters in pixels |
| geometry | where to place the window and gravity, {+-}xpos{+-}ypos |
| refresh | refresh rate in milliseconds, from 10 (1/100 secs) to 10000 (10 seconds) |
| dpi_scale | scale factor, from 1.0 to 10.0 (defaults to the GDK_SCALE env) |
| levels | three comma separated values: alert, warning, error percentage |
| theme | name of the theme to be used (without the .png extension) |
| plugins | comma separated list of enabled plugins, also defines their order |
| uname | a list of snrvm characters, same as the uname command flags |
| date | date display format string (see strftime for more details) |
| time | time display format string (see strftime for more details) |
| mem | a list of m (memory) and s (swap) |
| cpu | cpu load, composite list (+ gives one meter, otherwise one per cpu core) |
| disk | disk activity, composite list (devices) |
| df | disk usage, composile list (mount points / drive letters) |
| net | net activity, composite list (network devices) |
| battery | battery capacity, compisite list (battery device) |
| thermal | temperature, composite list (sensor names) |
Composite list: if not set, then lists all instances in their own separate meters. If set, then it's a comma separated list of instance names and only displays those that are listed; finally if it's a + then it shows one single composite meter for all.
If a plugin uses the Simple API's skm_layout, then its layout can be customized with
(plugin).layout=(type),(str),(str),(str),(str)
Here (type) is a space separated list of graph (show graph), 2vals (graph has two values), line (instead of columns), pbar (show progress bar), stat (show status bar) and stick (show percentage value with a stick icon on status bar).
The (str) values refer to the strings provided by the plugin (up to 4), and consist of two space separated words: the first word is a position tl (top left), tc (top center), tr (top right), bl (bottom left), bc (bottom center), br (bottom right) on graph, or l (left), c (center), r (right) on status bar. The second word specifies the font style, title, label, value, small (which font these use at which size and wether they have a shadow or not comes from the theme). For example:
net.layout=graph line 2vals stat,l small
This draws the network activity with lines and places the device's name on the status bar aligned to the left with the small font style.
self
This file only exists when SKrellM is running, and it is a plain text file with a single decimal number in it. Under Linux (and other POSIX systems) it contains the pid, and you can send signals to it: SIGHUP will make it reload the configuration, and SIGINT quits.
1
kill(value_from_self_file, SIGHUP);
Under Windows, this file contains the window handle, you can send WM_APP message to make it reload its configuration, and WM_CLOSE to make it quit.
1
PostMessage(value_from_self_file, WM_APP, 1, 1);
The primary purpose of this file is to allow an external configuration GUI to trigger the already running SKrellM instance.
Fonts (*.sfn)
Vector font files are used to display text and they must be in Scalable Screen Font format. They are loaded from this directory directly, so no system font registry plays part (no fontconfig mess, no whatever).
Fonts in TrueType, OpenType, X11 BDF, Console PSF2 etc. formats can be converted into .sfn with the sfnconv command line tool.
Themes (*.png)
All the other files must be special PNG files which hold SKrellM theme definitions. Themes might also contain an embedded font.
Plugins
Plugins were carefully designed to be platform independent. Unlike in gkrellm, they don't need to know nor care about the actual backend. Similary to gkrellm, there's two API, one easy for simple plugins, and an advanced API for full control.
Writing plugins
To create a new plugin, one needs to pick a unique name plgname and create a plgname.c source file under src/plugins. In this file, the src/skm_plugin.h header must be included, and it must implement three functions (replace plgname with your actual unique plugin name in these):
plgname_init
1
void plgname_init(char *cfg)
- Description
- Should initialize the plugin. It receives a configuration string from the config file, which might be empty. Parsing this is up to the plugin, no restrictions (you can use skm_list on it for example).
- Parameters
-
Argument Description cfg configuration string
plgname_free
- Description
- Should free any memory that plgname_init has allocated.
plgname_draw
1
void plgname_draw(int full)
- Description
- Should gather meter data and use skm_*() functions to draw the meter.
- Parameters
-
Argument Description full set when doing a full refresh Note
The actual refresh delay is user configurable. A full refresh is done once per second if the delay is smaller than a second, or every time if the delay is bigger. Without a full refresh, only the progress bars and the led indicators are updated.
Register
1
SKM_PLUGIN(plgname, desc, type, pos0, pos1, pos2, pos3, fnt0, fnt1, fnt2, fnt3)
- Description
- Finally, the source file must end with this line that informs SKrellM about the existence of the plugin and its default text placements and default styles (might be overriden by the theme and user config). Note, there's no ; semicolon after this.
- Parameters
-
Argument Description plgname unique name of the plugin desc description (displayed with --help) type default layout type (OR'd TYPE_* defines) pos0-3 default text positions (one of POS_* defines) fnt0-3 default text font styles (one of FONT_* defines)
Global Variables
There are some global read-only variables that plugins can access:
| Variable | Description |
|---|---|
| verbose | verbosity level, by deafult 0 |
| width | the width of the meters in pixels, 32 to 256 |
| height_graph | the graph's height in pixels |
| height_pbar | the progress bar's height in pixels |
| height_stat | the status bar's height in pixels (also the icon's size) |
| levels[] | user configured alert levels (in percentage) |
| colors[] | theme defined colors, uint32_t array, index with COLOR_* defines |
| lngcode | string to the user specified language code (eg. en or en_US) |
Misc API
Hint
These are just convenience functions, you can use stdio's, unistd's or string's functions as you like instead.
skm_load
1
void *skm_load(char *fn, int *len)
- Description
-
Loads a file's content as a zero terminated string into a static buffer and returns the buffer address. DO NOT free
the returned buffer when called with a local file. It loads bytes up to 64k, and works with /proc and /sys files as well (which
usually report zero file size).
Important
If mbedtls is compiled in, then fn might start with https://, and in this case the returned buffer is allocated and can be any size. When called with an URL, then it is the caller's responsibility to call free on the returned buffer.
- Parameters
-
Argument Description fn file name, absolute path or https:// URL len (optional, can be NULL) variable to store the number of bytes loaded - Return Value
- Returns NULL on error otherwise the contents of the file and its size in the len variable.
skm_json
1
char *skm_json(char *json, char *key)
- Description
- Returns a pointer to a value in json for a key. In case https:// is enabled and a plugin wishes to use a REST API of some service (like a weather forecast).
- Parameters
-
Argument Description json zero terminated JSON string key path to a value, like "0.6.0.1" or "result.items.0.name" - Return Value
- Returns NULL if key not found, otherwise pointer to the value.
skm_list
1
int skm_list(char *needle, char *haystack)
- Description
- Checks if needle is listed in the comma separated haystack list.
- Parameters
-
Argument Description needle string to look for haystack comma separated list or + - Return Value
- Returns 0 if not listed, 1 if found and -1 if list is composite.
String parsing
1
2
3
4
char *skm_eol(char **s, char *end, char sep);
char *skm_name(char **s, char *e, char sep);
int64_t skm_int(char **s, char *e, char sep, int base);
void skm_skip(char **s, char *e, char sep);
- Description
- First one returns the end of the line, the second a name string, the third an integer number, and the last skips a column.
- Parameters
-
Argument Description s string to parse e end of the line (returned by skm_line) end end of the entire string sep column separator character (most likely space) base either 2, 8, 10 or 16 - Return Value
- In case of skm_int an integer, otherwise a string pointer. The functions adjust s to the next column.
Simple API
This is really-really simple, the plugin doesn't have to care about displaying anything, it just needs to fill in the fields in the layout and do a single function call.
skm_layout
1
void skm_layout(layout_t *lyt)
- Description
- Outputs a layout, should be called from *_draw. A plugin can call this multiple times if there are multiple meters of its kind.
- Parameters
-
Argument Description lyt filled in layout Field Description type a bitfield that tells which part of the layout should be drawn value[0] progress bar and graph's value (input, read, receive, etc.) value[1] second graph value (output, write, sent, etc.) min / max fixed graph scale, minimum and maximum values (optional) icon_l icon on the left on the status bar (optional, 0 if none) icon_r icon on the right on the status bar (optional, 0 if none) str[4] strings to display (optional, NULL if none) - Layout
-
The bitfield in type tells which parts to draw and how, for example TYPE_GRAPH | TYPE_2VALS | TYPE_PBAR | TYPE_STAT will
display a graph with columns and two values on top of each other, a progress bar, and a status bar as well. The values are
passed in the value[] array. If min and max is set, then the graph is drawn accordingly to that scale, otherwise if
both zero, then min and max calculated automatically from the last 256 values.
+----------------------------+ | POS_TL POS_TC POS_TR | TYPE_GRAPH | | TYPE_2VALS | POS_BL POS_BC POS_BR | TYPE_LINE +----------------------------+ | percentage | TYPE_PBAR +----------------------------+ | POS_L POS_C POS_R | TYPE_STAT | icon_l icon_r | TYPE_STICK +----------------------------+
A layout can display additionally 4 strings, their default position (graph or status bar, left or right, etc.) and font style is specififed in SKM_PLUGIN, but the theme might override and the user can alter these too in the config file. For the available defines, see skm_text's description below.
Similarly, the status bar might have text on it, but it might also have icons, these can be found in the skm_icon's description. The actual images for these icons come from the theme.
When the TYPE_PBAR type is set, then there's a progress bar indicating value[0] which must be a percentage. This will be color coded, from normal to alert, warning and error. If value[0] is negative, then its absolute value is used and the color code is reversed (so 100% will be normal not 0%), this is mostly used for battery levels only.
If there's no TYPE_PBAR, but there's TYPE_STICK then the status bar has a "stick" icon at value[0] percentage.
Advanced API
This is selected if the plugin calls skm_pbuf instead of skm_layout.
Warning
Direct manipulation of the pixel buffer is certainly possible, but ill advised. The pixel buffer lines usually have more bytes than four times width, therefore rows must be addressed by a pitch value (stride). The advanced API functions also take care not to write outside of the valid width x h area (doing so would certainly ruin the frame or might even cause segfault).
skm_pbuf
1
uint32_t *skm_pbuf(int h, int *p);
- Description
- Expands the pixel buffer vertically by h pixels and returns the pixel buffer's address and pitch. Each row starts at multiple of this pitch, and the returned buffer's size is width x h pixels. Each pixel is 4 bytes ARGB, with the blue channel in the least significant byte, and alpha in the most. This format is always the same, regardless to the platform and the actual backend.
- Parameters
-
Argument Description h the requested height p the returned pitch in bytes (not pixels!) - Return Value
- The pixel buffer's address and number of bytes in a row in p.
skm_draw
1
void skm_draw(int x, int y, uint32_t color)
- Description
- Draws one pixel. This alpha blends the pixel with the existing one, and keeps the bigger alpha.
- Parameters
-
Argument Description x the X coordinate to draw to, in pixels y the Y coordinate to draw to, in pixels color an ARGB color, blue in least significant byte
skm_line
1
void skm_line(int x0, int y0, int x1, int y1, uint32_t color)
- Description
- Draws a line. This alpha blends the pixel with the existing one, and keeps the bigger alpha.
- Parameters
-
Argument Description x0 the X coordinate to draw from, in pixels y0 the Y coordinate to draw from, in pixels x1 the X coordinate to draw to, in pixels y1 the Y coordinate to draw to, in pixels color an ARGB color, blue in least significant byte
skm_plot
1
void skm_plot(int x, int y, uint32_t color)
- Description
- Plots one pixel, this just blindly overwrites the old pixel. This can be used to clear the alpha channel.
- Parameters
-
Argument Description x the X coordinate to draw to, in pixels y the Y coordinate to draw to, in pixels color an ARGB color, blue in least significant byte
skm_rect
1
void skm_rect(int x, int y, int w, int h, uint32_t color)
- Description
- Draws a filled rectangle, blindly overwriting any existing pixels. This can be used to clear the alpha channel.
- Parameters
-
Argument Description x the X coordinate to draw to, in pixels y the Y coordinate to draw to, in pixels w width of the rectangle in pixels h height of the rectangle in pixels color an ARGB color, blue in least significant byte
skm_icon
1
void skm_icon(int x, int y, int icon)
- Description
- Blits a theme icon onto the pixel buffer.
- Parameters
-
Argument Description x the X coordinate to draw to, in pixels y the Y coordinate to draw to, in pixels icon one of the ICON_* defines Define Description ICON_NONE no icon displayed (with icon_l and icon_r) ICON_STICK only with skm_icon(), TYPE_STICK's stick ICON_LED_OFF a gray inactive led ICON_LED_IN an active led with input / read color ICON_LED_OUT an active led with output / write color ICON_LED_0 an alternative led, inactive ICON_LED_1 an alternative led, active ICON_MAIL_NONE an empty mailbox icon ICON_MAIL_NEW a mailbox with new, unread mail icon ICON_ALERT an alert icon (needs user attention) ICON_WARN a warning icon (the meter is at a dangerous level) ICON_ERROR an error icon (meter indicates a malfunction) ICON_CHARGING a battery is charging icon ICON_SUNNY weather sunny (clear day) ICON_CLOUDY weather cloudy ICON_RAINY weather rainy ICON_STORM weather storm ICON_SNOWY weather snowy ICON_WINDY weather windy ICON_WINDSTORM weather windstorm ICON_NIGHT weather clear night
skm_pbar
1
void skm_pbar(int x, int y, int w, int percent)
- Description
- Blits a progress bar onto the pixel buffer. If percent is negative, then its absolute value is used, and the level color codes will be reversed (so 100% will be normal, and 0% will be an error).
- Parameters
-
Argument Description x the X coordinate to draw to, in pixels y the Y coordinate to draw to, in pixels w width of the progress bar in pixels percent percentage to represent
skm_blit
1
void skm_blit(int x, int y, int w, int item)
- Description
- Blits a theme item onto the pixel buffer.
- Parameters
-
Argument Description x the X coordinate to draw to, in pixels y the Y coordinate to draw to, in pixels w width of the item in pixels (height for sides) item one of the ITEM_* defines Define Description ITEM_LEFT frame left side (w is height) ITEM_RIGHT frame right side (w is height) ITEM_TOP frame top ITEM_BOTTOM frame bottom ITEM_METER meter background (an empty panel) ITEM_GRAPH graph background (panel with chart) ITEM_PBAR progress bar background ITEM_PN progress indicator normal ITEM_PA progress indicator alert ITEM_PW progress indicator warning ITEM_PE progress indicator error ITEM_STAT status bar background ITEM_SINGLE isolated status bar
skm_copy
1
2
void skm_copy(int x, int y, int w, int h,
uint32_t *src, int sp, int sx, int sy, int sw, int sh)
- Description
- Blits another pixel buffer onto the pixel buffer. If w is bigger than sw or h is bigger than sh, then it repeats the source image.
- Parameters
-
Argument Description x the X coordinate to draw the image to, in pixels y the Y coordinate to draw the image to, in pixels w destination width to draw in pixels h destination height of draw in pixels src source pixel buffer sp source pitch sx source X coordinate to take the image from, in pixels sy source Y coordinate to take the image from, in pixels sw source width of the image in pixels sh source height of the image in pixels
skm_text
1
void skm_text(int x, int y, int font, int ha, int va, const char *str)
- Description
- Draws a string as text to the pixel buffer. The typeface, font size, text color and padding is defined by the theme.
- Parameters
-
Argument Description x the X coordinate to draw the text to, in pixels y the Y coordinate to draw the text to, in pixels font one of the FONT_* defines ha horizontal alignment: -1 right, 0 centered, 1 left va vertical alignment: -1 top, 0 middle, 1 bottom str a zero terminated UTF-8 string Define Description FONT_TITLE title font style FONT_LABEL label font style FONT_VALUE value font style FONT_SMALL small font style FONT_GRTIT title font style on graph FONT_GRLAB label font style on graph FONT_GRVAL value font style on graph FONT_GRSML small font style on graph
Theme
A SKrellM theme is a single image, which can be easily created in CLI mode.
File Manipulation
skrellm --unpack <theme.png>
Extracts a theme image into multiple files to a directory (same name as the image, but without the .png).
skrellm --pack <directory>
Packs directory contents into a single theme image file (same name as the directory, but .png added).
Hint
These also look for the theme in the configuration directory. To use the current working directory, prefix with ./.
Theme Structure
The theme directory must contain one plain text file and several PNG images with fixed names. The SKrellM window is constructed using these images.
+-------+ frame top |.+---+.| | | | | meter |.+---+.| | | | | meter |.+---+.| |.+---+.| meter | | | | meter |.+---+.| +-------+ frame bottom
The layout is various meters arranged on a vertical stack, surrounded by a frame.
There's a frame top and bottom, and each meter has its own frame left and frame right. The meters in the middle all have the same width pixels width, although their height might be different. This is independent to the frame side widths (meter's width is defined by the user, while frame side widths come from the theme images).
Meta Data
Warning
There's not much error checking, make sure the meta file is syntactically correct!
The text file in the directory is called meta, which is a simple INI file with key=value pairs in each line. For example:
author=John Doe copyright=MIT padding=1 2 back=101010ff fore=7e7e7eff input=007e00ff output=00007eff grid=202020ff title=7e7e7eff 2020207f 16 FreeSans label=7e7e7eff 2020207f 12 FreeSans value=7e7e7eff 2020207f 12 FreeSans small=7e7e7eff 00000000 10 FreeSans
| Key | Description |
|---|---|
| author | theme author's name |
| copyright | theme's copyright |
| padding | space separated vertical and horizontal padding in pixels |
| back | panel background color (RGBA, HTML color code) |
| fore | panel foreground color |
| input | graph input color |
| output | graph output color |
| grid | graph grid color |
| title | centered font style (HTML color, shadow, size, font name) |
| label | left / right font style |
| value | left / right font style |
| small | small text font style |
| grtit | centered font style on graph |
| grlab | left / right font style on graph |
| grval | left / right font style on graph |
| grsml | small text font style on graph |
| (plugin).layout | override plugin styles, same format as in config |
Frame top
+----+------+----+ | tl | tc | tr | +----+------+----+ <--width-->
The frame top is constructed from tl.png, tc.png and tr.png. These must be of the same height. The left part is placed once, the right part likewise, then the gap between is filled by horizontally repeating the center image.
Note that the left and right image widths are independent to the actual width. The only assumption is, that the entire block's width equals to width plus frame side widths.
Frame sides
+----+---------+----+ | lt | | rt | +----+ meter +----+ | lc |<------->| rc | +----+ width +----+ | lb | | rb | +----+---------+----+
For both sides, the frame is constructed from three images. On the left lt.png, lc.png and lb.png, and on the right rt.png, rc.png and rb.png. Images of the left and right must have the same width. First the top image is placed, then the one at the bottom, finally the gap is filled in by repeating the center part vertically.
Horizontally the middle part is width pixels wide and it contains the meter.
Frame bottom
<--width--> +----+------+----+ | bl | bc | br | +----+------+----+
Just like top, the frame bottom is contructed from bl.png, bc.png and br.png. These must be of the same height. The left part is placed once, the right part likewise, then the gap between is filled by horizontally repeating the center image.
Note that the left and right image widths are independent to the actual width. The only assumption is, that the entire block's width equals to width plus frame side widths.
Meter background
<------width-----> +----+------+----+ | | | | | ml | mc | mr | | | | | +----+------+----+
The empty meter's background is also constructed from three images of the same height, ml.png, mc.png and mr.png, similarily placing left and right first, then filling the gap by repeating horizontally the center piece.
Here the entire block's width is width pixels. This is never used by SKrellM, but plugins might want an empty background when they use the Advanced API.
Graph meter
<------width-----> +----+------+----+ | | | | | gl | gc | gr | | | | | +----+------+----+
The graph area's background is also constructed from three images of the same height, gl.png, gc.png and gr.png, similarily placing left and right first, then filling the gap by repeating horizontally the center piece.
Here the entire block's width is width pixels. The graph's height is usually much larger than the other meter heights.
Progress bar meter
<------width-----> +----+------+----+ | pl | pc | pr | progress bar background +----+------+----+ +--+------+--+ |nl| nc |nr| normal bar +--+------+--+ |al| ac |ar| alert bar +--+------+--+ |wl| wc |wr| warning bar +--+------+--+ |el| ec |er| error bar +--+------+--+
All of these images must have the same height. The progress bar's background is drawn using pl.png, pc.png and pr.png. As for the progress indicator, there are four different kinds, and note that their left and right widths should be smaller than the background's left and right.
The indicator images should look the same, and they should only differ in color, indicating normal progress bar, alert, warning and error levels. Only one of these is used on a meter at any given time.
Status bar meter
<------width-----> +----+------+----+ | sl | sc | sr | +----+------+----+ +----+------+----+ | il | ic | ir | +----+------+----+
The status bar's background is also constructed from three images of the same height, sl.png, sc.png and sr.png (when there's a graph or progressbar) or il.png, ic.png and ir.png (when it's isolated), similarily placing left and right first, then filling the gap with by repeating horizontally the center piece.
Icons
The theme icons must have the same width and height, and that also has to match the status bar's height.
- stick.png - the percent indicator "stick"
- led_off.png - a gray inactive led
- led_in.png - an active led with input / read color
- ...etc.
These have the same name as the ICON_* defines, just in lowercase and without the prefix.
Font
The font.sfn file is optional. If it exists, then it will be embedded in the theme, and will be used regardless to what font name was specified. If it's missing, then fonts are loaded from the file system.
Theme File
It is a normal PNG file, just with a special smTh chunk in it, with the following data:
| Offset | Size | Description |
|---|---|---|
| 0 | 2 | theme version (0 for now) |
| 2 | 1 | vertical padding |
| 3 | 1 | horizontal padding |
| 4 | 12 | frame left |
| 16 | 12 | frame right |
| 28 | 12 | frame top |
| 40 | 12 | frame bottom |
| 52 | 12 | empty meter background |
| 64 | 12 | graph (chart) background |
| 76 | 12 | progress bar background |
| 88 | 12 | progress indicator normal |
| 100 | 12 | progress indicator alert |
| 112 | 12 | progress indicator warning |
| 124 | 12 | progress indicator error |
| 136 | 12 | status bar background |
| 148 | 12 | single status bar background |
| 160 | 3*12 | reserved for future use |
| 196 | 32 | title font style |
| 228 | 32 | label font style |
| 260 | 32 | value font style |
| 292 | 32 | small font style |
| 324 | 32 | graph title font style |
| 356 | 32 | graph label font style |
| 388 | 32 | graph value font style |
| 420 | 32 | graph small font style |
| 452 | 8*32 | reserved for future use |
| 708 | 4 | background color |
| 712 | 4 | foreground color |
| 716 | 4 | input graph color |
| 720 | 4 | output graph color |
| 724 | 4 | grid graph color |
| 728 | 3*4 | reserved for future use |
| 740 | 64 | author |
| 804 | 64 | copyright |
| 868 | 2*64 | reserved for future use |
| 996 | 16*24 | plugin style overrides |
As for the items, each record looks like (sides store width, height, height, height; but the same structure, all the others store height, width, width, width):
| Offset | Size | Description |
|---|---|---|
| 0 | 2 | x |
| 2 | 2 | y |
| 4 | 2 | height / width |
| 6 | 2 | left width / top height |
| 8 | 2 | middle width / middle height |
| 10 | 2 | right width / bottom height |
Font styles:
| Offset | Size | Description |
|---|---|---|
| 0 | 4 | text color |
| 4 | 4 | shadow color (or 0 if none) |
| 8 | 1 | size (8 to 192) |
| 9 | 23 | font's name |
Colors are stored as blue channel in the least significant byte, alpha in the most.
The author and copyright are zero terminated UTF-8 strings.
Finally the plugin style overrides look like:
| Offset | Size | Description |
|---|---|---|
| 0 | 15 | plugin name |
| 15 | 1 | type override |
| 16 | 1 | string #1 position override |
| 17 | 1 | string #2 position override |
| 18 | 1 | string #3 position override |
| 19 | 1 | string #4 position override |
| 20 | 1 | string #1 style override |
| 21 | 1 | string #2 style override |
| 22 | 1 | string #3 style override |
| 23 | 1 | string #4 style override |
If the PNG chunk is bigger than this fixed size (1380 bytes) structure, then there's an embedded font, and data in SFN format follows (could be gzip compressed).
Licenses
The SKrellM is Free and Open Source software available under the
GPLv3+ or any later version of that license.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.