Skip to content

City

city opens one interactive manager that controls where you are: the default city, a weekly schedule of city rules, and a temporary override. Prayer times and the weather line follow the resolved city automatically.

Screen What it shows
Current city e.g. Karaj (override until Tue 08:00), Tehran (schedule, until 18:00), or Tehran (default)
Upcoming transitions The next rule starts (up to five)

Options: change city now, edit schedule, edit default, view/clear override, quit. There are no subcommands — everything is interactive.

One concept, one action: set city X until Y, where Y is:

Duration Behaviour
Next schedule change Clears at the next rule start (shown in the menu). With no rules it stays until cleared.
Specific date & time Clears at that timestamp. Afterwards the schedule governs if a rule exists at that moment, otherwise the default — nothing lingers.
Indefinite Persists until you clear it under view/clear override.

Picking use the default city stores an override whose city is default: the schedule is suspended and the default city applies until the chosen duration ends.

Rules map weekday time windows to cities. Validation happens on save:

  • Overlap on a shared weekday is rejected.
  • Adjacent rules are fine — 08:00–12:00 Karaj then 12:00–20:00 Tehran hands over at 12:00 exactly (ranges are inclusive at the start, exclusive at the end).
  • Gaps are fine too — outside any rule the default city applies.
  • No overnight windows (from must be earlier than to within one day).
  • Edits take effect immediately; the next header render uses them.

Days accept weekday numbers on the Iranian week (0 = Sat … 6 = Fri), English day names, ascending ranges, Persian digits, or all — separated by spaces or commas: 0 2 3, sat mon, mon-fri, ۵ ۶, all. Invalid input re-prompts only the field that failed — the city and days you already entered are kept — and the parsed meaning is echoed back (-> Sat, Mon) before the time range is asked. Time ranges accept - or to (07:00-17:00, 7:00 to 12:00).

Pick any city from the registry. The default is required and falls back to Tehran when unset.

Cities live in the version-controlled data/cities.json — each entry carries coordinates (used by the offline prayer calculation) and an IRIMO weather page URL (cities without one simply get no weather line). Adding a city is a file edit; there is no runtime mutation. See Cities for the resolution rules.

Travel mode wins completely: no city resolution runs, and weather and prayer nudges are suppressed as usual.