The design rules
These rules say how a process of this system looks. They are taken from the boot display (src/library/modus/bootscreen/). The boot display is the model.
A new graphical module follows these rules. The modules of the desktop that came before do not follow all of them yet: see "State" at the end.
Why rules. One look across the system lets a reader trust what a screen says: a value always has the font of the cells and the color of its kind, a concept always has its color, and each number on a screen names the record that it comes from. The rules live as one table of color tokens (src/library/modus/graphics/rules.odin), with a value in the dark and in the light appearance, so a change of a color changes every process and the site at once.
For whom. A reader who writes a graphical module, and a reader who changes the desktop or the site.
Read before. Nothing. The interface of the processes gives the package that draws the elements; The text of the system: a vector font with subpixel bands the fonts.
The map of this guide. Sections 1 to 8: what is on the screen, forms, surfaces, color, text, spacing, cost, decoration. Section 9: the desktop. Section 10: the elements. Section 11: the mark. Section 12: the card of the boot image. "State": which modules follow the rules.

The rules live as one table in src/library/modus/graphics/rules.odin: the spacing tokens, the text size tokens, and the color tokens (the surfaces, the colors of the concepts and the colors of the desktop) in the dark and the light appearance, with mix, shade, block and gradient. The compositor and the processes read a token through the appearance in force (graphics.colors.text); the boot display reads the dark values (graphics.DARK_TEXT). A process does not repeat a color of the rules as its own constant. The tables of this guide name a token colors.text.
1. What is on the screen
- Each thing on the screen is a fact of a record. A display invents nothing.
- Each card has a caption that names its record, for example
Boot_Report.stages. A reader can find the source of each number. - A record that is all zero is valid. Its card says "not known yet", in the dim color. A card never shows a zero as if it was a measure.
- A size on the screen carries a fact when it can: the width of a stage is its duration, the width of a part of a size strip is the size of its file. A form has a least width, so that it stays visible.
- A name is whole or absent: a form that is too narrow for its name shows no name, and the name is said elsewhere when a reader needs it. A name is never cut.
- A step is an interface, not a printed line: a list of steps shows each step with its state ("done", "now", "failed").
2. Forms
Forms are rectangles by preference, because a rectangle can carry a measure (its width or its height) and lines up with its neighbours. Other forms are allowed where they say more.
- Rectangular forms are the preference of the design, not an absolute rule. A form is a rectangle unless another form says more. Any geometry can be drawn, sparingly; a round form can be right in some cases. The look to avoid: everything is a rounded blob.
- A point or a mark is a square.
- A line is a rectangle that is 1 or 2 pixels thick.
- Lines at an angle are allowed. The boot display keeps its own use of them: a part that has no measure on this scale (the firmware before the line of time).
- The look is sober by choice. A shadow is sharp, with no blur. Transparency is used only where it informs, as a menu over the window that it acts on. An animation is short, and only says a change of state. A blur comes later, with the GPU.
- These rules are the look of the desktop of the system. They are not limits of the draw table: a process can draw any form, alpha, paths and effects (Kernel properties: One 2D interface: the draw table).
3. Surfaces
A surface is a level of depth: the background, a card on it, and a track inside a card. The sign of depth of these levels is a gradient from lighter at the top to darker at the bottom. A surface that lies over another one, as a menu or a window over the desktop, can also have a sharp shadow (section 2).
There are three levels. Each is a color token of the package, with a value in each appearance (section 4, "The appearances").
| Level | Token | Dark | Light | Use |
|---|---|---|---|---|
| Background | colors.background | 0x0B1018 | 0xF4F6F8 | Under all cards. A grid of points of 2 pixels, each 24 pixels, lies on it, in colors.point (0x18212D; 0xDDE2E8) |
| Card | colors.card_top, colors.card_bottom | 0x17212E at the top to 0x111822 at the bottom | 0xFFFFFF to 0xF9FAFB | The frame of one subject |
| Track | colors.track | 0x1C2633 | 0xD6DBE0 | The empty part of a bar, a band or a tube |
A surface that lies over the desktop, as a menu or a dialog, takes three more tokens. Each is darker than a card in both appearances. A shade of the background in the light appearance is near black: a black box around a light card, not a depth.
| Part | Token | Dark | Light | Use |
|---|---|---|---|---|
| Shadow | colors.shadow | 0x06080D | 0xC3CAD2 | The sharp shadow of a menu or a dialog; under 2 to 1 on the light background |
| Edge | colors.edge | 0x05070B | 0x808B99 | The outer line of a menu or a dialog; 3 to 1 on the light background and cards |
| Recess | colors.recess | 0x0D131B | 0xF4F6F8 | A list sunk into a card: the stores of the dialog of the powerbox |
- A surface has a color that goes from lighter at the top to darker at the bottom. This is the sign of depth of the three levels.
- A card has a border of 1 pixel in its accent, darker at the bottom (
graphics.card_border_colors). In the dark appearance it is the accent at 28 % at the top and 14 % at the bottom. In the light appearance it is the accent mixed into white, 40 % at the top and 55 % at the bottom: the dark rule on a white card is a black frame. - A full part of a bar goes from 120 to 130 % of its color at the top to 78 % at the bottom.
4. Color
Color carries meaning, so each color names one concept of the system: the kernel is always blue, a process always green, a failure always coral. The table is in src/library/modus/graphics/rules.odin, and every process reads it.
One color is one concept, as one term is one concept.
| Concept | Token | Dark | Light |
|---|---|---|---|
| Firmware | colors.firmware | 0x8E7CC3 | 0x7566A1 |
| Boot program | colors.boot_program | 0xE0A040 | 0x906729 |
| Kernel | colors.kernel | 0x4A9CF0 | 0x3571AF |
| Process | colors.process | 0x58D878 | 0x327C45 |
| Memory | colors.memory | 0x38C0B0 | 0x247C71 |
| Machine | colors.machine | 0xD070B0 | 0xA15688 |
| A module with no entry export | colors.no_entry | 0xC8C058 | 0x6D6930 |
| A resource of the boot image | colors.resource | 0x9AA8C8 | 0x5C6478 |
| Failed | colors.failed | 0xF06060 | 0xBA4A4A |
| Stop a process | colors.stop_process | 0xB82232: a rich red, the color of the close button of a window | 0xB82232 |
| Not usable | colors.not_usable | 0x4A5563 | 0xA9B2BD |
| Text | colors.text | 0xDCE4EC | 0x0B1018 |
| Dim text | colors.dim | 0x7C8A99 | 0x4A525B |
| Strong text: the text that an input types, the outline of the focus | colors.text_strong | 0xFFFFFF | 0x000000 |
| Warning: a state that asks for attention and is not a failure (a warning of the log, a full ring) | colors.warning | 0xF0C050 | 0x886D2D |
| Near its limit: a measure near its limit, the very high intensity step of a gauge | colors.near_limit | 0xF2843C | 0xA85C29 |
| Link | colors.link | 0x6CB4F0 | 0x3B6283 |
- The state of a thing has three colors: the color of the boot program while it starts, the color of a process when it runs, the color "failed" when it failed. A state that asks for attention is a warning; a thing that is stopped and cannot be used is "not usable".
- Two neighbours of one concept take two shades of its color, so that their limit is visible.
- If a thing has an identity (a hash), its color can come from the hash. A thing that changes takes a new color.
- The series colors (
colors.series) tell apart the members of one series: several things of one kind that no concept tells apart, as the threads of a process, the processes of the log, the records of a ring, the protections of a page. A member takes the series color of its number; a ninth member takes the first color again. A member is never the only sign: a number or a word names it.
| Number | Dark | Light |
|---|---|---|
| 0 | 0x4696FF | 0x3471C1 |
| 1 | 0xFF963C | 0xA35F26 |
| 2 | 0x5AE66E | 0x32803D |
| 3 | 0xDC64FA | 0xA44ABB |
| 4 | 0xE06890 | 0xB05171 |
| 5 | 0x60D8D0 | 0x367A76 |
| 6 | 0xD8D860 | 0x747433 |
| 7 | 0x9CC040 | 0x617828 |
- A process takes each color from the tokens, by its meaning: no window holds a color value of its own. A picture that a process computes keeps its pixels: its legend takes the token.
- A color never stands alone for a fact: a text or a place says the same fact.
The intensity of a gauge
A gauge is a bar on the track whose length is a share: the memory in use, the processor share of a process. A gauge takes the color of its intensity step (Glossary), from graphics.intensity_of and graphics.intensity_color:
| Step | From | Color |
|---|---|---|
| Normal | 0 % | The concept that the gauge measures: memory, process |
| High | 60 % (INTENSITY_HIGH_PERCENT) | warning |
| Very high | 85 % (INTENSITY_VERY_HIGH_PERCENT) | near_limit |
- A share at a threshold is in the higher step. A share past 100 % is very high.
- Three steps, never a continuous hue: each color keeps one meaning, and the number beside the gauge says the value.
- Each color of each step keeps 3 to 1 as a graphic on the track and on the background, in both appearances; host tests compute each pair (
src/library/modus/graphics/intensity_test.odin). - The design: The window of `monitor` in the repository.
The appearances
The desktop has two appearances: dark and light. The setting appearance chooses one: auto, the default, dark or light (The text of the system: a vector font with subpixel bands: The setting). With auto the light appearance holds from 07:00 to 19:00 of the local time, and the dark one at night; a system with no date is dark. The settings page holds the appearance in force, and each window draws once at a change. The design: The appearance in the repository.
- One table. Each color of the rules is a color token, with one value in each appearance: the tables of sections 3 and 4.
graphics.colorsholds the tokens of the appearance in force of a process;displaygives it the appearance of the settings page, and the interface package reads it at each frame. - The light appearance is the light form of the site. The background is the light background of the mark, a card is white, the text is the dark background of the dark appearance. A concept is its accent at the shade that its value kind has on the light page of the site: the same color in a window and on a page.
- What does not change. The blue of the title bar, the chosen blue, the red of the close button, and white on them: white keeps its contrast on them in both. The pointer is black and white. The boot display is dark: the boot program draws before any setting is read, and the display is the model of the rules. A picture keeps its pixels; the heron button stays night blue, and its heron keeps the colors of the dark background.
- The colors of code, of values and of the scroll bar have a value in each appearance:
code_class_color,value_kind_colorandscroll_bar_colors_oftake the appearance. - The contrast. Each pair that a rule of this guide names keeps its bound in both appearances: a text 4.5 to 1, a large text and a graphic 3 to 1. A series color is a text on the background and on a card, and a graphic on the track; a link keeps 4.5 to 1 on the track, the band of a link with the focus. Host tests compute each pair from the table (
src/library/modus/graphics/appearance_test.odin,palette_colors_test.odin,value_colors_test.odin). A concept is never a text on the track: in the light appearance it has about 3.6 to 1 there. - The windows of the processes take each color from the tokens, so each follows the appearance. Two things stay dark: the boot display, and the stage of
heron, a picture of the dark mark on its dark background.
The colors of code
Code has one set of colors wherever it is shown: on the site, and in the console of the system. The table is src/library/modus/graphics/code_colors.odin (Code_Class, code_class_colors); the site (tools/modustool/site/site_code.odin) and the terminal (src/library/modus/terminal/code_runs.odin) read it. Each class is an accent of the concepts, moved toward white on a dark surface and toward black on the light page of the site.
| Class | What | Accent | Dark: shade, color | Light: shade |
|---|---|---|---|---|
| Keyword | A word of the language | Kernel | 115 %, 0x64AAF2 | 55 % |
| Type | A type, or a name in the place of a type | Firmware | 115 %, 0x9E8FCB | 60 % |
| Literal | A number, a text, a constant, a member | Memory | 100 %, 0x38C0B0 | 50 % |
| Name | The name of a function or of a declaration | Process | 100 %, 0x58D878 | 45 % |
| Directive | A directive or an attribute | Machine | 115 %, 0xD785BB | 55 % |
| Comment | A comment, or words that are not code: quiet | Dim | 125 %, 0x9CA6B2 | 60 % |
| Punctuation | An operator or punctuation: quiet | Dim | 140 %, 0xB0B8C1 | 50 % |
- A part with no class has the color of the text around it.
- Each class has at least 4.5 to 1 on each surface that shows code: the block of code of the site in both forms, and the background and the card in the terminal. Host tests compute each contrast.
- On a chosen row (
colors.chosen, section 10), no class keeps that contrast: the row is white.
The colors of values
A technical value has one color wherever it is shown: on the site, and in the processes of the system that show values of mixed kinds, as the log does. The kinds are the value kinds (Glossary, src/library/modus/contract/value_kinds), one enumeration for the site and the system. The colors are one table, src/library/modus/graphics/value_colors.odin (value_kind_colors); the site (tools/modustool/site/site_values.odin), the process log and the drawers of the console read it. The console gives a field of a record the kind that its description states (The line of the console: The drawers). The site keeps only what is its own: the title and the meaning of each kind (The site: The kinds of values in the repository). The icon of each kind is one table too ("The icons of the kinds"). No kind and no color is new: the log uses the kinds of the site, so no new decoration exists.
The kinds that the log writes, on a dark surface (contrast on the background 0x0B1018, the top of a card 0x17212E; a band of a row of the log is the top of a card):
| Kind | Accent | Color | Contrast |
|---|---|---|---|
| Number | Memory | 0x38C0B0 | 8.47 / 7.22 |
| Size | Memory | 0x38C0B0 | 8.47 / 7.22 |
| Time | Boot program | 0xE0A040 | 8.42 / 7.17 |
| Module | Process | 0x58D878 | 10.45 / 8.90 |
| Version | Boot program | 0xE0A040 | 8.42 / 7.17 |
| Status | Failed | 0xF06060 | 5.94 / 5.06 |
- A part with no kind has the color of the text around it.
- Each kind has at least 4.5 to 1 on the background and on both colors of a card, in both appearances (
src/library/modus/graphics/value_colors_test.odin), and on both surfaces of a table of the site in both forms (tools/modustool/site/site_values_test.odin). - A color is never the only sign: the text of the value and its unit say the same fact.
The icons of the kinds
A kind has one icon wherever it is shown: on the site, and in a list of the desktop whose rows are of several kinds. The kind icons (Glossary) are one table of cells, src/library/modus/kind_icons, as the heron of the mark is one table of cells (section 11). The site draws the cells as the rectangles of an SVG picture (The site: The kinds of values in the repository); the system draws them as rectangles of whole pixels (interface.draw_kind_icon). No second set of icons exists.
- The grid is 12 by 12 square cells (
kind_icons.ICON_SIZE). A cell is one pixel in a row of a list: the icon is 12 pixels, in the middle of the 24 pixels of the row. A larger icon has cells of 2 or 3 pixels: 24 or 36 pixels. No icon is scaled by a filter, so each edge is on a whole pixel. - The form is cells only: rectangles, and lines at an angle as steps of cells. An icon has no curve, no shade and no second color.
- The color is given by the display that draws the icon: the color of the value kind, or the color of one fact of the thing (the palette, section 9). The table of the icons holds no color.
- The contrast of an icon on its surface is at least 3 to 1, the bound of a graphic that carries a fact. On a chosen row an icon is white, as the text is.
- An icon never stands alone: the row says the kind in words too. A reader who sees an icon for the first time reads the word.
- The cost: an icon is at most 20 rectangles (
kind_icons.RECTANGLE_LIMIT): a run of cells of a row is one rectangle, and a run that the rows under it repeat exactly is one rectangle with them. The icons of the palette take 3 to 16.
The icon of each value kind:
| Kind | Icon |
|---|---|
| Number | A hash sign |
| Size | Three stacked bars, each wider than the one above |
| Time | A square with two hands |
| Handle | A square ring on a stem |
| Value | One small square |
| Grant | A check mark in steps |
| Status | A flag on its pole |
| Type | Two angle brackets, < > |
| Operation | A line into a box |
| Command | The prompt of a console, >_ |
| Module | A block with a notch in its top |
| File | A page with a corner of steps |
| Guide | A page with three lines of text |
| Term | The capital letter T |
| Version | A tag with a hole |
| Yes | A filled square |
| No | An empty square |
| Procedure | Two parentheses |
| Constant | A lock |
| Variable | A cross of two diagonals |
The desktop lists four kinds of things that are not values (kind_icons.Desktop_Kind):
| Kind | Icon |
|---|---|
| Window | A frame under a title bar of three rows |
| Setting | Two sliders: a line with a knob at the left, a line with a knob at the right |
| Export | An arrow out of a box: the reverse of the icon of an operation |
| Stop: an act that destroys | A full block with a cross cut out of it, as the close button of a window |
- Where the icons show: the site; the rows of the palette and the candidates of a field of its form (section 9).
- Where they do not show: a list whose rows are all of one kind and of one state (a menu of the bar), a heading of a group, a text grid of cells (the console and the completion list of the terminal: an icon is not a character of the font).
- A host test draws each icon as text in its log, and checks that each icon is 12 by 12 cells, has at least 12 cells, differs from each other icon, and that its rectangles cover each of its cells once (
src/library/modus/kind_icons/kind_icons_test.odin).
5. Text
- Two fonts (The text of the system: a vector font with subpixel bands: Which text stays monospace):
- The interface font, B612 (proportional): each text that names or explains: the title and the caption of a card, a label, the name of a button, a line of a list or a menu, the title of a column, a sentence of help.
- The font of the cells, Paper Mono (monospace): each value, and each text that a reader compares character by character or copies: a number in a column, a hash, an address, a text that is typed, code, the console, the terminal, a text grid.
- Both draw at one text size: the height of a line. A label and its value at one text size share one line.
- A text is measured in the font that draws it, and an element cuts a text to its box: no text passes its element in either font.
- With no interface font (absent, refused, or the setting
fontis Spleen 8x16), each text is in the font of the cells, with the same layout rules. - The compositor follows the same rule: the buttons of the bar, the lines of its menus, the titles of the windows, the names, the sentences and the hints of the palette are in the interface font; the clock, the date, the text that is typed in the palette and the counts of the menus and of the palette are in the font of the cells. The mark and its name in square cells do not change. The places of the buttons and of the lines come from the widths of their texts in the font that draws them (the bar layout).
- The boot display, by design, in Spleen only: the boot program holds no glyph cache, so the display is in Spleen, a bitmap font drawn for several sizes, as a text grid is, and the root service and the process
bootdraw the same pixels. Its titles, its names and its values are in that one font. It is laid out in logical pixels, a panel of 976 x 708, and its scale is one of the sizes of Spleen, as the console of Linux takes a font by the resolution: 1 (8x16), 1.5 (12x24), 2 (16x32) or 4 (32x64), the largest whose panel fits the screen with a margin of 8 pixels, in the middle of the screen; on the reference screen, 1.5. Each letter fills its cell (The boot display at the scale of the screen in the repository).
- The font of the cells: the vector font by default, drawn with a coverage for each subpixel band; Spleen 8x16 as the fallback and as the other value of the setting
font(The text of the system: a vector font with subpixel bands). - The text sizes of the desktop are tokens, in logical pixels:
| Token | Text size | Use |
|---|---|---|
text_caption | 14 | A caption: the caption of a card, a label under a value, the help line of the chosen row of the palette, the hash prefix after a nickname in the menu of the windows and in monitor |
text_body | 16 | Each other text, the heading of a group of a list too |
text_heading | 24 | The page heading: the title of a page of manual |
text_large | 32 | The one number of a card |
text_largest | 48 | The one number that a whole window or panel is about: the result of the palette |
- A process can draw a text at any size from 4 to 128 logical pixels (Text rendering: one module for text at any size in the repository). The desktop and the elements of the interface package use the tokens only, so the texts of two windows line up.
- 14 is the smallest size at which both fonts keep an x-height of 6 whole rows; 24 is a whole count of pixels at each scale factor.
- Each element is sized from the measure of its text at its size. Its height is the line of its size times its lines, never a line of 16.
- Two sizes on one line share one baseline: the caption of a card is on the baseline of its title, the hash prefix on the baseline of the nickname.
- A label under a value starts at the line of the value, with no gap: the line holds its descent. A caption is in the dim color, and keeps 4.5 to 1 on each surface of a card; on a chosen row it is white.
- A page heading is over the content of the page and stays when the content scrolls. A heading or a caption wider than its box goes on more lines.
- The font of the cells is monospace: its advance is half the text size, a half up to a whole pixel, the width of a cell, so a layout in cells holds with the vector font and with Spleen. A line is two cells high: 16 at the body, 14 at the caption. A glyph of the font of the cells stays inside its cell.
- The boot display takes no text size token and is not drawn by the text rendering module: its text is Spleen in cells of 8 x 16 logical pixels, at the size of Spleen of its scale (above).
- An enlarged picture of the screen shows colored edges on each letter: the subpixel bands, not a fault. The setting
subpixel_ordernonegives gray edges. - The title of a card is in capital letters, in the bold weight of the interface font, in the accent of the card, after a bar of 4 x 16 pixels in the same accent.
- The system has no italic face. Where a text has italics (the documentation of a module in
manual), the words have a line of 1 pixel under them, in the dim color, and keep their color. A link in such a text is a name in the color of a link; a link that a click opens also has a line of 1 pixel under it, in its color. - A name is in the dim color. A value is in the text color. A measure of a concept is in the color of that concept. Where values of mixed kinds follow one another, as in a line of the log or a table of the site, each value is in the color of its value kind (section 4, "The colors of values").
- A card has at most one number in the large size: the number that the card is about. What it counts is a caption under it.
- Numbers of one column are aligned on the right, each with its unit.
- A sentence follows the language rules of the project: short, exact, one term for one concept.
6. Spacing
The spaces between the elements come from a few named lengths, the spacing tokens, so that the elements of different processes line up and a reader's eye can follow a column. A place and a size are any count of logical pixels; no grid binds them.
| Token | Length | Use |
|---|---|---|
gap | 8 | The space between two cards, between two buttons, between a name and its value |
margin | 16 | The space inside a card, from its border to its content |
title | 40 | The height of the title of a card |
- The tokens are the constants
graphics.GAP,graphics.MARGINandgraphics.TITLEofsrc/library/modus/graphics/rules.odin, beside the text size tokensgraphics.TEXT_CAPTIONtographics.TEXT_LARGEST. - A space between two elements of the desktop is a token, or a sum of tokens. A size that a content gives (the width of a text, of a picture, of a column of values) is that size, with no round up.
- A line of text is its text size (section 5). The height of a text is its lines times its line: 14 for a caption, 24 for a page heading, 32 for the number of a card.
- A label under its value takes no token: it starts at the line of the value. A space between two elements that say two things is a token.
- The tokens are in logical pixels. At a scale factor in eighths, each token is a whole count of pixels of the screen (Glossary: Scale factor).
- A window is placed where the principal puts it, to the pixel, and a drag of an edge gives the size that the pointer gives, to the pixel. The compositor places a new window at steps of tokens (section 9).
- The fixed sizes of an element are not tokens: the bar of 32 pixels, a button and a line of a list of 24, the scroll bar of 17.
7. Cost
Drawing must stay cheap and the same on every machine: integers, rectangles, and no image file to decode.
- Drawing is
fillof rectangles with integer arithmetic. No floating point and no image file. The glyphs of the vector font are drawn by each process from the font outlines, in integers, into its private glyph cache, and a text draw blends their words (The text of the system: a vector font with subpixel bands). - A photograph is not a form of the design. The one place of photographs is the hall of fame: each portrait is pixels that the command
modustool portraitsmade from a picture ofresources/hall_of_fame, shown as one Picture record, with its credit under it. The process decodes no file. - A display does not wait so that a reader can see it. A display that fails stays.
- Each display has a measured draw time.
8. Decoration
Four things carry no fact: the grid of points on the background, the blue of the head of the boot display, which goes darker toward the right, the same blue on the title bar of the window in front (section 9), and the look of the scroll bar (section 10, "The scroll bar"): its gradients across the bar, the inner line and the grip of its thumb, and its blue tones under the pointer. No other decoration exists.
9. The desktop
This section applies the rules of sections 1 to 8 to the screen that a principal sees first: its sizes, colors and behaviour, element by element.
The desktop is the screen of the compositor: the background, the bar, the windows, the two menus of the bar and the palette. It follows sections 1 to 8.
The gradient and the palette
- The gradient of a title bar goes from the blue of the title bar,
0x3F7CC4, at its left to a darker blue at its right. The background of the desktop is not that blue: it is the background of the rules. - The palette is not the start menu. The menu is a list that the pointer opens from the bar. The palette is a panel in the upper third of the screen that a key opens: the input types a part of a name, and the list narrows at each key. It is the way of the keyboard to each operation: it starts a process and reaches a window. The desktop keeps the menus.
Background and bar
- The background is
colors.backgroundwith the grid of points of section 3. The compositor computes it at its start, and again at each change of the appearance. - The bar is 32 pixels high, at the top of the screen by default, or at its bottom (the bar edge). It has the surface of a card (
colors.card_toptocolors.card_bottom) and a line of 1 pixel incolors.trackon the side of the windows: at its bottom under a bar at the top; at its top over a bar at the bottom, with a line of light under it (shade(colors.card_top, 125)). Every element of the bar keeps its place in the bar at both edges, and each menu and popover of the bar opens away from the edge (The edge of the bar in the repository). - The bar holds, from the left: the heron button, 44 by 28 pixels at (4, 2), with the mark of the system in its middle (the heron with cells of 1 pixel, 24 by 24: section 11); the button of the windows, 28 by 28, with the module icon of a list; a groove of a dark line and a line of light; the window plates; at the right, the tray and the clock: the local date and time of day, in the time zone of the setting
time_zone(src/library/modus/contract/date), or the time since the start of the machine while the system has no date. The bar has no label and no hint: each button says what it is by its mark or its icon. - The heron button is a night-blue plate between
colors.titleandcolors.title_end, with an outline ofshade(colors.title_end, 55)and a line of light under its top edge. The body of the heron is the blue of the kernel, so the plate stays darker than it in both appearances. Under the pointer the plate is lighter; while the start menu is open it is pressed in, with an accent of 2 pixels at its foot. - The button of the windows is flat on the bar at rest, on a quiet plate under the pointer, and on
colors.chosenwith a white icon while its menu is open. - A window plate is 160 by 28 pixels, with the module icon, the name in the interface font and the count of the windows when there are several. The plates keep the order in which their windows opened: the focus changes the look of a plate, never its place. The plate of the group of the window in front is raised, with a line of light and an accent of 2 pixels in
colors.titleat its foot. A group of minimized windows has no plate, only a line at its foot. A press on the plate of the window in front minimizes it; a press on another plate brings its window to the front, and restores it if it was minimized. The right button on a plate opens the menu of the acts on its window: bring to front or restore, minimize, close. Under the pointer, the plate of a group of several windows shows a preview card with the state of each of them (The look of the desktop shell in the repository). - A pill of the tray is 24 pixels high, with the module icon of its kind, its label, or both. A pill that asks for attention is on the red of
colors.stop_process. A hairline separates the tray from the clock. - The tray widgets. Left of the hairline, the button of the control center (two switches) and the button of the notifications (a bell), each 28 by 24 pixels, in the look of the button of the windows. The bell has a square of 4 pixels in
colors.failedwhile the history holds a notification. The clock is a button too. Each opens a card in the look of a menu, its right edge on the right edge of its button: the control center (a grid of tiles and a row of launch buttons), the notification center, the calendar. A tile that is on is a plate ofcolors.chosenwith white text; a tile that is off is sunk in the card, oncolors.recesswith a line ofcolors.shadowunder its top edge (The tray widgets in the repository). - The mark of a viewer. While a viewer of
remote_displaysees the screen, the bar shows a mark at the right of the tray, next to the clock: a box of the height of a pill with an edge of 2 pixels incolors.warning, and the wordviewer, the first 8 hexadecimal digits of the key of each viewer, andinputafter a key with the input, in the interface font incolors.text. When the text does not fit the room after the first window plate, the mark shows the count of the viewers, then a square of 16 pixels incolors.warningalone: no text is cut. The mark is laid out before the plates, and the plates give way to it: the mark is never left out. The compositor draws the mark while the capture face is open, whateverremote_displaysays (The remote display: The authority in the repository).
Menus
- A menu of the bar is a card at its button, away from the bar edge: under a bar at the top, over a bar at the bottom. It has a sharp shadow of 3 pixels in
colors.shadowon its sides away from the bar, a border of 1 pixel incolors.edge, the gradient of the cards and a line of light under its top edge. Each line has its module icon, 16 by 16 pixels, then its name. - The start menu lists its modules in sections by their module category (
bar.names, which the build of the tool writes from the table of the modules: each module of the boot image with an entry whose category is an application, a tool or a demonstration, unless its row says that it is the partner of another process or gives its result on the log only), each section in the order of the alphabet, each line with the name of its module with a space for each_. The left pane has the applications and the tools, each under its heading, in lines of 28 pixels, and under a hairline the quick actions: the demonstrations, the bar to the other edge, and the magnifier. The quick action "demonstrations" opens the right pane, darker, with the heading "demonstrations" and each demonstration in three columns of lines of 24 pixels; the menu opens with it closed. A service, a library and a test module have no line. A module is in one section only. - The menu of the windows has a heading with the count of the windows, then one line for each window, in the order of the client table: from the top under a bar at the top, from the bar up over a bar at the bottom. The window that has the focus has a bar of 2 pixels in
colors.titleat the left of its line, and its title is in the strong text color (colors.text_strong): white in the dark appearance, black in the light one. - The line of a disk process has its nickname in the interface font, then, 8 pixels after it, the hash prefix of its file in the font of the cells at the caption size, on the baseline of the nickname, in
colors.dim: a value, faded, beside the name. On the chosen line it is white. The menu is as wide as the longest nickname with its hash prefix in the font of the cells at the body, so a nickname needs no cut in that font. - A line of the menu of the windows is 24 pixels high. The line under the pointer is a chosen row:
colors.chosen, with its text in white (section 10). - The context menu of the desktop. A right press on the desktop opens a card at the pointer, inside the desktop: the gradient of the cards, a border of 1 pixel in
colors.title, a line of light under it, the filter field (the input line of section 10, with its caret and its line of 2 pixels incolors.title), a line incolors.trackunder the field, then one line of 24 pixels for each item. The chosen line is a plate fromcolors.chosentoshade(colors.chosen, 86), with a line of light: white keeps its contrast on each row of it. The keys of an act are dim at the right of its line. While the input types, the list narrows, and a line of 2 pixels is under each matched character, in the color of the kernel, white on the chosen line. The pointer chooses a line, a press on it acts, and a press outside closes the card. - The preview of a window plate. The pointer over the plate of a group of several windows in the bar shows a card next to the bar, away from its edge: the name of the group, a line in
colors.track, then one line for each window with its state; the window in front has the square of the focus. - The window switcher. Alt+Tab shows a card in the middle of the screen: the gradient of the cards, a border of 1 pixel in
colors.title, then one line of 28 pixels for each window from the one in front, the one used last first, with its module icon and its title. The chosen line is oncolors.titlewith its icon and its title in white; a minimized window has its title incolors.dim. Each Tab while Alt is down chooses the next line, Shift+Tab the one before; the release of Alt brings the chosen window to the front, and Escape, a press of the pointer, a window that opens or closes, or a dialog or a menu that opens closes the card with no change. The card shows 12 lines at most (The window switcher in the repository).
Windows
- A window is a title bar of 24 pixels over the surface of its process, with a border of 2 pixels at the left, the right and the bottom. There is no shadow. The title bar shows the module icon of the window, 16 by 16 pixels, 8 pixels from its left edge, then the title: white on the window that has the focus, dim on another.
- The title bar of the window that has the focus goes from
colors.title(0x3F7CC4) at its left column tocolors.title_end(0x162C45, the same blue at 36 %) at its right column. Its top line is 125 % of these colors: the sign of depth of section 3. The bottom border has the colors of the title bar; the left border is the start color, the right border the end color. - The title bar of another window is quiet: it goes from
colors.title_quiet(0x2A3442; light0xE4E8ED) tocolors.title_quiet_end(0x161D27; light0xD3D9E0), and its title is in the dim color. So the gradient also says which window has the keyboard. Its title also says it: a title in white has the focus. - The close button is a square of 24 x 24 pixels at the right end of the title bar, with the character
xof the font in white. Its color is the concept "stop a process": a deep redcolors.stop_process(0xB82232), not the coral of "failed", because to close a window is not a failure. It has the sign of depth of the rules: a block from 118 % of the red at the top to 82 % at the bottom, and a top line at 150 %. When the pointer is over it, the red is brighter (0xE0343F). On a window that is not in front, the red is quiet (colors.stop_process_quiet:0x4E2229; light0xF2D5D9) and thexis a dim pink (colors.stop_process_quiet_mark:0xC09098; light0x8E3A47). The button shows the characterx, not a cross of squares of 2 pixels: the two lines of such a cross do not meet on one square at the centre, and the cross does not match the title. - A window is fixed unless its process declares it resizable with its least and largest size (
display.resizable_set). The edges of a resizable window are its border and a band of 6 pixels around its frame; the title bar is not an edge, but its left and right columns are, and the band above it is the top edge. The band takes the pointer only where no other window lies, and a window in front hides the edges of the windows behind it. Over an edge the pointer has the shaperesize_left_rightorresize_up_down, and over a corner a diagonal shape (Pointer pictures). A drag moves the edges with the pointer, to the pixel, inside the limits of the window and inside the screen, and shows the outline of the new frame: 2 pixels incolors.title, over the windows. At the release the process gets the eventResizedand draws its next frame at the new size; until that frame the window keeps its old size and picture. The process answers once, with a surface of the asked size or a refusal; until then the edges of the window take no new drag, and the compositor refuses a surface that the principal did not ask for. A process that ignores the event keeps its size. After the resize, a part of the title stays on the screen, under the bar (Windows that the principal resizes in the repository). - The compositor places a new window in a free place of the work area, with a gap of
graphics.GAPto the edges and to the other windows: of the places where it covers no shown window, the one with the most free room to its right and under it; with no free place, the first of the 8 cascade places, from (64, 56) by 40 pixels to the right and 32 pixels lower, that covers no title of a shown window (bar.new_window_free_place, The place of a new window in the repository). The cascade places are sums of spacing tokens, so those windows line up. A window larger than the work area takes the place ofbar.new_window_place, which keeps its close button on the screen (The interface of the processes: Window places). - A window that the pointer drags goes where the pointer puts it, to the pixel. Wherever it goes, a part of its title of one
gapstays on the screen, under the bar, so the pointer can always take it again. - Cost: the compositor computes the colors of one line of a title bar once, for the columns that the frame shows, with a fixed-point step for each channel (no division for each pixel), then copies them to the 24 lines. At its start it measures three forms of a title bar of 1024 pixels, 64 times each, and writes them on the log. On 10 machines of one check: one color takes 1.6 to 2.7 us, a mix for each pixel 65 to 87 us, one row of colors then copies 5.7 to 6.8 us. The gradient costs about 4 us for each window that a frame draws.
- At 8 bits for each channel, the gradient has 41 levels of red, 80 of green and 126 of blue over the width of a window. The picture shows no band, so there is no dithering.
The clipboard
- Control+C copies, Control+X cuts, and Control+V pastes the last copied text into the element that has the focus in the window in front. The compositor takes the three keys: a process never receives them as keys, and no process can send them.
- A copy takes the selection of the editor
edit, or the whole text of a text field: a single-line field has no selection yet. A multi-line copy preserves LF line ends and tabs (still refusing CR, NUL and all other control characters); single-line fields and the console refuse pasted text that contains a line end, a tab or any control character, so a paste never runs a line. - A text on the clipboard is UTF-8 of 1 to 4096 bytes. It stays until the next copy, or until the process that copied it ends.
- A process reads the clipboard only at a paste of the principal, through a handle that the compositor lends for that paste. The log of the compositor names each copy and each paste, with the two windows.
- The design: The clipboard in the repository.
The editor
start("edit")opens the editor on the objecttextof its private store;edit(store, name)in the console opens any text object (or/-separated object path) of a store of the principal. It has no modes and no save action.- The look. The text is in the font of the cells, 80 cells to a row. A line longer than a row goes on the next rows, never cut at the edge. A tab goes to the next column that is a multiple of 4. At the left, a gutter shows the number of each line in the dim color, on the first row of the line only. The caret is a bar of 2 × 16 pixels in the strong text color. The selection is
colors.chosenunder its characters, with the characters in white, as a chosen row (section 10); a selected line end is one cell of it after the text of its row. During search (Ctrl+F), the active match is in white oncolors.chosenand other visible matches are highlighted oncolors.trackwith acolors.warningunderline; the search field in the top band shows the query and"i of n"(or"no match"). The state label at the right of the top band says "kept" when the store holds the text as it shows, and "a change waits" while a group of changes waits for its commit; a text that the store does not keep has none. The status band shows a problem of the store or of a key in the color of a failure, on the lines that it needs, and at its right the line, the column and the bytes of the text. The action bar names Ctrl+F, Ctrl+Z, Ctrl+Y and Ctrl+H. - The window. The principal resizes it, from 736 × 320 to 1280 × 960: the layout tree (The layout tree in the repository) places the top band, the text with its scroll bar, the status band and the action bar at each size, with the element tokens of the appearance. A taller window shows more rows; the window is never narrower than a row of 80 cells. Ctrl+H shows the pane of the versions at the right of a divider: the versions of the text, the newest first, each with its generation and its bytes, and the current one on the chosen color. A drag of the divider moves it; the pane of the text keeps a whole row while the window has room for both panes.
- The keys. A character goes in at the caret, in place of the selection. The arrows, Home, End, Page Up and Page Down move the caret; Control with Home or End goes to the start or the end of the text; Shift with each of them selects, and Ctrl+A selects all. Home and End go to the ends of the line, not of the row. Ctrl+C copies, Ctrl+X cuts, and Ctrl+V pastes multi-line UTF-8 text through the clipboard. Ctrl+F opens incremental search; Enter or F3 finds the next match, Shift+Enter or Shift+F3 finds the previous match wrapping around the text, and Escape closes search and returns focus to the caret. Backspace and Delete remove the selection, or one character. Escape ends the selection.
- The pointer. A press places the caret at the boundary between two characters nearest to the pointer; a drag selects; the wheel and the scroll bar scroll, 3 rows for each notch.
- Undo. Each group of changes is one commit of the object: a word, a line end, a cut, a paste, the changes before a deletion, the changes before a move of the caret to another line. Ctrl+Z restores the version before the one shown, and Ctrl+Y goes forward again along the versions that Ctrl+Z left. The versions are in the store, so Ctrl+Z works after a restart too. A stop of the process loses only the group in progress.
- The limits. A text holds at most 32768 bytes. A text from the store with an invalid sequence shows the replacement character in its place. A text that the store cannot give whole, or that is too long, is not written over: the editor starts empty, keeps nothing, and the status band says why.
- Not built: texts larger than one call region.
- The design: The editor `edit` in the repository.
The notes
start("notes")or the start menu opens the notes of the principal: each note is one object of the private store ofnotes, with no save action.- The look. At the left a pane of 208 pixels on the surface of the cards, with the heading
NOTESand one line of 24 pixels for each note: its first line, cut to the pane; the note shown is a chosen row; an empty note says "empty note" in the dim color. A line of 1 pixel incolors.dividerseparates the pane from the text. The text is in the font of the cells, wrapped by word at the width of the window: a word that does not fit goes whole to the next row, and a word longer than a row is cut by character. The caret, the selection and the scroll bar are those of the editor. The status band shows a problem of the store in the color of a failure at its left, and at its right the line of the caret, the bytes of the note and "kept", "a change waits" or "not kept". - The window. The principal resizes it from 480 × 320 to 1280 × 960; the rows of the text follow its width.
- Keeping. A change waits until the keys pause for one second, or until another note is shown, the versions open or the note is deleted; then it is one commit, and one version.
- The keys. Those of the editor for the text: the characters, Enter, Tab, the arrows, Home, End, Page Up, Page Down, Control with Home or End, Shift to select, Ctrl+A, Backspace, Delete, Escape, and the clipboard. Ctrl+N makes a new note; Ctrl+D asks in the status band, in
colors.warning, to delete the note shown, and Enter deletes it, Escape keeps it; Ctrl+Page Up and Ctrl+Page Down show the note before and after it; a press on a line of the pane shows that note. - The versions. Ctrl+H puts the versions of the note in the place of the list, under the heading
VERSIONS, the newest first, each by the date of its commit. Down chooses an older version and Up a newer one; the text pane shows it, and no key changes it. Enter makes it the current note in a new commit, and Escape goes back to the list. The action bar names the keys of the pane in force. - The design: Notes in the repository.
Pointer
- The pointer is a slanted arrow with a large head and a short slim tail, 13 pixels wide and 18 high at the size 24: a fill inside an edge of 1 pixel. Its point is the top left corner; its left side is upright, its right side at an eighth of a turn to the wing, and its tail leaves the head along the axis of the arrow, 2 down for 1 across, ended square. This arrow is the shape
arrowof the pointer theme of the system (resources/pointers/system.manifest). Each other pointer shape of that theme has the same style: a fill inside an edge of 1 pixel at every size, strokes of 1 pixel of fill at 24, the level and upright edges on whole pixels, the slanted sides and the curves smooth. The shapes are outlines that the tool draws at the build (Pointer pictures: The manifest). - Two forms. On a dark desktop the pointer is white in an edge of
COLOR_INK; on a light desktop it isCOLOR_INKin a white edge. The fill is the large part, so it carries the contrast on the surfaces of the appearance in force: 19 to 1 on the dark desktop, 17 to 1 on the light background. The compositor takes the form of the appearance in force. - Accents. A pointer has an accent only on a part that means something: the blue of the focus (the token
title) on the arc that turns inwaitandbusy_with_arrowand on the question mark ofhelp, the red of "stop a process" on the slash offorbidden, the amber of a match on the dot at the hot spot ofcrosshair. The arrow, the hands, the I-beam and the resize arrows have none. An accent takes the value of its token for the color around it: its value of the light appearance on white, of the dark appearance on the dark (Pointer pictures: The manifest). - A compositor with no valid pointer theme draws an arrow of squares of 2 pixels from its own code, black at the edge and white inside, so that the pointer never disappears.
- Not a rectangle. The pointer pictures of both themes have smooth edges, curves and transparency: they are not rectangles. The theme "Posy's Cursor" (Pointer pictures) is a build input of the development shell; when the build has it, it is the default pointer theme. A release image holds the theme of the system only. The pointer picture is the one picture resource of the desktop that does not follow sections 2 and 7. It is drawn with a blend of premultiplied alpha. The windows, the bar, the menus, the palette and each process keep rectangular forms and no transparency.
Palette
- One panel, one key. The key super (the left key with the logo,
display.KEY_SUPER) opens and closes the palette. No process uses this key: the compositor keeps it, and the process that has the focus never receives it. While the palette is open, it takes each key and the pointer: no window and no menu receives them. - The panel holds no right. It is a part of the compositor, which already owns each key and each pixel. An entry of the compositor itself does what the desktop already does: a process starts through the root service as the start menu starts it (
Startwith the name), a window comes to the front as a press brings it, a close stops the process as the close button does (Stop). A provider entry runs in the process that gave it: the compositor sends the index of the entry, never a text of a line, and makes no call. - The place. The panel is 640 pixels wide and 400 high. Its top is at y = 96, fixed, in the upper third of the screen, so the input band never moves when the list changes. It is in the middle of the width of the screen, to the pixel: x = 640 on the reference screen of 1920 (
palette.panel_place). It opens with no animation, in the next frame, and its height never changes: a short list leaves empty rows. - The parts, from the top:
| Part | Height | Content |
|---|---|---|
| Input band | 48 | The typed part at scale 2 (cells of 16 x 32), 16 pixels from the left edge. Its last 2 pixels are a line in colors.title |
| List | 12 rows of 24 = 288 | The entries |
| Gap | 8 | |
| Detail line | 24 | One sentence, a caption: what the choice of the chosen entry does. A command with parameters has its signature at the body, then its help sentence as a caption on the same baseline |
| Footer | 24 | At the left, in the search only: the count of the entries that match, of all the entries, with the word for what is counted ("13 of 58 entries"; "entries, no commands" when the console gives none). At the right: the keys of the state, with what Enter does on the chosen entry ("enter: to the front esc: close"); while nothing is typed, the prefixes ("> commands @ windows : settings ? manual"). On a result and while a command runs, the footer has the keys only |
| Margin | 8 |
- The input band is flush. It is the top of the panel. Its fill (
colors.track) touches the top, the left and the right edge of the panel. Nothing is around it: no title over it, no margin, no border on those three sides. A reader tells it from the list by four signs: the step of surface (the track over the surface of a card); the line of 2 pixels incolors.titleunder the band, from edge to edge; the caret of 4 x 32 pixels incolors.title; the size of the typed part, at scale 2 where each row is at scale 1. - The edge of the rest. The list, the detail line and the footer have the surface of a card and a border of 1 pixel in the color of the kernel (the border of a card, section 3) at the left, the right and the bottom, as a menu of the bar has. They have no border at the top: the line of the band is the edge there. The palette is not a card: it has no title and no caption. Each row says what it is in words, and the footer counts the entries in a plain word: a name of the code is not a word for a reader of the panel.
- The typed part. It is the strong text (
colors.text_strong: white in the dark appearance, black in the light one), in the font of the cells. Left, Right, Home, End, Delete and Backspace edit it at the caret (src/library/modus/line_editor). It holds at most 64 bytes of UTF-8. When it is empty, the band says "type a part of a name" in the dim color, at scale 2. - Two kinds of entries come from the compositor itself and need no other process: the modules (the table
bar.names, what the start menu lists) and the windows (the client table, what the menu of the windows lists). Each window also gives the entry of its close, named "close" and its title. The palette provider, the console, adds one entry for each of its commands (The line of the console: The palette provider). - A row is 24 pixels: 16 pixels, the icon of 12 pixels, 8 pixels, the name, then at the right the kind in words, 16 pixels from the edge.
- The icon is the kind icon of the entry (section 4, "The icons of the kinds"), with cells of 1 pixel. Its form says what the entry is, so a reader who does not tell two colors apart still tells a window from a module and a command from a setting. Its color says one fact of the entry: the color of the kind when the thing is there or in use, the dim color when it is not. An entry that destroys has the icon of that act, whatever its kind:
| Entry | Icon | Color |
|---|---|---|
| A module that has a window now | Module | The color of a module, colors.process |
| A module that has no window now | Module | The dim color |
| The window that has the focus | Window | colors.title |
| Another window | Window | The dim color |
| A command with no parameter | Command | The color of a command, colors.process |
| A command with parameters | Command | The dim color, as the whole row |
| An export | Export | The color of a module; the dim color with parameters |
| The value of a setting, or the scheduling strategy, that the machine uses now | Setting | The text color |
| Another value of a setting; another scheduling strategy | Setting | The dim color |
An entry that destroys: the close of a window, a command such as shutdown | Stop | The red of the close button under the pointer, colors.stop_process_pointer_over |
| A candidate of a field of a form: a process or a module | Module | The color of a module |
| A candidate of a field of a form: a grant | Grant | The color of a grant |
- The colors of the icons: each one has at least 3 to 1 on both colors of a card (3.66 for the red, 3.78 for the blue of the title bar, 4.60 for the dim color). The deep red
colors.stop_processhas 2.56 there: it is the fill of the row that asks for a second Enter, not the color of an icon.colors.not_usablehas 2.14: a module with no window has the dim color. On the chosen row and on the row that asks, each icon is white: no color of a kind keeps 3 to 1 oncolors.chosen. The fact that the color said is then in the words at the right and in the detail line. A host test computes each pair (src/library/modus/graphics/palette_colors_test.odin). - The kind is said in words at the right, in the dim color:
window,module,close a window,command,export;settingfor a setting row, and for a value alonesetting, orsetting, in usefor the value that the machine uses now; a command with parameters sayscommand, needs arguments. A color never stands alone for a fact (section 4). - The name of a module or of a window is in the interface font. A command is code: its name is in the font of the cells, in the color of a name of the colors of code, and its parameters and its result follow it in the dim color. A signature longer than its room is cut at the end of a parameter, with
, ...), or shows(...): it is never cut inside a parameter, and it never reaches the words at the right. A command with parameters is dim as a whole. - The matched characters: a line of 2 pixels in the color of the kernel is under each matched character of a name.
- The chosen row is a chosen row of section 10:
colors.chosen, its name and its kind in white, the line under each matched character in white. The kind stays on the chosen row: "plasma" the window and "plasma" the module are then two things in words, on each row. What Enter does on the chosen entry is in the footer: "enter: to the front", "enter: start", "enter: close", "enter: run", "enter: arguments", "enter: set". The icon of the chosen row is white. - The detail line says what the choice does, with the facts of now. A window: "The window of the process console. It has the focus.", or "Brings the window of the process life to the front and gives it the focus." A module: "Starts the module plasma. It has no window now.", or "Starts the module plasma one more time. It has 1 window now." A close: "Stops the process plasma: its window closes. Asks for a second Enter." A command: its help sentence.
- With a typed part: one list, ranked, with no group: the best match is the first row. The match is the fuzzy match of the console (
src/library/modus/line_editor): the characters of the typed part appear in the name in their order, not always side by side, without the case of the letters ("closepla" matches "close plasma"). Each matching entry also gains its frecency bonus (0 to 8 points, The line of the console: The fuzzy match), so an entry that the principal runs often comes first among matches that differ only by gaps, without passing a match with one more start of a word or one more run. Among entries of one ranked score, the order is: the entries chosen lately, the newest first; then the kind (a window, a module, a setting, a command, an export, the close of a window); then the order of the table. - With no typed part: groups, each under a dim line of text: "recent" (at most 5 entries, the newest first), "windows" (each window, the front one first), "modules" (the order of
bar.names). A group with no entry is absent. To reach a window is the most frequent act, so the windows show before any letter. The entries that destroy and the commands show only for a typed part, or as a recent choice. - The recent choices and frecency: the panel remembers the last 16 chosen entries, by kind and name, and a frecency table of up to 64 names, in the memory of the compositor. Each run of a non-destroying entry counts one use of its name (regardless of kind) and decays older scores; an entry that destroys counts nothing. A restart of the machine loses both.
- More than 12 rows: a scroll bar at the right (section 10, "The scroll bar") says which part of the list the panel shows, and takes the pointer: a press on an arrow button moves the rows by one, a press on the track by 12, and the thumb follows the pointer. The view moves, and the choice follows it: when the view no longer shows the chosen entry, the choice goes to the nearest entry that the view shows, so Enter always runs a row that is drawn. The candidates of a form have the same scroll bar, with the same rule. The scroll bar of the row that asks for a second Enter shows the place only. A point on the scroll bar is on no row.
- No match: one dim line,
nothing has "xyz" in its name, and Enter runs nothing. - An entry that destroys asks for a second Enter: the close of a window, and the commands
shutdown,lockandhistory_clear. Enter on it changes the chosen row: its fill iscolors.stop_processand its text says the act in full ("stop plasma: its window closes", "shutdown(): stop the machine"); the footer says "enter: confirm another key: back". A second Enter runs it. Each other key goes back to the search, with the typed part kept, and does nothing else. The compositor draws this question: a provider cannot skip it. - A command with no parameter runs from the panel. Enter sends the choice to the console, and the panel waits: the list makes room for the call, in the color of a name, and "runs in the console". The panel still takes its keys: Escape closes it, and the line goes on in the console. The panel sets no bound on a line: the console has none.
- A result shows in the place of the list, under the call: an Integer as the one number of the panel, at
text_largest(48), a Text of one line, the lines of a Record, "done" for a command with no value, an error incolors.failed. Each part has the color of what it is, as in the console. A Table, and each result of more than 12 lines or 76 cells, is not drawn in the panel: the panel closes and the window of the console comes to the front, with the line and its result. Escape closes the panel; each other key goes back to the search. - A command with parameters has a form. Enter turns the input band into the call, as code, at the scale of the typed part: the name of the command in the color of a name, then one field for each parameter, with its name:
revoke(name: plasma, grant: |). The caret is in one field; the name of that parameter is in the text color, the others are quiet. A call wider than the band shows the part that holds the caret.- A field has the kind of its parameter. An Integer field takes digits, and one
-at its start. A Text field takes each character but a quote, 48 bytes of UTF-8 at most. A refused key changes nothing, and the detail line says why, in the color of a failure: "an Integer takes digits, and one - at its start". - A number with its unit. When the command, or the description of the export, says that an Integer counts a size or a time, its integer unit, the band shows the unit after the number, in the color of a size or of a time, also while the field is empty:
buffer(count: 4 pages),wait_stop(milliseconds: 3000 ms). The prompt under the band says it: "type the value of count: an Integer, in pages". The input types the number in that unit, and the panel sends the number as it is. The text of each unit is the one of the log:bytes,KiB,MiB,pages,blocks,ns,us,ms,s. - The list is the candidates of the field that has the caret, when the console can give them: the modules of the boot image for
start,load,isolateandreplace; the processes that run forstop,grants,connect,debugand the first field ofrevoke; the grants for its second field; the strategies forstrategy; the members of its enum for a field of an Enum parameter, whose value goes to the console as a member,.spleen. The text of the field narrows them by the fuzzy match. The panel asks for them once when the caret enters the field, and no key waits for them. - A field of a few closed values is a row of buttons. When the console says that the candidates are the only values of the parameter, and they are 6 at most, the field shows them as buttons: in the input band at the right of the call when they fit there, else on the first row under the band, with the keys under them ("left, right: choose a value tab: take it"). The chosen value is a reversed plate: filled in the strong text color, its name in the background color (white and ink in the dark appearance, black and the light background in the light one). Left and Right choose, Tab takes the chosen value, and Enter takes it, then goes on:
strategy, Enter, Right, Enter setsfair. A press and a release on one button take its value, as Tab does. A row that does not fit under the band either is the list. The control of each field is in one table of the code (palette.field_control). - The keys: Tab takes the chosen candidate, or goes to the next field; Shift with Tab goes to the field before; up and down move in the candidates; Enter goes to the next field, and runs from the last one; Control with Enter runs from any field; Escape, and Backspace in the first field when it is empty, go back to the search with the typed part kept.
- The pointer: a press in a field puts the caret there, at the place between two characters that is nearest to the pointer; the keys that follow edit that field. A press on the name of a parameter puts the caret at the start of its field, and a press on the comma or the parenthesis after a field at its end. A press on the unit after a number puts the caret at the end of the number. A press on the name of the command, or after the call, does nothing; a press on a button of the field takes its value. A move over a candidate chooses it; a press and a release on one candidate take it, as Tab does.
- Before it runs, each field must hold a value of its kind: the caret goes to the first field that does not, and the detail line says why ("grant: empty"). An entry that destroys then asks for its second Enter, on a row that says the call with its values; another key goes back to the form, with its fields.
- What goes to the console is one typed value for each field, an Integer as a number and a Text as its bytes, then the choice. The console builds the line. The panel sends no text of a line.
- A parameter that no field can give (a Table, a Record, a Handle, Bytes, a value of any kind): the entry has no form. Enter closes the panel; the console writes the call in its edit line, with the caret between the parentheses, and its window comes to the front. Control with Enter does the same for each command.
- A field has the kind of its parameter. An Integer field takes digits, and one
- A setting is one row, a setting row: one for each Enum parameter of an export whose call with one member is a choice, as each setting of
settings.set(The line of the console: The palette provider). The row has the icon of a setting, the name of the parameter (font,subpixel_order), which the typed part matches, then one button for each member, which says the display text of the member when its module file gives one (RGB,1.75) and else its name (spleen), and the wordsettingat the right. A button is 20 pixels high, 8 pixels of padding at each side of its name, 8 pixels from the next one, the first one amargin(16 pixels) after the name; a button that does not fit leaves the count of the values left ("+2"). The value in use has a line of 2 pixels under its name, in the color of its name: a form, so the fact does not stand on a color alone. On the chosen row, the value that Enter sets is filled in white, with its name in the color of the background; the row starts at the value in use. Left and Right choose a value; Home and End still move the caret. Enter sets it through the console, the desktop shows the change behind the panel, and the panel shows its list again with the value on its row, so the next value is one key away. A press on a button sets that value. The detail line says the line that the chosen value runs:settings.set(font = .spleen). The compositor gets no right for it, and reads no value of a setting: the console calls the getter that the parameter names when the panel opens, and marks the member in use. A row of more than 6 members has one entry for each member, "settings.set scale to 1.375", whose line says the name:settings.set(scale = .eleven_eighths). - The scheduling strategy is a setting row,
strategy, with one button for each strategy of the kernel:round_robin,fair,eevdf, the line under the strategy that the machine uses now. Enter sets the chosen one through the console, which calls the processscheduler: that process holds the right to change the strategy, and must run. The panel then shows its list again, with the line under the new strategy. The compositor cannot read the strategy: the console says which one is in use (The line of the console: The palette provider), and reads it again at each open of the panel. - The mode of the chosen entry is at the right of the input band, in the dim color: "enter: run" for each entry that runs, "enter enter: destroy" for an entry that asks for a second Enter, then "shift enter: go to" when an open window names what the entry acts on. The word of a prefix is before it ("settings enter: run"). Each text is measured against the room that the typed part leaves: the word of the prefix leaves first, then the mode. The footer keeps what Enter does on the entry ("enter: close").
- Go to. An element of a window can name what it acts on, its act name (The interface of the processes: Act names), and a palette entry has the act name of its act: the value buttons of the window
settingsand the rows of its values, the tile of the strategy in use inschedulerand the row of the strategies. When an open window names the act name of the chosen entry, Shift with Enter closes the panel, brings the front one of those windows to the front, and its element takes the focus: the next frame of the window shows it. With no such window, Shift with Enter does nothing, and the log says why. - A prefix restricts the kinds. The first character of the typed part:
>the commands and the exports;@the windows and their closes;:the settings and the scheduling strategies;?the modules, and Enter then asks the console for the page of the manual of the chosen module (the processmanualmust run; its window comes to the front). The names match the part after the prefix. A prefix alone lists each entry of its kinds. The word of the prefix shows at the right of the input band, in the dim color, and each row keeps its kind in words. - With no provider (the console does not run, or its grant
paletteended), the palette lists the modules and the windows, and the footer says "entries, no commands". A table of the console that fails a check gives the same list, and "entries, commands refused". The footer then keeps the hint of Enter in the place of the prefixes, so the words have their room. - The keys:
The keys of a form are in its bullet above.
| Key | In the search | In the question of an entry that destroys | While a command runs | On a result |
|---|---|---|---|---|
| Super | Closes the panel | Closes the panel | Closes the panel | Closes the panel |
| Escape | Closes the panel | Back to the search | Closes the panel; the line goes on | Closes the panel |
| A character | Goes in at the caret; the list follows | Back to the search | Nothing | Back to the search |
| Left, Right, Home, End, Delete, Backspace | Edit the typed part | Back to the search | Nothing | Back to the search |
| Up, Down | Move the choice, from the last entry to the first and back | Back to the search | Nothing | Back to the search |
| Page Up, Page Down | Move the choice by 11 rows, with no wrap | Back to the search | Nothing | Back to the search |
| Enter | Runs the chosen entry: starts the module, brings the window to the front, sends the command, opens it in the console, or asks the question | Runs the entry | Nothing | Back to the search |
| Tab | Nothing | Back to the search | Nothing | Back to the search |
| Control with Enter | Opens the chosen command in the edit line of the console | Back to the search | Nothing | Back to the search |
| Shift with Enter | Goes to the window that names the act name of the chosen entry | Back to the search | Nothing | Back to the search |
On a setting row, Left and Right choose a value in place of a move of the caret.
- The pointer: a move of the pointer over an entry chooses it (only a move: a list that changes under a still pointer keeps its choice). A press and a release on one row run it, as Enter does. A press outside the panel closes it. A press inside the panel that is on no row does nothing. In a form, the pointer is in the bullet of the form above. The pointer shape is
textover the input band,pointing_handover an entry and over a candidate, andarrowover the scroll bar and the rest of the panel. - After a choice that starts a process or brings a window to the front, the panel closes at once: what it started shows on the desktop.
- The states of the panel are one enumeration (
palette.State): closed, the search, the question, running, the result, the arguments. Two pure procedures hold each transition of a key (palette.key_action,palette.state_after), a third one the answer of the provider (palette.result_set), and host tests run each state with each key. - The palette runs the row that is drawn. The lists come from another thread and the entries from other processes, so a list can come at any moment behind an open panel: a window appears, the console gets new commands, a choice becomes a recent one. No such arrival changes what a key that follows will do, unless the screen showed it first:
- The choice is an entry, not a row. When a list comes for the typed part that the list before answered, the chosen entry stays chosen, at whatever row it has now, and the rows shown follow it. An entry is the same entry when it has the same kind and the same name.
- An entry that leaves. Only when the chosen entry is no longer in the list does the choice go to the first entry. That is a change that the input did not make: Enter, and each other action that runs an entry, then does nothing until a frame showed the new choice. A question for a second Enter ends with its entry.
- A key that changes the typed part ends that wait. The choice that no frame showed was of the list before; the typed part asks for a new list, and Enter waits for that list. The list that answers keys of the input chooses its first entry, also when the keys left the same text (a character, then Backspace, in one batch): Enter then runs the best match of what was typed. The rule is in
src/library/internal/compositor/palette(typed_edit,panel_adopt_after), so each owner of a panel has it. - A list for a new typed part chooses its first entry. It is the answer to the keys of the input: Enter that was typed before that list was made waits for it, and runs its best match; an entry that destroys still asks for its second Enter, on a row that is drawn.
- A list that shows what the list before showed changes nothing: no new choice, no frame, no line of the log.
- A form holds its own copy of its entry, so a new table of the console does not change the form; the console still refuses a choice whose entry is not the one that the panel named.
- Tab and the candidates. Tab that comes before the candidates of its field waits for them, then takes the chosen one or goes to the next field: it never goes to the next field while a candidate is on its way. Another key ends the wait. When the text of a field narrows the candidates, the chosen candidate stays chosen while it is shown.
- A window that left. A choice of a window or of its close acts only on the window that has the title of the row: another window that took its place in the client table is not touched.
- The compositor writes at each close how many lists it adopted while the panel was open, and how many of them were the same.
- The cost. The loop of the compositor never makes a list. A second thread of the compositor collects the entries, copies and checks the table of the provider, and ranks; the loop gives it the typed part, the windows, the recent choices and the frecency table, and adopts the list that it publishes: one address changes. Two lists take turns, and the thread writes only the one that the loop does not read. The key super only sets the state and builds the draw records of the 12 rows shown: the list of an empty typed part is made at each close, and when a window appears, leaves or comes to the front. A typed key shows at once in the input band; its list comes a moment later. Enter that comes before the list of the typed part waits for that list, so it never runs an entry of the list before. The compositor writes on the log at each key one log fact of the count and of the first four rows, whose names are a text view, "compositor: the palette lists 3 of 61 for "mon": monitor (window), monitor (module), close monitor (close a window)", and at each close the frames, the mean time of a frame and the longest making of a list by the ranking thread.
- The code: the state, the entries, the ranking, the keys and the draw records are
src/library/internal/compositor/palette; the keys, the pointer, the acts, the ranking thread and the side of the provider aresrc/modules/system/compositor/palette.odin; the table and the ring aresrc/library/modus/contract/palette_table; the provider issrc/modules/system/console/palette_provider.odin.
10. Elements
The interface package (src/library/modus/interface, The interface of the processes) draws these elements. A process that uses them follows the rules of this file with no number of its own.
| Element | The rule |
|---|---|
| Background | colors.background and the grid of points of section 3, at 12 + 24 n of the surface |
| Card | A border of 1 pixel in its accent (section 3), the surface of a card, a bar of 4 x 16 pixels and the title in the accent, the caption of its record at the caption size in the dim color, on the baseline of the title, a count at the right in the text color. Its content starts 40 pixels under its top and 16 pixels inside its sides |
| Line of a label and a value | The label in the dim color; the value in the text color (or in the color of its concept), at the right of its area for a number |
| Table | The titles of the columns in the dim color; lines of 24 pixels; every second line, from the first, on a band of colors.card_top; numbers at the right of their column |
| Bar | The track in colors.track; the full part from 125 % of its color at the top to 78 % at the bottom; 2 pixels at least for a value above 0 |
| Button | A rectangle of the track with its label in the text color; blue (colors.title) at 60 % when it has the focus or the pointer is over it, full blue with a white label when it is open or both |
| List with a choice | Lines of 24 pixels; the chosen line in colors.chosen with its name and its hint in white; a line of 2 pixels under a searched part of each name; a scroll bar at the right when the lines do not fit, which moves the choice |
| List of rows | Rows of 24 pixels: the kind icon of the row, 12 pixels, in a color that says one fact (white on the chosen row), the name (in the font of the cells with a quiet detail after it when it is code), and at the right what the row is, in words, in the dim color; a line of 2 pixels under each matched character of a name; the chosen row filled, with its text in white, and at its right its hint or the same words as the other rows; a dim line of text as the heading of a group; a scroll bar at the right when the rows do not fit, which shows the place, and takes the pointer when the caller of the list names it: the caller then moves its view |
| Scroll bar | 17 pixels thick: an arrow button at each end, the track, and the thumb with its border, its gradient across, its inner line and its grip. See "The scroll bar" |
| Text input | A field of the track with a line of 2 pixels at its bottom (colors.title with the focus, colors.not_usable without); the text in the strong text color (colors.text_strong), at scale 1 or 2; a caret of 2 x 16 pixels in colors.title with the focus (4 x 32 at scale 2), at any place of the text; the placeholder in the dim color |
| Panel with a flush input | The input is the top band of the panel, from edge to edge, with no border on its three outer sides: its fill and the line of 2 pixels under it are its edge. The rest of the panel has a border of 1 pixel at the left, the right and the bottom |
| Large number | The font of the cells at text_large, 32: the one number of a card (section 5), its label a caption under it |
| Caption | text_caption, 14, in the dim color, on the lines that it needs: a label under a value, the help line under an element |
| Page heading | text_heading, 24, over the content of a page, on the lines that it needs: the title of the page |
| Action bar | A band of 24 pixels at the bottom of a window: the keycaps of each key combination, then the name of its action; a divider between two items; a button more and a list for the items that do not fit. See "The action bar" |
The chosen row
A chosen row is the chosen line of a list, of a menu of the bar, of the palette, and of the completion list of the terminal.
- Its color is
colors.chosen,0x3C76BB: the blue of the title bar at 96 % (shade(colors.title, 96)). It is not the title blue itself: white has 4.29 to 1 on0x3F7CC4, under the 4.5 that a text needs. - Its text is white: 4.67 to 1. No other color of the rules keeps 4.5 on it: the text color has 3.63, the accent of a match under 3.3.
- A matched character of a chosen row in a grid of cells is the reverse: the chosen blue on a white cell, 4.67 to 1. In a list of the interface font, the line of 2 pixels under the searched part, or under each matched character, is white.
- A title bar is not a chosen row: it keeps its gradient from
colors.title. An open button draws its white label oncolors.chosentoo (4.67). - The row of the palette that asks for a second Enter is not in
colors.chosen: its fill iscolors.stop_process, the concept of what it does, and its text is white: 6.3 to 1. - A host test computes the contrast of the text and of a matched character on the chosen row (
src/library/modus/terminal/code_runs_test.odin). A second host test computes the pairs of the palette: white on the chosen row, white oncolors.stop_process, white and each color of code on the track of the input band, the dim color on the surface of a card, the dim placeholder of the input band as a large text, at 3 to 1, and each color of an icon of a row on the surface of a card, at 3 to 1 (src/library/modus/graphics/palette_colors_test.odin). - An element that takes input can take the focus, and the keyboard reaches it: Tab, Enter, Space, the arrows (The interface of the processes: Input and focus).
The scroll bar
A view that shows a part of a longer content has a scroll bar at its right (or under it, for a content that is wider): the lines of a terminal, the text of manual, a list, the palette. Each one is the same element (The interface of the processes: The scroll bar), and the scroll bars of the site are the same form (The site: The scroll bars in the repository). The sizes, the stops and the colors are one table, src/library/modus/graphics/scroll_bar.odin: the interface package draws from it, and the modus tool writes the style sheet of the site from it.

The parts, along the bar:
| Part | Size | Look |
|---|---|---|
| Arrow button, at each end | 17 by 17 pixels | A solid triangle of four rows (1, 3, 5 and 7 pixels), its point toward its end of the bar. At rest it has no border and no fill: the track shows under it |
| Track | The bar less the two buttons | A border of 1 pixel, and a gradient across it of three stops, at 0, 50 and 100 % |
| Thumb, on the track | The share of the track that the view has of the content; at least 8 % of the track and 8 pixels | A border of 1 pixel; a gradient across it of four stops, at 0, 45, 55 and 100 %, lighter at the left; an inner line of 1 pixel inside the border, the fill moved toward white; a grip in its middle |
| Grip | 4 lines of 7 by 1 pixels, 1 pixel apart | Only on a thumb longer than 20 pixels |
- A gradient goes across the bar: from the left to the right of a vertical bar, from the top to the bottom of a horizontal one.
- A bar too short for two buttons and a least thumb (under 42 pixels) has no arrow button: the track takes it whole.
- A view that shows its whole content has a thumb as long as the track.
- Each corner is square.
The states:
| State | When | What changes |
|---|---|---|
| At rest | The pointer is not over the bar | Nothing is lit |
| Lit | The pointer is over the bar, or the thumb is held | Each arrow button has a border and a fill; the thumb has the blue border, the blue fill and the light grip |
| Hot | The pointer is over an arrow button | That button has the blue border, a blue fill and a light triangle |
| Pressed | The button of the pointer is down on an arrow button or on the thumb | A stronger blue fill |
The colors of the dark form, the form of the dark appearance and of the dark page of the site, and of the light form, the form of the light appearance and of the light page (graphics.scroll_bar_colors_of).
| Color | Dark | Light |
|---|---|---|
| Track, three stops | 0x26303A, 0x2C3743, 0x26303A | 0xE3E3E3, 0xF1F1F1, 0xE3E3E3 |
| Border of the track | 0x1B232B | 0xD7D7D7 |
| Border of an arrow button of a lit bar | 0x56687A | 0x9DA8B2 |
| Border of the thumb at rest | 0x56687A | 0x9B9B9B |
| Border of a hot button, and of the thumb of a lit bar | 0x4B8FD0 | 0x3C7FB1 |
| Fill of an arrow button: lit | 0x3A4855 to 0x313E4A | 0xF3F3F3 to 0xDCDCDC |
| Fill of an arrow button: hot | 0x2A4660 to 0x223C53 | 0xE3F4FC to 0xC6E8FA |
| Fill of an arrow button: pressed | 0x2D5578 to 0x244A6B | 0xC2E4F6 to 0xA9D9F2 |
| Triangle; triangle of a hot button | 0xA7B4C0; 0xCFE6FA | 0x606060; 0x1C5180 |
| Thumb at rest, four stops | 0x4A5967, 0x43515E, 0x3C4955, 0x36424D | 0xF3F3F3, 0xE8E8E8, 0xD9D9D9, 0xCDCDCD |
| Thumb of a lit bar | 0x365B7D, 0x305273, 0x2A4968, 0x25415D | 0xE3F4FC, 0xD0ECFA, 0xBDE4F8, 0xA9DCF6 |
| Thumb held | 0x3C6890, 0x355F85, 0x2E5579, 0x284D6F | 0xCDE9F8, 0xB4DEF4, 0x9FD4F0, 0x8CCAEC |
| Inner line of the thumb | The fill moved toward white by 31 of 255 | By 102 of 255 |
| Grip; grip of a lit bar | 0x22303C; 0x9CC8EE | 0x8E8E8E; 0x3C7FB1 |
The pointer:
- A press on an arrow button moves the view by one line. While the button is held and the pointer stays on it, the view moves again after 400 ms, then each 60 ms.
- A press on the track moves the view by one page, toward the pointer.
- A press on the thumb holds it: the thumb follows the pointer until the button goes up, also when the pointer leaves the bar.
- A scroll bar takes no key: the keys of a view (Page Up, Page Down, the arrows) belong to the element that owns the view.
- The pointer shape over a scroll bar is the arrow, also in a window whose surface has another shape: over the text of a terminal the shape is
text, and over its scroll bars, and while one of them holds the press, it isarrow(Pointer pictures: The request of a process). - A list that has a choice keeps its choice in its view: when the scroll bar moves the view of the palette or of the completion list of the console, the choice goes to the nearest row that the view shows.
Where the scroll bar leaves the other rules, each on purpose:
- Section 3: its gradients go across the bar, not from the top down. They are the look of the control, not a level of depth.
- Section 4: its colors are its own, and name no concept. No fact is said by them alone: the place of the thumb says where the view is.
- Section 6: its thickness is 17 pixels, an odd number, so that the grip and the point of a triangle are on its middle line. It is a fixed size of the element, not a token: a window puts a
gapbefore it (8 in the terminal; inmanual, 12, the gap after the band of an example, which passes the text by 4 pixels). - Section 2: the inner line of the thumb is drawn as an opaque color, the fill moved toward white: nothing is blended.
- Contrast: at rest the bar is quiet. The border of the thumb has 2.1 to 1 on the track (2.5 in the light form) and the grip 1.7 to 1 on the thumb (2.7). Each part that the pointer lights has at least 3 to 1: the blue border on the track, a triangle on the track and on its button, the light grip on the blue thumb (a host test of the site computes them).
The source of the form, and the forms that were refused: The scroll bar in the repository.
The action bar
A window that the keyboard drives names its keys in an action bar at its bottom (The interface of the processes: The action bar). An item is a key combination, drawn as keycaps, then the name of its action. The bar says no "keys:": the keycaps say it.


The parts:
| Part | Size | Look |
|---|---|---|
| Band | 24 pixels high (a line of a table); two rows for a bar that wraps | colors.card_bottom, a line of 1 pixel of colors.track at its top |
| Box of an item | The row high; 8 pixels of room at its left and its right | No fill at rest |
| Keycap | 20 pixels high, 2 pixels under the top of the row; 6 pixels from each side to its label; at least 20 pixels wide | A border of 1 pixel in colors.not_usable; inside it the gradient of a card, from colors.card_top to colors.card_bottom: the one sign of depth of section 3. Its label in the text color, in the interface font |
| Arrow of a face | 7 by 4 pixels | A solid triangle of rows of 1, 3, 5 and 7 pixels, in the text color, as the arrow of the scroll bar. Page Up is the word Page and the triangle, 4 pixels apart |
| Combination | 3 pixels on each side of a + | The + in the dim color, between two keycaps |
| Name of the action | 6 pixels after the last keycap | The text color, in the interface font |
| Divider | 1 by 12 pixels, in the middle of the row | colors.track, between two boxes |
Button more | As an item | A keycap with three points of 2 by 2 pixels, 2 pixels apart, then the count of the items of its list and the word more |
| List | As wide as its widest row, at most as wide as the bar; its right edge on the right edge of the bar, its bottom on the top of the bar | colors.card_top with a border of 1 pixel of colors.not_usable; rows of 24 pixels as the items, with a line of 1 pixel of colors.track between two rows, inside their margins |
The states:
| State | When | What changes |
|---|---|---|
| At rest | The pointer is not over the item | Nothing |
| Under the pointer | The pointer is over an item that takes a press, or over a row of the list | The box in colors.track |
| Pressed | The button of the pointer is down on the item and the pointer is over it | The box in colors.chosen, the name and the + in white, as an open button |
| Open | The list of the button more is open | The button in colors.chosen, its text in white |
| Chosen | Up or Down chose a row of the list | The row in colors.chosen, its name in white |
- Overflow. The items of the lowest priority go into the list first; the items in the row keep their order. A bar that wraps uses two rows first.
- Each corner is square. A keycap is a rectangle, not a rounded blob (section 2).
- A name is whole or absent (section 1). An item is in the row whole, or in the list; a row of a list narrower than the item, in a bar narrower than one item, shows its keycaps only.
- One fact once. An item names an action that no button and no title of the window names. A fact that is no key (the counts of a service, what the pointer does on a square) sits at the left of the band, in the dim color, and the items stand from the right edge.
- Both appearances. Each color is a token. White on
colors.chosenhas 4.67 to 1 in both (see "The chosen row").
11. The mark
The mark is drawn from data, not from a file: one table of cells in src/library/modus/mark gives the icons of the repository, the head of the boot display and the mark in the bar.
The mark is the picture that stands for the system: a heron in pixel cells, and the name "modus".
- The form: a heron on a grid of 24 by 24 square cells. It stands on one leg in water. Its parts: the crest and the tail (one part, in the color of the firmware), the head and the neck (the text color), the eye, the beak and the legs (two parts, in the color of the boot program), the body (the kernel), the wing (
0x2F6FC0), the water (memory). No line goes around it. - The data:
src/library/modus/markholds the rows of the cells, the table of the parts with their colors and their boxes, and the letters of the name of the mark. Its procedures are pure:mark_pixel(cell_size, x, y, variant, on_light)gives the color of one pixel of the heron,name_pixelone pixel of the name,heron_sizeandname_sizetheir sizes.mark_draw(canvas, x, y, cell_size, variant, on_light)andname_drawdraw into a canvas ofsrc/library/modus/graphics: the covered pixels only, cut to the canvas. Each procedure that draws the heron takes the variant: see "The variants of the mark". - The cell size: 1 to
CELL_SIZE_LIMIT(65 536). Another cell size draws nothing and has a size of 0. A pixel outside the heron or the name is not covered. - The gradient: each part is filled with one linear gradient, from the top left corner of the box of the part (the color moved 30 % toward white) to its bottom right corner (the color moved 30 % toward black). In the smooth variant a pixel takes the gradient at its centre; in the cells variant each pixel of a cell takes the gradient at the centre of the cell. The eye is one flat color. The arithmetic is in integers, rounded to the nearest value, so that every machine gives the same pixels.
- The two backgrounds: the background of the system
0x0B1018, and the light background0xF4F6F8of a page of another process. On the light background the neck is darker (0x9FB2C8), and the name is in0x0B1018instead of the text color. - The name of the mark: "modus" in letters of 5 by 7 cells, 2 empty columns between two letters, one flat color. The same letters are a font file, for a page that writes the name as text: see "The font of the name".
- A picture holds the name only where one file must carry the heron and the name. Elsewhere the picture is the heron alone, and the name is drawn or written beside it.
- The files:
modustool logowrites them, each a row of the table of the uses of the mark (see "The variants of the mark"), andmodustool checkfails with "run modustool logo" when a picture does not have the pixels of the data, or when the font does not have the bytes that the data gives.
| File | Size | What it shows |
|---|---|---|
resources/logo/modus.png | 1024 x 1024 | The heron (cells of 24) and the name under it (cells of 20), on the dark background |
resources/logo/modus_light.png | 1024 x 1024 | The same on the light background |
resources/logo/modus_transparent.png | 1024 x 1024 | The heron and the name in the colors of the dark background, on a transparent background |
resources/logo/modus_light_transparent.png | 1024 x 1024 | The heron and the name in the colors of the light background (the darker neck, the dark name), on a transparent background |
resources/logo/heron_768.png | 768 x 768 | The heron alone, cells of 32, on a transparent background |
resources/logo/heron_24.png, heron_48.png, heron_96.png, heron_192.png | 24 to 192 | The heron alone with cells of 1, 2, 4 and 8 pixels, on a transparent background |
.project/image.png | 512 x 512 | The heron alone, cells of 16, centred on the dark background |
resources/logo/modus_mark.ttf | A font file | The font of the name of the mark: the letters of the name as glyphs |
- A transparent file keeps the colors of the dark background: its pale neck shows little on a white page. Use
modus_light.pngthere. - The PNG writer of these files is the one of the Odin standard library: it compresses, and it writes an alpha channel. The writer of the pictures of the screen has neither.
- Where the system draws the mark, always with the colors of the dark background:
| Where | Who draws | What | When the gradients are computed |
|---|---|---|---|
| The bar of the desktop | the compositor | the heron, the cells variant on a dark background, cells of 1 pixel, at (14, 4) in the heron button | once, at the start, into one picture of 24 x 24 pixels for each look of the heron button, over the pixels of its plate; each frame copies the picture of its look (a Picture record whose generation is the look) |
| The head of the boot display | src/library/modus/bootscreen: the boot program, the root service, the process boot | the heron, the smooth variant, in a box of 48 x 48 logical pixels at (20, 12), and the name of the mark at its right: cells of 2 and 3 pixels at scale 1, and at a larger scale the largest whole cells inside the scaled boxes (3 and 4 pixels at 1.5) | at each draw of the display: one call for each pixel of the box of the heron and of the box of the name (2 304 and 2 079 at scale 1), a few integer divisions each |
- No file of the mark is in the boot image: each place draws from the data.
The variants of the mark
The heron has two variants. A request for a picture of the mark names one: nothing chooses it from the cell size.
| Variant | What a pixel takes | Where |
|---|---|---|
| Smooth | The gradient of its part at the centre of the pixel: a cell of 8 pixels holds up to 64 colors, and the gradient of a part goes from pixel to pixel | A picture: the head of the home of the site, its tile maps, the files of resources/logo, the card for other sites, the large icons, the boot display, the window of the process heron (12, 8 or 4 pixels for a cell) |
| Cells | The gradient of its part at the centre of its cell: a cell is one color at every cell size | A small icon, one pixel for a cell: the bar of the site, the bar of the desktop, the icon of 32 pixels of a tab |
- The rule of the choice: a picture is smooth; a small icon is cells.
- For an icon of the site the cell size says which it is. An icon of one pixel for a cell is a small icon: cells. An icon of two pixels or more for a cell is a picture: smooth. So the entry of 32 pixels of
favicon.icois cells, and its entry of 48 pixels and the icons of 180, 192 and 512 pixels are smooth, at 2, 7, 8, 21 and 12 pixels for a cell. The vector icon has no pixel of its own: it is the cells, one rectangle for each run of cells of one color. - The smooth variant needs at least 2 pixels for a cell (
SMOOTH_CELL_SIZE_LEAST). With one pixel for a cell the centre of the pixel is the centre of the cell: that picture is the cells variant, and its request must say so. A procedure ofsrc/library/modus/markdraws nothing for the smooth variant at one pixel, and the generator of the tool refuses it with a sentence. - The cells variant is allowed at each cell size: it gives the look of one color for a cell at a size where a picture has more pixels.
- One generator in the tool makes each file of the mark (
tools/modustool/resources/mark_pictures.odin; Developer tools: The pictures of the mark).modustool logoandmodustool sitehold no number of a picture: each asks the generator for its rows of the table of the uses, below.modustool mark usesprints the table.
The table of the uses (mark_uses) is the one table of the files of the mark. Each row is one file; an icon file has one row for each of its entries. "Cell" is the pixels of a side of a cell of the heron.
| File | Written by | Variant | Cell | What |
|---|---|---|---|---|
resources/logo/modus.png, modus_light.png | logo | Smooth | 24 | The heron and the name (cells of 20, 44 pixels under the heron), centred in 1024 x 1024, on the background of its color scheme |
resources/logo/modus_transparent.png, modus_light_transparent.png | logo | Smooth | 24 | The same on nothing |
resources/logo/heron_768.png | logo | Smooth | 32 | The heron alone |
resources/logo/heron_24.png | logo | Cells | 1 | The heron alone |
resources/logo/heron_48.png, heron_96.png, heron_192.png | logo | Smooth | 2, 4, 8 | The heron alone |
.project/image.png | logo | Smooth | 16 | The heron alone, centred in 512 x 512 on the dark background |
pictures/mark_home.png, mark_home_light.png | site | Smooth | 8 | The still picture of the head of the home, 192 x 192, one for each color scheme |
pictures/mark_bar.png, mark_bar_light.png | site | Cells | 1 | The heron of the bar, 24 x 24, one for each color scheme |
pictures/mark_card.png | site | Smooth | 16 | The heron and the name (cells of 12, 32 pixels under the heron), centred in 1200 x 630 on the dark background |
pictures/mark_animation_home.png, mark_animation_home_light.png | site | Smooth | 8 | The tile maps of the home: the frames and the drawn forms of the moves, 3072 x 992 |
pictures/mark_animation_icon.png | site | Cells | 1 | The tile map of the icon of the tab: the frames only, in the light scheme, 384 x 72 |
favicon.ico, the entry of 32 pixels | site | Cells | 1 | The heron alone, centred in 32 x 32 on nothing, in the light scheme: a small icon |
favicon.ico, the entry of 48 pixels | site | Smooth | 2 | The heron alone, 48 x 48, on nothing, in the light scheme |
pictures/icon.svg | site | Cells | 1 | The vector icon: the cells as rectangles, 24 x 24 units, in the light scheme, with the rule of the dark scheme |
pictures/icon_180.png | site | Smooth | 7 | The icon of a phone: the heron alone, centred in 180 x 180 on the dark background |
pictures/icon_192.png | site | Smooth | 8 | An icon of the manifest: the heron alone, 192 x 192, on nothing, in the light scheme |
pictures/icon_512.png | site | Smooth | 21 | An icon of the manifest: the heron alone, centred in 512 x 512 on nothing, in the light scheme |
pictures/icon_512_maskable.png | site | Smooth | 12 | The maskable icon of the manifest: the heron alone, centred in 512 x 512 on the dark background |
The site: The icons in the repository, says what names each icon and why it has its size and its background.
What the system draws is not a file, and follows the same rule. The process heron: smooth, at each of its cell sizes, because its window is a picture where the gradient matters. The boot display: smooth. The bar of the desktop: cells, one pixel for a cell.
The font of the name
The font of the name of the mark (Glossary) is the letters of mark.name_letters as a TrueType file. A page that writes "modus" in it shows the letters of the files of the mark, and the text stays text.
- The file:
resources/logo/modus_mark.ttf, written bymodustool logo(tools/modustool/resources/mark_font.odin). The tool writes each table itself:OS/2,cmap,glyf,head,hhea,hmtx,loca,maxp,nameandpost. The file holds no date: the same letters and the same license give the same bytes.modustool checkcompares the bytes of the file with the bytes that the data gives. - The glyphs, 7: the glyph of a character that the font does not have (no contour), the space, and
m,o,d,u,s. The capitalsM,O,D,U,Shave the glyphs of the small letters: the name of the mark has small letters only, so a text "Modus" still shows the mark. No other character has a glyph: a browser takes it from the next font. - The outline of a glyph is the union of its cells: it goes around the whole letter, with a second contour for the hole of the
oand of thed. It is not one square for each cell: two squares that share a side can show a thin line between them when a browser smooths the edges. Each point is a corner of a cell. An outer contour turns clockwise and a hole the other way. The font has no curve and no instruction. - The units: a cell is 128 units and the em is 1024 units, 8 cells. The 7 rows of the name are above the baseline (the ascent, 896 units) and one empty row is under it (the descent, 128 units): the letters stand on the baseline of a text beside them. The letters with no stem are 5 rows high (640 units).
- The advance of each glyph is 896 units: the 5 columns of a letter and the gap of 2 columns. So "modus" in the font has the proportions of
name_draw: 33 columns from the left of themto the right of thes, and the gap after thesis empty. - The sizes: a font size of 8 pixels gives cells of one pixel. A font size that is a multiple of 8 pixels draws whole cells; another size blurs the squares. A text in this font starts on a whole pixel.
- The names in the file: the family "modus mark", the style "Regular", the line of the copyright and the text of the license of the repository (
LICENSE). - The test (
tools/modustool/resources/mark_font_test.odin): the reader of fonts of the system (src/library/modus/vector_font), which did not write the file, opens it. For each letter, the outline sampled at the centre of each cell, with the rule of the winding that is not zero, is the cells ofmark.name_letters, and the area of the outline is the area of those cells. The test also checks the checksum of each table and of the file, the glyph of each character, the advances, and that two builds give the same bytes. - Where it is used: the site (The site: The name of the mark in the repository). The system draws the name from the cells with
name_draw, with no font.
The animations
The mark has idle animations: 15 of them. They play in three places: on the large mark of the home of the site, on the icon of its tab, and in the window of the process heron of the system. On the site they respect the choice of the visitor about motion. No mark that stands beside a text or a control moves: not the mark of the bar of the site, not the mark of the bar of the desktop.
- An animation of the mark moves a few cells of the still heron. It does not draw the bird again. The data is in
src/library/modus/mark/animation.odin, beside the table of the still heron, in the same cells and letters. A cell that moves takes the gradient of its part over the box of that part in the still heron. - The data of an animation says what the heron does, not when. Which animation plays next, and how long the heron is still between two, is one rule for each place that plays them:
src/library/modus/mark/play.odin(next_animation,still_time). The site states it in The site: The rhythm of the animations in the repository; the processheroncalls it.
| Animation | Frames (duration, cells changed from the still heron) | Time |
|---|---|---|
| blink | the eye closes (150 ms, 1) | 150 ms |
| look | the head and the beak one cell forward (800 ms, 11); still (250 ms, 0); one cell back (800 ms, 12) | 1850 ms |
| leg | the knee of the raised leg half in (200 ms, 2); in (500 ms, 6); half in (200 ms, 2) | 900 ms |
| ripple | one cell of water above the line at each side of the legs, two columns farther at each frame (4 frames of 180 ms, 2 each) | 720 ms |
| dip | the head one row lower (300 ms, 23); the eye closed (250 ms, 22); open (350 ms, 23); a swallow down the front of the neck (3 frames of 220 ms, 1 each) | 1560 ms |
| preen | the head three rows lower, the neck curved (250 ms, 43); the head turned back, the beak above the body (250 ms, 43); the head folded on the back, the tip of the beak on the body (300 ms, 47); two strokes: the tip leaves the body and a feather lifts (180 ms, 47), back in the feathers (180 ms, 47); then the same poses up (250 ms each) | 2090 ms |
| scratch | the knee in, the pose of the leg animation (200 ms, 6); three strokes on the ground: the foot forward on the row of the ground (220 or 200 ms, 8), pulled back one column with one cell of water lifted behind it (220 ms, 9); the knee in again (200 ms, 6) | 1680 ms |
| dash | the wind-up, the knee in (380 ms, 6); fourteen steps of a run of 70 ms in two poses: the legs apart with six and five cells of lines of speed behind the head and the neck (32), the legs together with the lines two cells back (24); the stop, the legs together and water lifted in front of them (220 ms, 15); the heron stands, one wave at each side (200 ms, 2). On the site the heron leaves the window by its right edge during the run and comes back by its left edge | 1780 ms |
| hop | the knee half in (180 ms, 2); in the air, the foot tucked one row higher and the water closed under it (320 ms, 5); the two waves of the ripple (200 and 180 ms, 2 each). On the site the heron lifts 4 cells | 880 ms |
| fish | a fish of two cells in the color of the crest comes out of the water in front of the legs (220 ms, 1), jumps to row 17 and comes down (200, 250 and 200 ms, 13 each: the head looks forward, as in the look), enters the water with a splash at each side (200 ms, 3), and the splash goes out (180 ms, 2) | 1250 ms |
| doze | the eye closed in each frame (500 ms, 1); one cell behind the head (400 ms, 2); a letter z of three by three cells above it (600 ms, 9); the letter higher and farther back, one cell under it (600 ms, 9); the eye still closed (300 ms, 1) | 2400 ms |
| stretch | the eye closed (700 ms, 1); the eye open and the crest one cell longer at the back (400 ms, 1). On the site the heron is taller and thinner, then shakes | 1100 ms |
| ruffle | the wind from the front: the crest one cell back (180 ms, 2), then one cell longer with one cell of the tail lifted (180 ms, 4), five frames in turn | 900 ms |
| wade | the other leg stands in the water and the first one is raised, its knee behind it (350 ms, 18); still (350 ms, 0); the other leg again (350 ms, 18) | 1050 ms |
| flap | the wing above the back, seven cells, its place on the body in the color of the body (200 ms, 17); four beats of 150 ms with the foot out of the water: the wing under the body (21), above the back (22); the wing above the back, the foot in the water (200 ms, 17). On the site the heron lifts 3 cells | 1000 ms |
- The preen and the scratch: in the preen the bird bends and scratches its body; in the scratch it scrapes the ground with its front foot. In the scratch the body does not dip: the body, the wing and the tail one row lower change 46 cells (counted on the table), five times the cells of a stroke of the leg, and the leg reads alone.
- The bounds, which the host tests hold: each animation has its limit of changed cells in the data (
animation_change_limits): a frame differs from the still heron and from the frame before it by at most 24 cells, 48 for the preen, which moves the whole head onto the back, and 40 for the dash, which moves both legs and draws the lines of speed. A frame lasts 150 to 1000 ms, so the picture changes at most about 6 times each second; the steps of the run of the dash last 70 ms, and only the dash has such frames (animation_frame_duration_least). An animation lasts at most 3 s. - A frame in which the heron leaves the water (the run and the stop of the dash, the air of the hop, the beats of the flap) has no foot in the two rows of the water, and the water is whole there. A place that moves the heron can then cut the picture at the line of the water: the water stays, and the heron moves.
- The moves. The frames are the whole animation where the picture cannot move: the icon of a tab, a later mark in the bar of the desktop. During the dash, the hop, the stretch and the flap the heron also takes other forms and other places, on the home of the site and in the process
heron: see "The moves". - The tile maps of the site hold 43 sprites: the still heron and 42 distinct frames, in rows of 16. A tile map of the home is the smooth variant, 192 pixels for each sprite, with the 19 drawn forms of the moves under the sprites: 3072 x 992 pixels, one for each color scheme. No side is longer than the 8192 pixels that a browser decodes. The tile map of the icon of the tab is the cells variant, 24 pixels for each sprite, with no form: 384 x 72 pixels. See "The variants of the mark" and The site: The mark on the site in the repository.
- Where it plays: the large heron of the head of the home of the site, the icon of the tab of the home, and the window of the process
heron. Not the small mark of the bar of the site: a page of the documentation is read, and a picture that moves at the top of a text takes the eye from it. Not the mark of the bar of the desktop, for the same reason. A reader starts the processheronto see the heron move: its window shows nothing else. - How often: on the home and in the process
heronthe heron is still for 40 % of the time and moves for 60 %. Each animation plays once before one plays again, in an order of chance, and none follows itself. - The process
heron(src/modules/demonstrations/heron): the heron stands in its water on a stage of 640 by 384 pixels, drawn from the cells at 12, 8 or 4 pixels for a cell, in the smooth variant: its window is a picture ("The variants of the mark"). The numbers of chance come from the random generator of the process.- The moves are real: in the dash the part of the heron above the water leaves the stage by the right and comes in by the left. The process plays the moves of
src/library/modus/mark("The moves"): the same keys and the same drawn forms as the home of the site. - On the grid, the way of the process at its start, and the rule of the system. At each picture the process asks
mark.move_posefor the form and the place of the heron, in whole cells, and draws the form of that frame (mark.form_cells,mark.form_cells_draw) at that place. The drawing is kept in a picture of the process: a picture of a travel copies it, and only a new frame or a new form draws it again. The process draws cells: it does not draw the free heron first, and nothing rounds a smooth move to the grid. - Free, to compare: the key
gchanges the way, and the band says "on the grid" or "free". The free way reads the same keys (src/modules/demonstrations/heron/free_way.odin). It does not draw the form: it stretches the frame of the heron, as it is, to the box of the form of the key, and the box goes from a key to the next one pixel by pixel. So each cell is a rectangle, the eye, the beak and the legs change their form with the box, and the heron stands between two cells. No color is mixed. It shows what the drawn forms are for: the picturesheronandheron_freeshow one held frame of the run of the dash in each way. - The play goes forward by 40 ms at most from one picture to the next. A picture that comes late slows the animation and never skips a part of a move: each frame is in one picture at least.
- The damage: the stage is 240 tiles of 32 by 32 pixels, each one Picture record with a generation of its own. A picture of the heron clears and draws the rectangle where the part above the water was and the rectangle where it is, and raises the generation of the tiles that these touch. The interface package then draws again only those tiles. A travel changes the tiles under the two rectangles only.
- The band under the stage, 104 pixels: the name of the animation, its frame and its progress, then the keys.
1to9andatofplay one animation at once; Space pauses;.shows the next frame while the play is paused;splays four times slower;lshows the lines between the cells and a white outline around each cell that the frame changed in the still heron;zchanges the cell size;gchanges the way of a move. - Its exports:
heron.play("dash")plays one animation,heron.animations()gives a table of the names, the frames, the times and the moves, andheron.grid(1)orheron.grid(0)chooses the way of a move. - A picture of the window is shown whole or not at all, as for each window of the system. The surface of a window has two pictures: the process draws one while the compositor reads the other, and it draws only when the compositor took the picture before (
display.canvas_free). The compositor never reads a damage rectangle after the process painted it with the background and before the process drew the heron in it. Each picture of the surface is drawn from its own older frame, so a picture of a travel draws the tiles of two steps: the damage stays a few tiles. - Each key writes one line on the log, after the process presented the state of the key:
heron: pausedandheron: plays again;heron: slowandheron: full speed;heron: cells of 8 pixels; and, for the lines, the way, a step of a frame and an animation key during a pause, the line of what the window shows. An animation of the own order writesheron: blink played in its own order: 1 frames; only the first 32 have a line, so a heron that plays for hours does not fill the log. - Its log:
heron: dash played: 17 frames, the heron left the window and came back, on the gridwhen an animation that a key or a call asked for ends, and once the mean time and the mean damage of its pictures. Both numbers are measures. A change of the lines or of the way writes what the window shows:heron: shows dash at frame 3 of 17, held, on the grid: the form run, 4 cells to the right and 0 up; the lines of the cells shown; ..., or..., held, free: the frame stretched to ... by ... pixels; .... - The texts of the band are in the font of the cells, 8 pixels for a character in both settings of the font. Each text has a box for its longest value, and the process does not compile when a box is too small.
- The moves are real: in the dash the part of the heron above the water leaves the stage by the right and comes in by the left. The process plays the moves of
- Reduced motion: when the browser says that the visitor asks for reduced motion, nothing moves, and the still picture stays. A change of that choice while the page is open stops or starts the play.
- A hidden tab: the play stops, no timer runs, and the icon is the still icon again.
modustool logowritesbuild/mark_animations.png: each animation as a row of its frames at cells of 8 pixels, with the durations, for a reader to look at.- The bar of the desktop does not play the animations. The data is ready for it:
animation_frame_cellsgives the cells of a frame, andcells_drawdraws them. To play them, the compositor needs one picture of 24 x 24 pixels for each distinct frame, drawn at the start as the still heron is, and one timer that changes the generation of the Picture record of the bar. The rule of the choice and of the still times is the rule ofsrc/library/modus/mark/play.odin.
The moves
During four animations the heron squashes, stretches, lifts, or crosses the window. The data is in src/library/modus/mark/motion.odin; the home of the site and the process heron of the system play it.
The rule: a cell of the heron never changes its form. It is a square of one size at a place of the grid. So a squashed heron is not the picture of the heron made wider: it is another drawing of the heron, in the same cells, with more columns and fewer rows. And the heron travels by whole cells: its place is a whole count of cells from its place of rest. No transform changes the size of a picture of the heron, and nothing rounds a smooth move to the grid: the drawings and the places are cells from the start.
- Only the part of the heron above the water takes a form and a place: 24 columns by 22 rows. The two rows of the water stay.
- A form is one drawing of that part. It is made in two steps, both by hand. First its lines: the columns and the rows of the frame that the form draws two times, and those that it leaves out (
form_lines). Then its corrections: cells that are set or cleared where the lines alone give a poor drawing (form_corrections). A form is not a sampling of the grid at regular places: such a sampling of 22 rows into 19 leaves out the row under the eye. - What the lines never change: the columns from 13 to the right and the rows 0 to 3. So the eye is one cell, the beak has its cells and its tip, and the crest its two cells, in every form. The column 9 of the standing leg is never repeated and never left out, and it keeps its place in every form: the leg stays above its foot, which is in the water. The last row of a form is on the line of the water.
- Where the lines are taken: a wide form repeats columns of the body at each side of the standing leg (4 to 7 behind it, 10 and 11 in front), never a column of a leg. A low form leaves out a row of the neck that repeats its neighbour (5, 8) and a row of the straight part of the legs (17). A high form repeats rows of the neck. The forms of the run and of the stop leave out rows under the feet of a heron that runs: the body comes down to the water.
| Form | Cells | Columns two times | Columns out | Rows two times | Rows out | Corrections | Drawn |
|---|---|---|---|---|---|---|---|
| natural | 24 x 22 | the frame itself | |||||
| gather | 26 x 21 | 5, 10 | 5 | lines | |||
| crouch | 28 x 19 | 4, 5, 10, 11 | 5, 8, 17 | 1: one cell of body closes the gap between the tail and the body, which the repeated columns made 3 cells wide | lines, corrected | ||
| run | 32 x 20 | 1, 2, 4, 5, 6, 7, 10, 11 | 20, 21 | 8: the same gap (1); the back leg, 2 cells thick with a foot of 4 cells across the repeated columns, is 1 cell wide with a foot of 2 (5); the two feet of the legs together, joined in a bar of 4 cells, are 1 cell each (2) | lines, corrected | ||
| brake | 20 x 23 | 3, 5, 6, 7 | 5, 7, 9 | 19, 20 | lines | ||
| slide | 22 x 21 | 5, 6 | 7 | 19, 20 | lines | ||
| rebound | 26 x 20 | 5, 10 | 5, 17 | lines | |||
| tall | 22 x 24 | 5, 6 | 6, 9 | lines | |||
| thin | 22 x 23 | 5, 6 | 7 | lines | |||
| neck | 24 x 24 | 6, 9 | lines | ||||
| long neck | 24 x 26 | 4, 6, 7, 9 | lines |
- No form is drawn cell by cell from nothing: the lines and 9 corrections give each drawing. A form that needs more is written as corrections.
- A correction names its form, and a frame or every frame. A frame that repeats a pose with no change of its own (the steps of the run of the dash) takes the corrections of that pose.
- A cell of a form takes the color of its part at its place, as a cell of a frame does: the gradient over the box of the part in the still heron, and past that box the color of the nearer end.
- The bounds: a form has at most 32 columns and 26 rows, and passes the place of the natural heron by at most 6 cells at its left, 2 at its right and 4 above.
- A move is a list of keys (
move_keys). A key has a time, the form that the heron takes from that time to the next key, a place in whole cells to the right and upward, an edge of the window or none, and a pace. No form exists between two keys: the form changes at a key. The place goes from a key to the next one cell by cell, the cells spread evenly over the time (move_pose); with the pace "hold" it stays, then is at the next key at once. - The type of a key holds no part of a cell. The table is refused (
move_keys_fault) when the keys of an animation do not go from the natural heron in its place at 0 to the same at its end; when a way goes to the right and upward at once (its steps are then not whole cells); when a key past the right edge is not followed at once by a key past the left edge; when a key moves the heron while a frame has a foot in the water; or when such a frame is drawn in a form that leaves out its last row.
| Move | Keys: the time in ms, the form, the place |
|---|---|
| dash | 0 natural; 90 gather; 180 crouch; 380 run; 450 run, 4 cells to the right; 520 run, 14 cells; 730 run, past the right edge, hold; 1010 run, past the left edge; 1360 brake, 3 cells; 1460 slide, 3 cells; 1580 rebound, in its place; 1680 natural; 1780 natural |
| hop | 0 natural; 60 gather; 120 crouch; 180 tall; 340 tall, 4 cells up; 500 crouch, on the water; 600 rebound; 700 gather; 790 natural; 880 natural |
| stretch | 0 natural; 100 neck; 200 long neck; 620 gather; 700 thin; 780 gather; 860 thin; 940 natural; 1100 natural |
| flap | 0 natural; 200 natural; 420 natural, 3 cells up; 650 natural, 3 cells up; 800 rebound, on the water; 900 natural; 1000 natural |
- The times of the animations and of their frames did not change with the forms.
modustool logodraws, inbuild/mark_animations.png, under the frames of each animation that moves, each drawing that its move shows, at the cells of the frames, with the water of its frame, its time, its name, its size, and how it was drawn. The host testdrawn_forms_keep_the_eye_the_beak_and_the_legswrites each drawing as text on its log, and checks the eye, the beak, the head cell for cell, the width of the legs and the standing leg.
12. The card of the boot image
The card "BOOT IMAGE" of the boot display says which files the boot image holds, by kind, and what the check of their hashes found. It has 536 x 130 pixels of content, whatever the count of files. Package src/library/modus/bootscreen/image_card computes its places; the boot program, the root service and the process boot draw them. It uses integers only and allocates nothing.
- The kinds: "entry" are the modules with an entry export; "no entry" are the modules with no entry export, which other modules import; "resources" are the files of the resource table. The kernel is not in the boot image: the card of the machine gives its size, and the line of the check counts it.
- The size strip, 12 pixels high, at the top: one size strip for all the files, by kind, then from the largest file to the smallest. A part is at least 2 pixels wide, 4 for the failed file. The parts fill the width exactly. If the files need more than the width at their least, the smallest files have no part; the failed file always has one. Two parts that touch take two shades of the color of their kind. The strip has no names.
- The rows of names, 4 rows of 18 pixels under the strip. Each kind has one row at least: the color of the kind, its name, its count and its bytes. Then the tiles: the names of its largest files, from the largest. A tile is as wide as its whole name. The first name that does not fit ends the kind, so a smaller file never takes the place of a larger one. The count of the files with no tile ("+55") follows the last tile, in the dim color. The rows that are left go, one at a time, to the kind with the most files with no tile.
- The line of the check: the count of the files that have the hash of the system description, the kernel included ("85 verified, the kernel included"); or, after a failure, "failed: " and the whole name of the file, in the color of a failure; or "no file verified" when the check failed before the files (a wrong signature). The part and the tile of the failed file are in the color of a failure.
- The line of the trust is the last line (Trusted boot: What a failure shows).
With the boot image of the last build (77 modules and 9 resources), the card names 12 files: 7 modules with an entry in two rows (console, root, hall_of_fame, remote, vector_glyphs, errors, address_space), 3 modules with no entry and 2 resources. A host test holds this count.
State
- The boot display follows all rules.
- The desktop (the compositor: background, bar, menus, windows, pointer, palette) follows all rules. The pointer pictures of both pointer themes are the one exception of their own (section 9, "Pointer").
- Section 5 is built: the elements draw at the text size tokens. The caption of a card is at 14, the one number of a card at 32 with its caption under it, the page heading of
manualat 24, the result of the palette at 48. monitoris built of cards: three metric cards, three graph cards and the card of its table, each with an accent rail of its concept in the place of the bar before its title (The window of `monitor`: The layout in the repository).time_page,clock,paint, the window ofremote, the palette of the compositor,interface_elements,vector_glyphs,settingsandhall_of_fameare built with the interface package (section 10).errors,locksandnettake all their colors fromsrc/library/modus/graphics.- Each other process takes each of its colors from
src/library/modus/graphics, by its meaning (The appearance: The colors of the processes in the repository): an expected answer and a failure, the kernel entries in the kernel blue, the pages in the color of memory, the levels of the log, the states ofringsandthreads, the members of a series. The terminal has its tones in both appearances. - The appearances (section 4, "The appearances"): the desktop, the palette, each window of a process, the terminal with its tones, the console and its results follow the light appearance. The paper of
paintis light in both. The boot display, the processbootthat shows it, and the stage ofheronare dark in both. - The windows below the level of the boot display,
remoteandscheduler, from the farthest:paint(a light paper),manual(a page heading, the headings of its sections in the dim color, no cards), the tables ofbudget,rights,origin,limits,frames,imports,processors(one size of text, bands but no cards and no captions), the measures ofclock,crowd,flow,disk, thenrings,threads,workers,tally,notes,life, and the text ofconsoleandterminal.
