diff --git a/apps/eliteclock/ChangeLog b/apps/eliteclock/ChangeLog new file mode 100644 index 000000000..52f6f5685 --- /dev/null +++ b/apps/eliteclock/ChangeLog @@ -0,0 +1 @@ +0.01: initial import diff --git a/apps/eliteclock/README.md b/apps/eliteclock/README.md new file mode 100644 index 000000000..0b32015e6 --- /dev/null +++ b/apps/eliteclock/README.md @@ -0,0 +1,5 @@ +# Elite clock ![](app.png) + +Simple binary clock for leet haxorz. + +Written by: [Pavel Machek](https://github.com/pavelmachek) diff --git a/apps/eliteclock/app-icon.js b/apps/eliteclock/app-icon.js new file mode 100644 index 000000000..bc7850c4f --- /dev/null +++ b/apps/eliteclock/app-icon.js @@ -0,0 +1 @@ +require("heatshrink").decompress(atob("mEwgIspiEPgEeAoU/4F/wGAiEAsEA4AFImAHBAolj/gRD4YFEC4UPwEfgAFC4EfF5IpHAp4dC4EQv/A/+AHYJlDnjY/AH4AJ")) diff --git a/apps/eliteclock/app.png b/apps/eliteclock/app.png new file mode 100644 index 000000000..10c6e078c Binary files /dev/null and b/apps/eliteclock/app.png differ diff --git a/apps/eliteclock/eliteclock.app.js b/apps/eliteclock/eliteclock.app.js new file mode 100644 index 000000000..daf9fb567 --- /dev/null +++ b/apps/eliteclock/eliteclock.app.js @@ -0,0 +1,86 @@ +// Bangle.js 2 - Binary Leet ClockZ +/* + +bangle.js2: create binary 'leet clock' where the time is shown as text +"leet clockz" with binary 0 being normal character and binary one +being leet translation. Be careful to only update time on minute +boundaries. + +So yeah — 1337 c10ckZ = certified leetspeak 😎 + +ChatGPT said: +Alright, here’s a hardcore hacker variant of elite clock in full-on aggressive leetspeak: + +£|173 ¢|_0¢| + binMask[i] === '1' ? (LEET[ch] || ch) : ch + ).join(""); +} + +function draw() { + g.reset().clear(); + const now = new Date(); + const bin = getBinaryFromTime(now); + const txt = getDisplayText(bin); + + const w = 0; + g.setFont("Vector", 47).setFontAlign(0,0); + + g.drawString(txt, (g.getWidth() - w) / 2, (g.getHeight() - 0) / 2); +} + +function scheduleNextDraw() { + const now = new Date(); + const msToNextMin = 60000 - (now.getSeconds() * 1000 + now.getMilliseconds()); + setTimeout(() => { + draw(); + scheduleNextDraw(); + }, msToNextMin); +} + +// Init +draw(); +scheduleNextDraw(); +//Bangle.loadWidgets(); +//Bangle.drawWidgets(); diff --git a/apps/eliteclock/metadata.json b/apps/eliteclock/metadata.json new file mode 100644 index 000000000..91f9c0013 --- /dev/null +++ b/apps/eliteclock/metadata.json @@ -0,0 +1,14 @@ +{ "id": "eliteclock", + "name": "Elite clock", + "version": "0.01", + "description": "Simple binary clock for leet haxorz", + "icon": "app.png", + "readme": "README.md", + "supports" : ["BANGLEJS2"], + "type": "clock", + "tags": "clock", + "storage": [ + {"name":"eliteclock.app.js","url":"eliteclock.app.js"}, + {"name":"eliteclock.img","url":"app-icon.js","evaluate":true} + ] +} diff --git a/apps/iconbits/README.md b/apps/iconbits/README.md index 90bc0f5a3..f63ac788f 100644 --- a/apps/iconbits/README.md +++ b/apps/iconbits/README.md @@ -16,5 +16,4 @@ It is also possible to load existing icon into editor, using "load_icon("");" command. At the end of iconbits.app.js file there are more utility functions. - - +Create 48x48 icon in gimp. \ No newline at end of file diff --git a/apps/iconbits/icon.png b/apps/iconbits/icon.png new file mode 100644 index 000000000..10c6e078c Binary files /dev/null and b/apps/iconbits/icon.png differ