Skip to content
Varlig Guide
Varlig home

Shopping lists and budgets

A shopping list is a calculation with a tick box. Write what you plan to buy, tick things off as they go in the basket, and Varlig keeps three running totals: everything you planned, what you’ve bought, and what’s still to come. Nothing is retyped, and the list stays a note you can read.

This page covers writing items, the three totals, using them in further sums, and what happens to a line with no price.

Write a list

Inside a calc block, start a line with a task marker and put the price on it:

calc
- [x] tent: $100 gives $100.00
- [ ] stove: $50 gives $50.00
- [ ] pegs 12 @ $0.25 gives $3.00
planned gives $153.00
purchased gives $100.00
remaining gives $53.00

- [ ] is an open item and - [x] is a bought one. Click the box in the note to tick an item: the totals move immediately, and Edit › Undo (⌘Z) puts it back in one step. * and + work as bullets too, and a bare [] milk £1 counts without a bullet, though only a bulleted item gets a box you can click.

The marker takes no part in the arithmetic, so each line still shows its own price, and a quantity works as it does anywhere else: pegs 12 @ $0.25 is $3.00.

The three totals

Each word adds up a different part of the list:

Word Adds up
planned, total planned every item, ticked or not
purchased, bought, paid, total purchased the ticked items
remaining, unpurchased, left to buy, total remaining the items still open

Only lines with a task marker count towards them. A plain line without a box is part of total, as always, but not part of planned.

Export or publish the note and each of these totals carries a sentence saying what it counted, so a figure cannot be read as the whole list by somebody who never saw the ticks: “Purchased counts checked items only (1 item).” and “Planned counts every item, checked or not (3 items).” The number in brackets counts the items holding an amount, not every line.

Use the totals in a sum

The totals are values like any other, so a budget line can subtract one, and you can give a total a name:

calc
budget = $200 gives $200.00
- [x] tent: $100 gives $100.00
- [ ] stove: $50 gives $50.00
purchased gives $100.00
budget - purchased gives $100.00
spent = purchased gives $100.00
budget - planned gives $50.00
(spent / planned) as % gives 66.6666666667%

Lines without a price

A statistic over items that hold no amount says so rather than answering zero:

calc
- [ ] call the campsite gives
- [ ] pack the car gives
planned gives Unsupported: no amounts on the checklist above

A total whose state has no items in it is zero: with nothing ticked, purchased is $0.00.

Group items with tags

A tag labels a line wherever it sits, so one list can hold several kinds of thing and still total them apart:

calc
- [x] tent: $100 #gear gives $100.00
- [ ] stove: $50 #gear gives $50.00
- [x] bread: $4 #food gives $4.00
total of #gear gives $150.00
purchased gives $104.00