etyOS

Nirvana: writing applets

Shipping an applet

What turns a window that runs into an application the launcher lists: the registry entry, the icon, the desktop entry.

A window that runs is not yet an application: the launcher does not list it. Three things make it one.

1. The registry entry

Check the window’s sizes at the smallest size you allow, and add titles for every language you translate into. See Windows and the registry.

2. An icon

An SVG named etyde-<id>.svg, in the style of the built-in ones.

3. A desktop entry

etyde-<id>.desktop is what the launcher, the dock and “open with” know the application by:

[Desktop Entry]
Type=Application
Name=Notes
Name[ru]=Заметки
Comment=Short notes, kept
Comment[ru]=Короткие заметки под рукой
Keywords=notes;memo;text;
Keywords[ru]=заметки;записки;текст;
Exec=etyde-applet notes
Icon=etyde-notes
Categories=Utility;
OnlyShowIn=etyDE;YAWC;
StartupWMClass=etyde-notes
  • Exec=etyde-applet <id> starts it; StartupWMClass=etyde-<id> is how a window is matched to its icon in the dock.
  • Keywords are what the launcher’s search also looks through. Add what a person would type, in each language.
  • OnlyShowIn=etyDE;YAWC; keeps it out of other desktops’ menus on a machine that has several.
  • An applet that opens files adds MimeType=, and is given the file when it is started (see “Opening a file” in Recipes).

Before you call it done

  • Both appearances, light and dark.
  • Both languages.
  • The smallest window size the registry allows, and a large one.
  • The keyboard alone: Tab reaches everything, Enter and Escape do what one expects, a sheet takes the caret.
  • Every state: empty, loading, one item, many, an error.
  • Nothing slow in render or event.
  • It ends when its window is closed (or is kept ready on purpose).

Something wrong or missing on this page? Say so in the tracker (choose “Site and docs”).

Esc