About
Clock
Alarms, world clock, stopwatch and timer in one Noctalia panel and bar widget.
Clock keeps every time tool in the same place: schedule alarms, compare time zones, run a stopwatch with laps and start several countdowns that keep running after the panel is closed. The bar widget shows the live time and indicators for a pending alarm or the next running timer.
Plugin
| Field | Value |
|---|---|
| ID | faminec/clock |
| Entries | Bar widget: bar; panels: panel, ringing; service: clock |
All four entries share the plugin service, so an alarm or timer keeps running while the main panel is closed. The ringing panel is persistent and appears on top of the current workspace until the alarm is stopped or the ringing timer is dismissed.
Requirements
Requires Noctalia with plugin API 43 or newer.
zenity is the only external program the plugin launches. It draws the file
picker used by Add custom sound; without it, that button opens a text field
where the path can be typed or pasted instead, and the six built-in sounds keep
working. The package is called zenity on Arch Linux, Debian/Ubuntu and Fedora.
No other external programs or Python packages are needed. Clock uses the Noctalia
runtime (noctalia.formatTime, noctalia.isValidTimezone, noctalia.sound.play,
noctalia.notify, noctalia.http) and reads the system time-zone database
(/usr/share/zoneinfo/zone1970.tab, falling back to zone.tab) to build the city
search list and the coordinates used for world-city weather.
Six short WAV sounds ship with the plugin: chime, bells, beep, pulse, harp
and digital. They are original synthesized tones created for Clock, not
third-party samples or a redistributed sound theme, so they need no source or
attribution beyond the plugin's own MIT license. Alarms are evaluated in the
local time zone; the world clock displays
each selected zone with its current offset. Current temperatures come from Noctalia's
weather cache for the local city and from Open-Meteo for saved world cities.
Usage
Install Clock from Noctalia's plugin catalog: open Settings → Plugins, find Clock and enable it. Then add the Clock bar widget from the bar widget picker.
For a development checkout:
noctalia msg plugins enable faminec/clock
noctalia msg config-reload
Click the bar widget to open the panel on the last used tab. Right click opens the timer tab directly. The four tabs are Alarm, World, Stopwatch and Timer.
The panels can also be opened directly:
noctalia msg panel-toggle faminec/clock:panel
noctalia msg panel-toggle faminec/clock:ringing
Alarms
- Add alarm: choose a time, optional label, repeat days (none means once, all seven days means every day), snooze length, sound, snooze limit and background.
- Toggle an alarm with its switch; edit it by clicking the row; delete it with the trash button.
- Edit enters selection mode; tick several alarms and delete them at once, or select one alarm and use the up/down arrows in the header to change the list order. The order is saved.
- Next alarm card shows the next occurrence and the remaining time.
- Each alarm can turn snooze on or off. While snooze is off, its length and repeat choices are hidden. When it is on, repeats can be 3 times, 5 times or unlimited.
- The sound toggle hides the sound choices and preview when it is off. Choose one of six built-in sounds, preview it, or add a custom WAV, OGG, MP3 or FLAC file up to 20 MB; the path is saved in the plugin data and the file is played in place.
- Backgrounds can use a fixed theme (midnight, violet, ocean, forest, ember or mono) or the live wallpaper palette (primary, secondary, tertiary or one of three surface containers). The palette switch turns that mode on or off per alarm.
- When an alarm rings, the ringing panel uses the selected background and adapts its text and glyph contrast to it. It offers Snooze (when available) and Stop. Snoozing re-arms the alarm after the configured number of minutes.
- A one-time alarm is scheduled for its next occurrence and its card shows that date. Recurring alarms use the selected ISO weekdays.
- An optional Upcoming alarm notification fires 5, 15 or 30 minutes before the next alarm when that setting is enabled.
World clock
- The local time and local temperature are always shown first, followed by up to 30 saved zones.
- + opens the search with 47 popular cities. Type a city, region or IANA zone name and pick from up to 25 matching results.
- Drag a saved zone by its grip to reorder it; the small trash icon at the right of the row removes it.
- Each zone shows the local date, the offset from UTC, a day/night glyph and its current temperature in Celsius or Fahrenheit.
- Converter compares local time with any saved zone. Move the shared instant with -1h, -15m, Now, +15m or +1h, and switch the compared city with the arrows.
Stopwatch
- Start / Pause, Lap, Copy and Reset.
- Copy puts the elapsed time and every lap (split and total) on the clipboard as plain text.
- Laps are listed newest first with their split and total; best and worst splits are highlighted.
- Up to 100 laps are kept. The stopwatch keeps running when the panel closes.
Timer
- Run up to 10 countdowns at the same time. Each card shows its own remaining time, end time and progress, with Pause / Resume, +1 min and Delete.
- Add timer opens hour, minute and second steppers plus 1, 5, 10, 15 and 30 minute presets. When no timer exists, quick presets start one immediately.
- Every timer is deadline-based, so it stays accurate while the panel is closed or the service is reloaded. Timers that finish together are queued and ring in turn; Dismiss stops only the ringing timer.
- The bar widget shows the nearest running timer and a count when more than one is active.
Keyboard
The main panel captures these keys while it has keyboard focus:
| Key | Tab | Action |
|---|---|---|
Space |
Stopwatch | Start / pause |
L |
Stopwatch | Record a lap |
R |
Stopwatch | Reset |
Space |
Timer | Pause or resume the first timer; with no timers, open the add sheet |
Settings
Plugin settings are available under Settings → Plugins → Clock:
| Setting | Type | Default | Description |
|---|---|---|---|
default_snooze |
int | 10 |
Snooze length in minutes for new alarms. |
ring_timeout |
int | 10 |
Minutes before a ringing alarm or timer stops by itself; 0 keeps it ringing. |
default_sound |
select | chime |
Sound for new alarms: chime, bells, beep, pulse, harp or digital. |
timer_sound |
select | chime |
Sound for countdown timers: chime, bells, beep, pulse, harp or digital. |
default_theme |
select | midnight |
Fixed background for new alarms when palette mode is off: midnight, violet, ocean, forest, ember or mono. |
default_snooze_repeat |
select | 3 |
Snooze limit for new alarms: 3, 5 or 0 (no limit). |
upcoming_alarm |
select | 15 |
Notify this many minutes before the next alarm: 0, 5, 15 or 30 (0 disables it). |
time_format |
select | system |
Use the system format, 24h or 12h. |
temperature_unit |
select | celsius |
World clock temperature unit: celsius or fahrenheit. |
header_seconds |
bool | false |
Show seconds in the panel header. |
default_tab |
select | alarm |
Tab opened when no last tab is available. |
default_timer_minutes |
int | 5 |
Initial duration shown by the add-timer sheet. |
notify |
bool | true |
Send a desktop notification when an alarm or timer starts ringing. |
The bar widget has its own settings:
| Setting | Type | Default | Description |
|---|---|---|---|
format |
select | system |
system, 24h or 12h. |
show_seconds |
bool | false |
Include seconds in the bar clock. |
show_alarm |
bool | true |
Show an alarm glyph when an alarm is pending. |
show_timer |
bool | true |
Show the nearest remaining time and timer count when timers are running. |
IPC
Every command goes to the plugin service through the all target:
noctalia msg plugin faminec/clock:clock all <command> [arguments]
| Command | Example | Description |
|---|---|---|
alarm <HH:MM> [label] |
alarm 07:30 Morning |
Add a one-time alarm at the next occurrence of that time. |
timer <duration> |
timer 5m |
Start an additional countdown (up to 10 at once). |
stopwatch [start|pause|toggle|reset|lap] |
stopwatch start |
Control the stopwatch; no action means toggle. |
world add <zone> |
world add Europe/London |
Save an IANA time zone. |
world remove <zone> |
world remove Europe/London |
Remove a saved time zone. |
snooze |
snooze |
Snooze the ringing alarm. |
dismiss |
dismiss |
Stop the alarm or dismiss the timer. |
open [tab] |
open timer |
Open the panel, optionally on alarm, world, stopwatch or timer. |
status |
status |
Send a notification with the next alarm, timer and stopwatch state. |
Examples:
noctalia msg plugin faminec/clock:clock all alarm 06:45 Stand up
noctalia msg plugin faminec/clock:clock all timer 25m
noctalia msg plugin faminec/clock:clock all world add Asia/Tokyo
noctalia msg plugin faminec/clock:clock all open world
Invalid times, durations, zones and actions are rejected with a notification; they never change the saved state.
Notes
- The service owns all timing. Closing the panel never pauses an alarm, timer or stopwatch.
- If a timer and an alarm ring together, they are queued; each one is shown in turn.
- The ringing panel is intentionally persistent: clicking outside it does not dismiss an alarm.
- Custom sounds are referenced by path; Clock does not copy them. If a file moves or is deleted, that alarm falls back to the built-in chime when it rings. Up to 20 custom sounds are kept.
- State is stored as JSON in
noctalia.pluginDataDir()/clock.json(data version 3): alarms with their manual order, palette choice and sound settings, saved zones, custom sound paths, running and paused timers, the stopwatch and any alarm or timer waiting to be dismissed. It is written after every change and on exit; no other file is written or deleted. Older files with a singletimerentry are migrated to thetimerslist on load. - Noctalia's own
weather.jsoncache is read for the local temperature. Open-Meteo receives only the latitude and longitude of saved world cities; no location name, alarm data or settings leave the machine. Weather is cached for ten minutes and failures are retried after five minutes. - The only process Clock spawns is
zenity, when Add custom sound opens its file picker. Without zenity the button opens a native path field instead. Nothing is downloaded or executed.
Testing
From the repository root:
cd clock
luajit tests/test-units.lua
luajit tests/test-service.lua
Each suite prints N passed, N failed, exits non-zero when a check fails and names
the failing check. The service suite builds its fixtures (the state file and a custom
WAV) in a private directory created atomically with mktemp -d (usually under
/tmp) and removes only those two files and the empty directory at the end, so it
never writes to fixed paths or touches files it did not create.
License
MIT. The license field in plugin.toml declares it.
Versions
| Version | Plugin API | Updated |
|---|---|---|
| v1.0.0 latest | 43 | Dec 4, 2026 |
Older versions stay installable on a Noctalia release whose plugin API is below the latest version's.