Companions
Draw your own pet to take Lokum's place, add it, and show it in your extensions.
The character beside the notch is Lokum, but you can draw your own companion and put it there instead. A companion is a folder with no code in it.
The folder
pamuk/
├── pet.json
├── idle.svg # required
├── sleep.svg # optional
└── dance.svgpet.json:
{ "id": "pamuk", "name": "Pamuk" }The id may only use a-z, 0-9 and - (40 characters at most). lokum and active are reserved. Adding a pet with an id that is already installed replaces it.
Poses
Draw one file per pose. idle.svg is required; a pose you don't draw shows idle. File names are case sensitive (nightShift.svg). Lokum picks the pose from what happens on the Mac, and a companion that stands in for Lokum follows the same rules. The first row that applies wins:
| File | Shown when |
|---|---|
surprised | a file is dragged to the notch |
loved | the companion was petted |
alert | an agent waits for your approval, or a warning came in |
recording | the screen is recorded, or the camera or the microphone is in use |
dizzy | a command run with adanotch run failed |
celebrating | a command run with adanotch run finished well |
posing | a screenshot was just taken |
sad | the battery is below 20 % |
melting | the Mac runs hot |
dance | music or a video plays, even during a focus session |
sleep | a focus session, and the night while nobody works |
searching | there is no internet |
zen | Do Not Disturb is on |
exhausted | an AI provider's limit is used up |
nightShift | you are still working between 01:00 and 06:00 |
yawning | 45 minutes without a key press or mouse move |
idle | nothing else applies |
Lokum also reacts to single moments for a few seconds, on a banner or beside the notch. These poses are not in the order above; draw the ones you want, the rest show idle:
| File | Shown when |
|---|---|
happy | something went well: text was recognised, a timer finished |
pluggedIn | the charger was just plugged in |
charging | the Mac is charging |
fullBattery | the battery is at 100 % |
unplugged | the charger was pulled out |
thinking | an agent is planning |
reading | an agent is gathering context |
coding | an agent is editing files |
approval | an agent is asking for permission |
team | more than one agent is working |
taskDone | an agent finished its task |
stuck | an agent hit a failure |
hello | the lid was opened |
goodbye | the Mac is going to sleep |
eating | a file was dropped on the shelf |
proud | a pull request was merged |
rushing | a meeting is about to start |
carrying | a big download is running |
stuffed | the disk is almost full |
cleaning | the trash was emptied |
typing | a long stretch of typing |
stretching | a Pomodoro just ended |
drinking | the water reminder |
birthday | it is your birthday |
bayram | a holiday |
anniversary | a year together |
Drawing rules
A companion never runs code; only a small subset of SVG is drawn.
- Elements:
g,path,circle,ellipse,rect,text. Anything else is ignored. - The character sits in a 0…40 × 0…32 box. The visible area is
-10 -14 60 52, so an antenna or a star can reach outside the box. - Colours:
#rrggbb, or Lokum's names (ink,cheek,mouth,white,pink,yellow,red,orange,green,blue,cyan). - For movement, give a
gone of these classes:p-breathe,p-bob,p-droop,p-jump,p-blink,p-tw,p-z,p-h,p-n,p-t,p-led,p-spin(turns around),p-fall(tumbles down and fades). - Each file is at most 64 KB and 600 elements. A whole
<svg>file works too.
<svg xmlns="http://www.w3.org/2000/svg">
<g class="p-breathe">
<path d="M5.5 31 C2.2 31 2 26 2.6 20 C3.6 10 10 5.2 20 5.2 C30 5.2 36.4 10 37.4 20 C38 26 37.8 31 34.5 31 Z" fill="#a99bf0"/>
<ellipse cx="14" cy="18" rx="2.1" ry="2.7" fill="ink"/>
<ellipse cx="26" cy="18" rx="2.1" ry="2.7" fill="ink"/>
</g>
</svg>Add it
In Settings › Lokum › Companions › Add companion…, choose the folder. Adanotch checks the files, copies them into its own library (~/Library/Application Support/Adanotch/Pets/) and switches to the pet at once. If something is wrong, it says what. While a pet is active Lokum's outfits are hidden; choose "Lokum" to get them back.
Show it in extensions
Your extension can show the companion in its card or beside the notch. It can't change the drawing, only pick the pose. You draw it with ui.pet(id, pose, { size }). The id is an installed pet's id, "lokum" for Lokum herself, or "active" for whichever the user chose (a pet or Lokum), so your extension shows what they picked.
const { ui } = AdanotchKit;
return {
compact: { leading: ui.pet("active", running ? "dance" : "idle") },
expanded: ui.stack(
[ui.pet("active", "happy", { size: 56 }), ui.text("Ready!")],
{ axis: "h", spacing: 12, align: "center" },
),
};A companion that belongs to your extension
If your extension should have its own companion, ship the pet folder with it and give its id to ui.pet:
ui.pet("pamuk", "dance")- The user installs the folder once with Add companion…; say so in your extension's README. Installing activates it, and the user can switch back to Lokum or another pet later;
ui.pet("pamuk", …)draws the one you asked for even when it isn't the active one. - If the
iddoesn't name an installed pet (not added yet, or removed), the active pet or Lokum is drawn. Your extension gets no error. - Pets don't go inside the
.adanotchextpackage; they are shared as a separate folder.
See the UI reference.