Anothertime
Always see time, date, week, temperature and humidity
| System | AWTRIX NG Scripts |
|---|---|
| Firmware | AWTRIX NG |
| Topic | Miscellaneous |
| Built by | Toinux |
| File | WkxRvlZTvA9O.ax · 7.0 KB |
| Icons | — |
| Published | 21 Aug 2026 · updated 21 Aug 2026 |
Anothertime
An always-on clock that packs time, seconds, weekday and a rotating widget onto a single 32×8 panel.
Anothertime is a compact "everything at once" clock face: a big HH:MM readout with animated digit
transitions, a seconds-progress bar, a weekday indicator, and a small rotating widget (date /
temperature / humidity) in the corner — all on the same screen, all the time.
This app is still evolving — some things below (widget timing, a couple of colors) aren't
configurable yet and are hardcoded for now. It's fully usable as-is.
Requirements
- AWTRIX NG. No PSRAM or extra memory needed — the script draws everything with primitives, no icons.
- Time sync (NTP) strongly recommended. The clock, the seconds bar and the weekday indicator
all read the device's wall clock; before it syncs they simply won't show meaningful values. - Temperature / humidity sensor: optional. If your board has none, those two widgets just
show--instead of a reading — nothing breaks. - No network requests, no API keys, no icons required. Everything is drawn on-device.
What you see on screen
-
Time (top-left, large digits):
HH:MM. The colon between hours and minutes fades in and out
once a second. When the minute changes, the two affected digits animate from old to new — either
a fade cross-dissolve or a scroll (digits slide past each other), your choice. -
Seconds bar (bottom-left, columns 0–16): fills left to right over the course of each minute,
with a softly-fading pixel at the leading edge instead of a hard cutoff. -
Weekday indicator (bottom-right, columns 18–31): a small row of dots/segments showing where
in the week you are, in one of four visual styles, with today highlighted in its own color. -
Rotating widget (top-right corner): cycles automatically between:
- Date — day of the month, with a little calendar icon
- Temperature — from the device's sensor, one decimal, with a thermometer icon
- Humidity — from the device's sensor, rounded, with a droplet icon
Each switch cross-fades smoothly between the outgoing and incoming widget (icon and value together).
-
The time's color automatically follows your device's Time color setting (or Default text
color if that's unset) — including live changes, no restart needed.
Settings
Go to the Apps tab → the ⋯ menu on Anothertime's row → Settings. Saving restarts the app.
| Setting | What it does | Default |
|---|---|---|
| Seconds color | Color of the seconds progress bar | #FF00FF |
| Time animation | How digits transition on a minute change: scroll or fade |
fade |
| Time animation duration | How long that transition takes (100–5000 ms) | 500 ms |
| Week style | Weekday indicator look: large, progress, dotted, dotted2 |
dotted2 |
| Week days color | Color of the non-current weekday marks | #00FFFF |
| Current day color | Color highlighting today in the weekday indicator | #FF00FF |
| Week starts Sunday | Off = week starts Monday, On = week starts Sunday | false |
Not configurable yet
- Which widgets rotate, their order, and how long each stays (date 2 s, temperature 6 s,
humidity 2 s) — currently fixed in the script. - The 1-second cross-fade duration between widgets — currently fixed.
These are natural candidates for future @config fields as the app matures.
WkxRvlZTvA9O.ax
# @name anothertime
# @desc Always see time and other widgets
# @author toinux@gmail.com
# @version 1.0
# @config sc color "Seconds color" default=#FF00FF
# @config ta select "Time animation" options=scroll,fade default=fade
# @config tad slider "Time animation duration" min=100 max=5000 default=500 unit=ms
# @config wsty select "Week style" default=dotted2 options=large,progress,dotted,dotted2
# @config wc color "Week days color" default=#00FFFF
# @config wdc color "Current day color" default=#FF00FF
# @config ssun bool "Week starts Sunday" default=false
import math
class MyApp
var cur, prev
var hh, mm
var cur_min
var widgets
var index, wticks
var current_widget, previous_widget
var transition_start_ms, transition_duration_ms
var week_style, week_color, day_color, start_sunday
var sc, ta, tad
var tc
var temp_label, hum_label
var day_label
def init()
self.cur = ["0", "0", "0", "0"]
self.prev = ["0", "0", "0", "0"]
self.cur_min = nil
self.widgets = [
{"name": "date", "duration": 2},
{"name": "temperature", "duration": 6},
{"name": "humidity", "duration": 2}
]
self.index = 0
self.current_widget = self.widgets[0]["name"]
self.previous_widget = nil
self.wticks = self.widgets[0]["duration"]
self.transition_start_ms = nil
self.transition_duration_ms = 1000
self.sc = store.get("sc")
self.ta = store.get("ta")
self.tad = store.get("tad")
self.tc = settings.get("timeColor")
if self.tc == nil self.tc = settings.get("textColor") end
self.week_style = store.get("wsty")
self.week_color = store.get("wc")
self.day_color = store.get("wdc")
self.start_sunday = store.get("ssun")
self.temp_label = nil
self.hum_label = nil
self.day_label = str(day())
end
def loop()
if self.wticks <= 0
self.previous_widget = self.current_widget
self.index = (self.index + 1) % size(self.widgets)
self.current_widget = self.widgets[self.index]["name"]
self.wticks = self.widgets[self.index]["duration"]
self.transition_start_ms = epoch_ms()
end
self.wticks -= 1
var t = sensor.temperature()
self.temp_label = t == nil ? "--" : str(round(t, 1))
var hmd = sensor.humidity()
self.hum_label = hmd == nil ? "--" : str(round(hmd))
self.day_label = str(day())
var newtc = settings.get("timeColor")
self.tc = newtc == nil ? settings.get("textColor") : newtc
end
def calculate_cur_prev()
var h = hour()
var m = minute()
self.cur = [str(h / 10), str(h % 10), str(m / 10), str(m % 10)]
self.hh = self.cur[0] + self.cur[1]
self.mm = self.cur[2] + self.cur[3]
var pm = m - 1
var ph = h
if pm < 0 pm = 59 ph = (h - 1 < 0) ? 23 : h - 1 end
self.prev = [str(ph / 10), str(ph % 10), str(pm / 10), str(pm % 10)]
self.cur_min = m
end
def fade_color(color, pct)
if color == nil return self.fade_color(0xFFFFFF, pct) end
if pct >= 1.0 return color end
var r = (color >> 16) & 0xFF
var g = (color >> 8) & 0xFF
var b = color & 0xFF
return rgb(int(r * pct), int(g * pct), int(b * pct))
end
def draw_time()
var ems = epoch_ms()
var xpos = 0
var ypos = 6
if second() % 2 > 0
var frac = (ems % 1000) / 1000.0
var pct = (math.cos(2 * math.pi * frac + math.pi) + 1) * 0.5
text(xpos + 8, ypos, ":", self.fade_color(self.tc, pct))
end
var mms = ems % 60000
if mms < self.tad
var pct = real(mms) / self.tad
var i = 0
while i < 4
if self.cur[i] != self.prev[i]
if self.ta == "scroll"
var spos = int(pct * 8)
text(xpos, ypos + spos - 8, self.cur[i], self.tc)
text(xpos, ypos + spos, self.prev[i], self.tc)
else
var s = (pct < 0.5) ? self.prev[i] : self.cur[i]
text(xpos, ypos, s, self.fade_color(self.tc, (math.cos(2 * math.pi * pct) + 1) * 0.5))
end
else
text(xpos, ypos, self.cur[i], self.tc)
end
xpos += 4
if i == 1 xpos += 2 end
i += 1
end
else
text(0, 6, self.hh, self.tc)
text(10, 6, self.mm, self.tc)
end
end
def draw_seconds()
var secw = 17
var ms_elapsed = epoch_ms() % 60000
var valeur = (ms_elapsed * secw) / 59000.0
var filled = int(valeur)
var pct = valeur - filled
var i = 0
while i < filled
pixel(i, 7, self.sc)
i += 1
end
if filled < secw
pixel(filled, 7, self.fade_color(self.sc, pct))
end
end
def draw_widget(name, pct)
var ox = width() - 13
var oy = 0
var white = self.fade_color(0xFFFFFF, pct)
var v = "?"
if name == "date"
var grey = self.fade_color(0x8B898C, pct)
var blue = self.fade_color(0x0036FF, pct)
rect_fill(ox, oy + 1, 5, 2, blue)
rect_fill(ox, oy + 3, 5, 3, white)
line(ox + 1, oy, ox + 1, oy + 1, grey)
line(ox + 3, oy, ox + 3, oy + 1, grey)
pixel(ox + 1, oy + 4, grey)
pixel(ox + 3, oy + 4, grey)
v = self.day_label
elif name == "temperature"
var red = self.fade_color(0xFF4C50, pct)
pixel(ox + 2, oy, white)
line(ox + 1, oy + 1, ox + 1, oy + 2, white)
line(ox + 3, oy + 1, ox + 3, oy + 2, white)
pixel(ox + 2, oy + 2, red)
rect_fill(ox, oy + 3, 5, 2, white)
rect_fill(ox + 1, oy + 3, 3, 2, red)
rect_fill(ox + 1, oy + 5, 3, 1, white)
v = self.temp_label
elif name == "humidity"
var l = self.fade_color(0xD5F6FF, pct)
var m1 = self.fade_color(0xBDF3FF, pct)
var m2 = self.fade_color(0x62E2FF, pct)
var m3 = self.fade_color(0x40DAFE, pct)
var d1 = self.fade_color(0x00AEFF, pct)
var d2 = self.fade_color(0x0089CD, pct)
pixel(ox + 2, oy, l)
pixel(ox + 2, oy + 1, m1)
pixel(ox + 1, oy + 2, white) pixel(ox + 2, oy + 2, m1) pixel(ox + 3, oy + 2, m2)
pixel(ox, oy + 3, white) pixel(ox + 1, oy + 3, m1) pixel(ox + 2, oy + 3, m1)
pixel(ox + 3, oy + 3, m2) pixel(ox + 4, oy + 3, d1)
pixel(ox, oy + 4, white) pixel(ox + 1, oy + 4, m2) pixel(ox + 2, oy + 4, m2)
pixel(ox + 3, oy + 4, m3) pixel(ox + 4, oy + 4, d2)
pixel(ox + 1, oy + 5, d1) pixel(ox + 2, oy + 5, d1) pixel(ox + 3, oy + 5, d2)
v = self.hum_label
end
text(ox + 6, 6, v, self.fade_color(0xFFFFFF, pct))
end
def draw_week()
var wd = self.start_sunday ? weekday() : (weekday() + 6) % 7
var xpos = 18
if self.week_style == "large"
line(xpos, 7, 31, 7, self.week_color)
line(xpos + wd * 2, 7, xpos + wd * 2 + 1, 7, self.day_color)
elif self.week_style == "progress"
line(xpos, 7, 31, 7, self.week_color)
line(xpos, 7, xpos + wd * 2 + 1, 7, self.day_color)
elif self.week_style == "dotted"
line(xpos, 7, 31, 7, 0x000000)
var i = 0
while i < 7
pixel(xpos + i * 2, 7, i == wd ? self.day_color : self.week_color)
i += 1
end
elif self.week_style == "dotted2"
line(xpos, 7, 31, 7, 0x000000)
var i = 0
var x = xpos
while i < 7
if i == wd
line(x, 7, x + 1, 7, self.day_color)
x += 3
else
pixel(x, 7, self.week_color)
x += 2
end
i += 1
end
end
end
def draw()
if minute() != self.cur_min
self.calculate_cur_prev()
end
clear()
self.draw_time()
self.draw_seconds()
self.draw_week()
if self.transition_start_ms != nil
var elapsed = epoch_ms() - self.transition_start_ms
if elapsed >= self.transition_duration_ms
self.transition_start_ms = nil
self.draw_widget(self.current_widget, 1.0)
else
var pct = elapsed * 1.0 / self.transition_duration_ms
var w = (pct < 0.5) ? self.previous_widget : self.current_widget
self.draw_widget(w, (math.cos(2 * math.pi * pct) + 1) * 0.5)
end
else
self.draw_widget(self.current_widget, 1.0)
end
end
end
return MyApp()
Install it on your AWTRIX NG
Your browser writes the script straight to the device on your network. It joins the app rotation right away.
Some browsers refuse to talk to a device on your network from a public page. Download the flow and paste it into the Scripts tab of your device, or install it from a terminal:
More flows for AWTRIX NG Scripts or Miscellaneous
Something wrong with this flow? Report it.