From e007d05e978dc03d7ec72771894c80c7e4f04f65 Mon Sep 17 00:00:00 2001 From: Randy Heydon Date: Tue, 28 Jan 2025 20:37:58 -0500 Subject: [PATCH 01/38] calendar: read events synchronized from Gadgetbridge This is a partial fix for feature request #3707. This allows synchronized events (stored in android.calendar.json) to be shown in the app, alongside the manually entered events and alarm events that are already shown. Note only date/time and event title are currently used; other information available in the synchronized events (e.g. duration, description) are ignored. --- apps/calendar/ChangeLog | 1 + apps/calendar/calendar.js | 6 ++++++ apps/calendar/metadata.json | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/calendar/ChangeLog b/apps/calendar/ChangeLog index 9a4f81491..d737ec6d4 100644 --- a/apps/calendar/ChangeLog +++ b/apps/calendar/ChangeLog @@ -19,3 +19,4 @@ Display Widgets in menus 0.17: Load holidays before events so the latter is not overpainted 0.18: Minor code improvements +0.19: Read events synchronized from Gadgetbridge diff --git a/apps/calendar/calendar.js b/apps/calendar/calendar.js index e140ff576..da5a00a6e 100644 --- a/apps/calendar/calendar.js +++ b/apps/calendar/calendar.js @@ -60,6 +60,12 @@ const loadEvents = () => { date.setSeconds(time.s); return {date: date, msg: a.msg, type: "e"}; })); + // all events synchronized from Gadgetbridge + events = events.concat((require("Storage").readJSON("android.calendar.json",1) || []).map(a => { + // timestamp is in seconds, Date requires milliseconds + const date = new Date(a.timestamp * 1000); + return {date: date, msg: a.title, type: "e"}; + })); }; const loadSettings = () => { diff --git a/apps/calendar/metadata.json b/apps/calendar/metadata.json index 468bceabb..5f5f21b27 100644 --- a/apps/calendar/metadata.json +++ b/apps/calendar/metadata.json @@ -1,7 +1,7 @@ { "id": "calendar", "name": "Calendar", - "version": "0.18", + "version": "0.19", "description": "Monthly calendar, displays holidays uploaded from the web interface and scheduled events.", "icon": "calendar.png", "screenshots": [{"url":"screenshot_calendar.png"}], From 00cd02bcb80a6e474bbe0927a08d67c5b766592b Mon Sep 17 00:00:00 2001 From: Randy Heydon Date: Wed, 29 Jan 2025 19:30:43 -0500 Subject: [PATCH 02/38] Fix lint warnings. Loop variables had warnings for being undefinied. Added the "let" keyword where they are initialized. --- apps/calendar/calendar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/calendar/calendar.js b/apps/calendar/calendar.js index da5a00a6e..ea06b70e8 100644 --- a/apps/calendar/calendar.js +++ b/apps/calendar/calendar.js @@ -227,8 +227,8 @@ const drawCalendar = function(date) { }, []); let i = 0; g.setFont("8x12", fontSize); - for (y = 0; y < rowN - 1; y++) { - for (x = 0; x < colN; x++) { + for (let y = 0; y < rowN - 1; y++) { + for (let x = 0; x < colN; x++) { i++; const day = days[i]; const curMonth = day < 15 ? month+1 : day < 50 ? month-1 : month; From a4eab7383ad079591c2218e09701dca7b09fa9b7 Mon Sep 17 00:00:00 2001 From: Le~Kat Date: Fri, 31 Jan 2025 18:25:02 -0500 Subject: [PATCH 03/38] added a settings page to multidice --- apps/multidice/ChangeLog | 5 ++++ apps/multidice/app.js | 57 ++++++++++++++++++++++++++--------- apps/multidice/metadata.json | 6 ++-- apps/multidice/settings.js | 58 ++++++++++++++++++++++++++++++++++++ 4 files changed, 110 insertions(+), 16 deletions(-) create mode 100644 apps/multidice/settings.js diff --git a/apps/multidice/ChangeLog b/apps/multidice/ChangeLog index cb0cce2aa..ca17e1833 100644 --- a/apps/multidice/ChangeLog +++ b/apps/multidice/ChangeLog @@ -30,3 +30,8 @@ 1.28: increased vibration strength, added some comments, & some QOL 1.29: changed image 1.30: changed image, again +1.40: added various settings for controlling when & how to throw dice +1.41: fixed dumb mistake +1.42: okay maby I should've read the *whole* error log +1.43: playing whackamole with ESLint +1.44: fixed (?) settings app diff --git a/apps/multidice/app.js b/apps/multidice/app.js index 53f67e21e..fe869626a 100644 --- a/apps/multidice/app.js +++ b/apps/multidice/app.js @@ -1,12 +1,20 @@ -var menu = true; // default to have the selection menu open +var settings = Object.assign({ + vibrate: true, + shake: true, + screen: false, + shake_timeout: 200, + shake_duration: 100, +}, require('Storage').readJSON("multidice.json", true) || {}); + +var menu = true; // defaults to having the menu open const DICE_ARRAY = [0, 4, 6, 8, 10, 12, 20, 100]; // 0 means nothing selected const SELECTION_ARRAY = [6, 0, 0, 0, 0, 0, 0, 0]; // default to selecting a single d20 // function to draw the selection menu function drawMenu() { - stringArr = new Array ("", "", "", "", "", "", "", ""); - for (i = 0; i < 8; i++) { + var stringArr = new Array ("", "", "", "", "", "", "", ""); + for (var i = 0; i < 8; i++) { if (SELECTION_ARRAY [i] != 0) { @@ -41,6 +49,7 @@ function touchHandler (button, xy) { return; } + var selection; if (xy.x <= 87) { // left if (xy.y <= 43) { // first @@ -84,15 +93,30 @@ function touchHandler (button, xy) { drawMenu(); } +var shaken = false; +var last_shaken = null; function accelHandler (xyz) { + // if the screen should be on *and* it isn't, return + if (settings.screen && ! Bangle.isBacklightOn()) { + + return; + } + if (xyz.diff >= 0.3) { - menu = false; - mutex (rollDice).catch (() => { + shaken = true; + last_shaken = Date.now(); + } else if (shaken && last_shaken !== null) { + + if (Date.now() - last_shaken > settings.shake_timeout) { - return; // not necessary, but prevents spamming the logs - }); + last_shaken = null; + shaken = false; + menu = false; + + mutex (rollDice).catch (() => { return; }); + } } } @@ -123,8 +147,8 @@ function mutex (functionRef) { // function to roll all selected dice, and display them function rollDice() { - resultsArr = new Uint8Array (8); - for (i = 0; i < 8; i++) { + var resultsArr = new Uint8Array (8); + for (var i = 0; i < 8; i++) { if (SELECTION_ARRAY [i] != 0) { @@ -135,7 +159,7 @@ function rollDice() { g.clear(); g.setFont ("Vector", 40); - for (i = 0; i < 4; i++) { + for (var i = 0; i < 4; i++) { if (SELECTION_ARRAY [i] != 0) { @@ -143,7 +167,7 @@ function rollDice() { } } - for (i = 4; i < 8; i++) { + for (var i = 4; i < 8; i++) { if (SELECTION_ARRAY [i] != 0) { @@ -157,14 +181,19 @@ function rollDice() { // triggers the vibration, then pauses before returning function vibrate() { + if (! settings.vibrate) { + + return (Promise.resolve (0)); + } + return new Promise ((resolve, reject) => { - return Bangle.buzz (50, 1).then ((value) => { + return Bangle.buzz (settings.shake_duration, 1).then ((value) => { setTimeout (() => { resolve (value); - }, 200); + }, 2 * settings.shake_duration + settings.shake_timeout); }); }); } @@ -177,7 +206,7 @@ function random (max) { drawMenu(); Bangle.on ('touch', touchHandler); -Bangle.on ('accel', accelHandler); +if (settings.shake) { Bangle.on ('accel', accelHandler); } setWatch (function() { menu = false; diff --git a/apps/multidice/metadata.json b/apps/multidice/metadata.json index 304c789e4..dd6941060 100644 --- a/apps/multidice/metadata.json +++ b/apps/multidice/metadata.json @@ -1,7 +1,7 @@ { "id": "multidice", "name": "multiple dice roller", "shortName":"multidice", - "version":"1.30", + "version":"1.44", "description": "roll anywhere from 1-8 dice at the same time", "icon": "app.png", "tags": "tool,game", @@ -10,6 +10,8 @@ "allow_emulator": true, "storage": [ {"name":"multidice.app.js","url":"app.js"}, + {"name":"multidice.settings.js","url":"settings.js"}, {"name":"multidice.img","url":"app-icon.js","evaluate":true} - ] + ], + "data": [{"name": "multidice.json"}] } diff --git a/apps/multidice/settings.js b/apps/multidice/settings.js new file mode 100644 index 000000000..446a785e1 --- /dev/null +++ b/apps/multidice/settings.js @@ -0,0 +1,58 @@ +(function(back) { + var settings = Object.assign({ + vibrate: true, + shake: true, + screen: false, + shake_timeout: 200, + shake_duration: 100, + }, require('Storage').readJSON("multidice.json", true) || {}); + + function writeSettings() { + require('Storage').writeJSON("multidice.json", settings); + } + + // Show the menu + E.showMenu({ + "" : { "title" : "multi dice roll" }, + "< Back" : () => back(), + 'vibrate on roll?': { + value: !!settings.vibrate, + onchange: v => { + settings.vibrate = v; + writeSettings(); + } + }, + 'allow shaking?': { + value: !!settings.shake, + onchange: v => { + settings.shake = v; + writeSettings(); + } + }, + 'screen on to shake?': { + value: !!settings.screen, + onchange: v => { + settings.screen = v; + writeSettings(); + } + }, + 'shake timeout': { + value: settings.shake_timeout / 5, + min: 10, max: 40, + format: v => v * 5, + onchange: v => { + settings.shake_timeout = v * 5; + writeSettings(); + } + }, + 'shake duration': { + value: settings.shake_duration / 5, + min: 10, max: 40, + format: v => v * 5, + onchange: v => { + settings.shake_duration = v * 5; + writeSettings(); + } + }, + }); +}) From fe2ccfb1087fb150de812f8060c2aa0ac4ae8eee Mon Sep 17 00:00:00 2001 From: Randy Heydon Date: Fri, 31 Jan 2025 21:28:30 -0500 Subject: [PATCH 04/38] bwclk & bwclklite: Support 12-hour time format. This modifies how the time string is generated so it respects the system's locale settings, specifically for 12-hour time. This is done with the locale package, which also simplifies some of the string handling since the package creates a complete time string. Note this does not add any display of AM/PM, but neither do any other clock faces. --- apps/bwclk/ChangeLog | 3 ++- apps/bwclk/app.js | 8 +++----- apps/bwclk/metadata.json | 2 +- apps/bwclklite/ChangeLog | 3 ++- apps/bwclklite/app.js | 8 +++----- apps/bwclklite/metadata.json | 2 +- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/apps/bwclk/ChangeLog b/apps/bwclk/ChangeLog index 191bb51e5..74b80b73b 100644 --- a/apps/bwclk/ChangeLog +++ b/apps/bwclk/ChangeLog @@ -32,4 +32,5 @@ clkinfo.addInteractive that would cause ReferenceError. 0.30: Use widget_utils 0.31: Use clock_info module as an app 0.32: Make the border of the clock_info box extend all the way to the right of the screen. -0.33: Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749) \ No newline at end of file +0.33: Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749) +0.34: Support 12-hour time format diff --git a/apps/bwclk/app.js b/apps/bwclk/app.js index fdb82df73..5053dafbb 100644 --- a/apps/bwclk/app.js +++ b/apps/bwclk/app.js @@ -239,11 +239,9 @@ let drawTime = function() { var y = y1; var date = new Date(); - var hours = String(date.getHours()); - var minutes = date.getMinutes(); - minutes = minutes < 10 ? String("0") + minutes : minutes; - var colon = settings.hideColon ? "" : ":"; - var timeStr = hours + colon + minutes; + var timeStr = locale.time(date, 1); + if (settings.hideColon) + timeStr = timeStr.replace(":", ""); // Set y coordinates correctly y += parseInt((H - y)/2) + 5; diff --git a/apps/bwclk/metadata.json b/apps/bwclk/metadata.json index d4091c2fe..de84ba947 100644 --- a/apps/bwclk/metadata.json +++ b/apps/bwclk/metadata.json @@ -1,7 +1,7 @@ { "id": "bwclk", "name": "BW Clock", - "version": "0.33", + "version": "0.34", "description": "A very minimalistic clock.", "readme": "README.md", "icon": "app.png", diff --git a/apps/bwclklite/ChangeLog b/apps/bwclklite/ChangeLog index c68c62edc..bba66928b 100644 --- a/apps/bwclklite/ChangeLog +++ b/apps/bwclklite/ChangeLog @@ -35,4 +35,5 @@ clkinfo.addInteractive that would cause ReferenceError. Remove invertion of theme as this doesn'twork very well with fastloading. Do an quick inital fillRect on theclock info area. 0.33: Make the border of the clock_info box extend all the way to the right of the screen. -0.34: Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749) \ No newline at end of file +0.34: Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749) +0.35: Support 12-hour time format diff --git a/apps/bwclklite/app.js b/apps/bwclklite/app.js index 05f61ec58..794b39aa9 100644 --- a/apps/bwclklite/app.js +++ b/apps/bwclklite/app.js @@ -199,11 +199,9 @@ let drawTime = function() { let y = y1; let date = new Date(); - let hours = String(date.getHours()); - let minutes = date.getMinutes(); - minutes = minutes < 10 ? String("0") + minutes : minutes; - let colon = settings.hideColon ? "" : ":"; - let timeStr = hours + colon + minutes; + var timeStr = locale.time(date, 1); + if (settings.hideColon) + timeStr = timeStr.replace(":", ""); // Set y coordinates correctly y += parseInt((H - y)/2) + 5; diff --git a/apps/bwclklite/metadata.json b/apps/bwclklite/metadata.json index f8dffdca9..14af7131c 100644 --- a/apps/bwclklite/metadata.json +++ b/apps/bwclklite/metadata.json @@ -1,7 +1,7 @@ { "id": "bwclklite", "name": "BW Clock Lite", - "version": "0.34", + "version": "0.35", "description": "A very minimalistic clock. This version of BW Clock is quicker at the cost of the custom font.", "readme": "README.md", "icon": "app.png", From 5323f83146625caa6cc43a9cfd4549801a106913 Mon Sep 17 00:00:00 2001 From: David Volovskiy Date: Sun, 2 Feb 2025 09:35:49 -0500 Subject: [PATCH 05/38] Added fixed on not reading defaults in counter2 settings --- apps/counter2/ChangeLog | 1 + apps/counter2/metadata.json | 2 +- apps/counter2/settings.js | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/counter2/ChangeLog b/apps/counter2/ChangeLog index 58eacf613..d952c505b 100644 --- a/apps/counter2/ChangeLog +++ b/apps/counter2/ChangeLog @@ -2,3 +2,4 @@ 0.02: Added Settings & readme 0.03: Fix lint warnings 0.04: Fix lint warnings +0.05: Fix on not reading counter defaults in Settings diff --git a/apps/counter2/metadata.json b/apps/counter2/metadata.json index 400abf267..04b00487f 100644 --- a/apps/counter2/metadata.json +++ b/apps/counter2/metadata.json @@ -1,7 +1,7 @@ { "id": "counter2", "name": "Counter2", - "version": "0.04", + "version": "0.05", "description": "Dual Counter", "readme":"README.md", "icon": "counter2-icon.png", diff --git a/apps/counter2/settings.js b/apps/counter2/settings.js index f97d49ad3..d74d9269f 100644 --- a/apps/counter2/settings.js +++ b/apps/counter2/settings.js @@ -18,7 +18,7 @@ "": { "title": "Counter2" }, "< Back": () => back(), 'Default C1': { - value: settings[0], + value: settings.max0, min: -99, max: 99, onchange: v => { settings.max0 = v; @@ -26,7 +26,7 @@ } }, 'Default C2': { - value: settings[2], + value: settings.max1, min: -99, max: 99, onchange: v => { settings.max1 = v; From 7664036fa7677033bbd23da9f061b78c4cd445ab Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Mon, 13 May 2024 22:42:21 +0200 Subject: [PATCH 06/38] mysetup: set up watch to my preference --- apps/mysetup/ChangeLog | 2 + apps/mysetup/README.md | 29 ++++++++++++ apps/mysetup/app-icon.js | 1 + apps/mysetup/app.png | Bin 0 -> 1620 bytes apps/mysetup/autoreset.json | 1 + apps/mysetup/backswipe.json | 1 + apps/mysetup/dtlaunch.json | 1 + apps/mysetup/fastload.json | 1 + apps/mysetup/lightswitch.json | 1 + apps/mysetup/messages.settings.json | 1 + apps/mysetup/metadata.json | 68 ++++++++++++++++++++++++++++ apps/mysetup/quicklaunch.json | 1 + apps/mysetup/recorder.json | 1 + apps/mysetup/setting.json | 1 + apps/mysetup/widbt_notify.json | 1 + 15 files changed, 110 insertions(+) create mode 100644 apps/mysetup/ChangeLog create mode 100644 apps/mysetup/README.md create mode 100644 apps/mysetup/app-icon.js create mode 100644 apps/mysetup/app.png create mode 100644 apps/mysetup/autoreset.json create mode 100644 apps/mysetup/backswipe.json create mode 100644 apps/mysetup/dtlaunch.json create mode 100644 apps/mysetup/fastload.json create mode 100644 apps/mysetup/lightswitch.json create mode 100644 apps/mysetup/messages.settings.json create mode 100644 apps/mysetup/metadata.json create mode 100644 apps/mysetup/quicklaunch.json create mode 100644 apps/mysetup/recorder.json create mode 100644 apps/mysetup/setting.json create mode 100644 apps/mysetup/widbt_notify.json diff --git a/apps/mysetup/ChangeLog b/apps/mysetup/ChangeLog new file mode 100644 index 000000000..b783a7917 --- /dev/null +++ b/apps/mysetup/ChangeLog @@ -0,0 +1,2 @@ +0.01: New App! +0.02: update to my current preferences. diff --git a/apps/mysetup/README.md b/apps/mysetup/README.md new file mode 100644 index 000000000..278665743 --- /dev/null +++ b/apps/mysetup/README.md @@ -0,0 +1,29 @@ +# App Name + +Describe the app... + +Add screen shots (if possible) to the app folder and link then into this file with ![](.png) + +## Usage + +Before installing this do: + +1. Factory reset the watch. +2. Remove all apps via the "More..." tab in the App Loader. +3. Make sure minification is turned off on the App Loader. + +## Features + +Name the function + +## Controls + +Name the buttons and what they are used for + +## Requests + +Name who should be contacted for support/update requests + +## Creator + +thyttan diff --git a/apps/mysetup/app-icon.js b/apps/mysetup/app-icon.js new file mode 100644 index 000000000..49232b838 --- /dev/null +++ b/apps/mysetup/app-icon.js @@ -0,0 +1 @@ +require("heatshrink").decompress(atob("mEwwJC/AH4A/AH4AgA==")) diff --git a/apps/mysetup/app.png b/apps/mysetup/app.png new file mode 100644 index 0000000000000000000000000000000000000000..582cb2e0853a5a2899a3afbd7eb19cde2ee7f6a0 GIT binary patch literal 1620 zcmV-a2CMmrP)1gXjloC|3_d8m;N2OpV(|i0q4YwBna<2! zK9thw%-*|urnNbV{Gax^?eD+#{x0kLJ~)lj_;W+1>qV*k8akT^^dvctZccUyj4}H~#M%Wwee_v` zHMv7o%BM8@dBrLshn{wGD9BDl?^eV5vSM3T96;NnHvtc6La=(qzq)xrX1d8bK-TN- zrd_f$_O`9nEmS+_S7HTXK<&u;LDIW|qlN&KJvM}tt6TVVqL-AvNv`B*{NzNpBfSQwQP5~Sf(Dp@Vq1+3Q`N9wBQN2`J_?M^u0FIMlt?p^8 z%U3%80kIwg!T{E9<8J18S&$k1`eO)@HP+=TZKo(z3_A3VFYJB=sn`2^Q$mRE>02(+W)np;)L1!GUvU2{O{<&F_nE6Qe#D~Xf|dD z+?d3-D1(IUiL`C2;PPv4CKw8H)v7h8^obJ&Z6D0CjVUe8Xq_NAymxUyPAMU^CCrIu z%1M71EC`5o2if_~7E&h??0jeQ1Y3N6p?}G72FmS*)xQD)%wBE=2tW6@(+MTi!fk9H1pWKew2(jTXVu4%vk26QvSQCbGmk`Z)Y! zBIhh)6vG2)h6mF8wC^|l$M(Eo9D?JiW}=_T2jUA>LC80foTera{^p)Wi`>}Gf;(|ZwEZQ zS^k|*9wyt=f4ZOo!xty7{%}HKD9tBZ50g$=%v&&vMa!#@Nsf>EkEEDA*ST6fiC+An zsNK1#>!x0obq@j$QqYU-ad3ZvbjqUU+%iw(0WahgmHV6yeLWqoYkSl4pzFQ(_Vp&I ztO{WI-48rGLwQb?#vgVvduyd9_6W)rFRoQJq3I(J?{Xmin45#=3l9BmL6Bp<*MZej zrsWN7oRPUr7IvrHoIHOjS=gPTCw>d)^LQK+B|=f2qbGjrWaOd5D<<9Dv>MTW0X3z> zyPy}9`<>1~?NCx@m8G$_@rRTy5zH12YM&P)=tU+L^fgY z^0Z&_6^qdVuwgN3wt_Ze(10?J@%{C2grBk42hsu74qEo^nd&v`X`IHN9lrxzS~GeF S(*#!l0000 Date: Sat, 6 Jul 2024 13:39:22 +0200 Subject: [PATCH 07/38] mysetup: update app list --- apps/mysetup/ChangeLog | 1 + apps/mysetup/metadata.json | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/mysetup/ChangeLog b/apps/mysetup/ChangeLog index b783a7917..e2cf1d249 100644 --- a/apps/mysetup/ChangeLog +++ b/apps/mysetup/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: update to my current preferences. +0.03: update app list diff --git a/apps/mysetup/metadata.json b/apps/mysetup/metadata.json index 3a5af4b54..2d1258192 100644 --- a/apps/mysetup/metadata.json +++ b/apps/mysetup/metadata.json @@ -1,6 +1,6 @@ { "id": "mysetup", "name": "My Setup", - "version":"0.02", + "version":"0.03", "description": "Setup the Bangle.js watch as I want it.", "icon": "app.png", "type": "settings", @@ -34,15 +34,14 @@ "recorder":"app", "bthrm":"app", "fastload":"app", - "fastreset":"app", "agenda":"app", "edgeclk":"app", - "activityreminder":"app", "twenties":"app", "autoreset":"app", "chargent":"app", "setting":"app", - "boot":"app" + "boot":"app", + "setuichange":"app" }, "readme": "README.md", "storage": [ From 64abe11db913e1f3670cc36e946ea0e8eeebb6aa Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Sat, 6 Jul 2024 15:10:05 +0200 Subject: [PATCH 08/38] mysetup: add edgeclk settings --- apps/mysetup/edgeclk.settings.json | 1 + apps/mysetup/metadata.json | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 apps/mysetup/edgeclk.settings.json diff --git a/apps/mysetup/edgeclk.settings.json b/apps/mysetup/edgeclk.settings.json new file mode 100644 index 000000000..6ff3cbe84 --- /dev/null +++ b/apps/mysetup/edgeclk.settings.json @@ -0,0 +1 @@ +{"buzzOnCharge":true,"monthFirst":true,"twentyFourH":true,"showAmPm":false,"showSeconds":false,"showWeather":false,"stepGoal":10000,"stepBar":true,"weekBar":true,"mondayFirst":true,"dayBar":true} diff --git a/apps/mysetup/metadata.json b/apps/mysetup/metadata.json index 2d1258192..fbe3ff802 100644 --- a/apps/mysetup/metadata.json +++ b/apps/mysetup/metadata.json @@ -61,6 +61,8 @@ "url":"widbt_notify.json"}, {"name":"recorder.json", "url":"recorder.json"}, + {"name":"edgeclk.settings.json", + "url":"edgeclk.settings.json"}, {"name":"setting.json", "url":"setting.json"} ] From ad1efa2cbf1274117b8dd7e6888aac85718a75e3 Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Wed, 10 Jul 2024 23:44:01 +0200 Subject: [PATCH 09/38] mysetup: add delaylock app --- apps/mysetup/backswipe.json | 2 +- apps/mysetup/metadata.json | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/mysetup/backswipe.json b/apps/mysetup/backswipe.json index b43cb1cf4..aa66bd534 100644 --- a/apps/mysetup/backswipe.json +++ b/apps/mysetup/backswipe.json @@ -1 +1 @@ -{"mode":0,"apps":[{"name":"Calculator","src":"calculator.app.js"},{"name":"SleepLog","src":"sleeplog.app.js"},{"name":"Messages","sortorder":-9,"src":"messagegui.app.js"},{"name":"Messages","sortorder":-9,"src":"messagegui.app.js","files":"messagegui.info,messagegui,messagegui.app.js,messagegui.new.js,messagegui.boot.js,messagegui.img"}],"standardNumSwipeHandlers":4,"standardNumDragHandlers":1} \ No newline at end of file +{"mode":0,"apps":[{"name":"Calculator","src":"calculator.app.js"},{"name":"SleepLog","src":"sleeplog.app.js"},{"name":"Messages","sortorder":-9,"src":"messagegui.app.js"},{"name":"Messages","sortorder":-9,"src":"messagegui.app.js","files":"messagegui.info,messagegui,messagegui.app.js,messagegui.new.js,messagegui.boot.js,messagegui.img"}],"standardNumSwipeHandlers":5,"standardNumDragHandlers":1} diff --git a/apps/mysetup/metadata.json b/apps/mysetup/metadata.json index fbe3ff802..206aba80e 100644 --- a/apps/mysetup/metadata.json +++ b/apps/mysetup/metadata.json @@ -6,6 +6,7 @@ "type": "settings", "tags": "system,clkinfo", "supports" : ["BANGLEJS2"], + "readme": "README.md", "dependencies" : { "sched":"app", "kbmulti":"app", @@ -33,17 +34,17 @@ "alarm":"app", "recorder":"app", "bthrm":"app", - "fastload":"app", "agenda":"app", "edgeclk":"app", "twenties":"app", "autoreset":"app", "chargent":"app", "setting":"app", + "fastload":"app", "boot":"app", + "delaylock":"app", "setuichange":"app" }, - "readme": "README.md", "storage": [ {"name":"backswipe.json", "url":"backswipe.json"}, From 112e90c7d7d7d148f516938c255c88bf2ea2230a Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Wed, 10 Jul 2024 23:45:50 +0200 Subject: [PATCH 10/38] =?UTF-8?q?mysetup:=20add=20app=20=C2=B4forge=C2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/mysetup/metadata.json | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/mysetup/metadata.json b/apps/mysetup/metadata.json index 206aba80e..82c01159d 100644 --- a/apps/mysetup/metadata.json +++ b/apps/mysetup/metadata.json @@ -30,6 +30,7 @@ "runplus":"app", "dtlaunch":"app", "quicklaunch":"app", + "forge":"app", "kineticscroll":"app", "alarm":"app", "recorder":"app", From c3fc33b278550f8941658f7373a2078075861161 Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Sun, 10 Nov 2024 09:58:27 +0100 Subject: [PATCH 11/38] mysetup: remove traces of mysetup installation --- apps/mysetup/boot.js | 5 +++++ apps/mysetup/metadata.json | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 apps/mysetup/boot.js diff --git a/apps/mysetup/boot.js b/apps/mysetup/boot.js new file mode 100644 index 000000000..85f2c4ff0 --- /dev/null +++ b/apps/mysetup/boot.js @@ -0,0 +1,5 @@ +{ +require("Storage").erase("mysetup.info"); +require("Storage").erase("mysetup.boot.js"); +load(); +} diff --git a/apps/mysetup/metadata.json b/apps/mysetup/metadata.json index 82c01159d..a1ed941b9 100644 --- a/apps/mysetup/metadata.json +++ b/apps/mysetup/metadata.json @@ -66,6 +66,8 @@ {"name":"edgeclk.settings.json", "url":"edgeclk.settings.json"}, {"name":"setting.json", - "url":"setting.json"} + "url":"setting.json"}, + {"name":"mysetup.boot.js", + "url":"boot.js"} ] } From 08b730915a2b1547841d87457a4c7b268401390c Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Sun, 10 Nov 2024 10:09:07 +0100 Subject: [PATCH 12/38] mysetup: rm setuichange, use kbedgewrite --- apps/mysetup/metadata.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/mysetup/metadata.json b/apps/mysetup/metadata.json index a1ed941b9..4ed008b19 100644 --- a/apps/mysetup/metadata.json +++ b/apps/mysetup/metadata.json @@ -9,7 +9,7 @@ "readme": "README.md", "dependencies" : { "sched":"app", - "kbmulti":"app", + "kbedgewrite":"app", "messageicons":"app", "widmsggrid":"app", "msgwakefup":"app", @@ -43,8 +43,7 @@ "setting":"app", "fastload":"app", "boot":"app", - "delaylock":"app", - "setuichange":"app" + "delaylock":"app" }, "storage": [ {"name":"backswipe.json", From 8091e3c3b42517545806ededfd082dc95a339810 Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Wed, 22 Jan 2025 21:12:48 +0100 Subject: [PATCH 13/38] mysetup: add apps, tweak edgeclk settings json --- apps/mysetup/edgeclk.settings.json | 2 +- apps/mysetup/metadata.json | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/mysetup/edgeclk.settings.json b/apps/mysetup/edgeclk.settings.json index 6ff3cbe84..bdf875621 100644 --- a/apps/mysetup/edgeclk.settings.json +++ b/apps/mysetup/edgeclk.settings.json @@ -1 +1 @@ -{"buzzOnCharge":true,"monthFirst":true,"twentyFourH":true,"showAmPm":false,"showSeconds":false,"showWeather":false,"stepGoal":10000,"stepBar":true,"weekBar":true,"mondayFirst":true,"dayBar":true} +{"buzzOnCharge":true,"monthFirst":true,"twentyFourH":true,"showAmPm":false,"showSeconds":true,"showWeather":false,"stepGoal":10000,"stepBar":true,"weekBar":true,"mondayFirst":true,"dayBar":true,"redrawOnStep":false} diff --git a/apps/mysetup/metadata.json b/apps/mysetup/metadata.json index 4ed008b19..3fdf93476 100644 --- a/apps/mysetup/metadata.json +++ b/apps/mysetup/metadata.json @@ -43,6 +43,8 @@ "setting":"app", "fastload":"app", "boot":"app", + "gbdiscon":"app", + "ateatimer":"app", "delaylock":"app" }, "storage": [ From 0f79a767ed10f75b6aa585866d800dd483ce8f92 Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Wed, 29 Jan 2025 21:09:46 +0100 Subject: [PATCH 14/38] mysetup: add msgtwscr app --- apps/mysetup/metadata.json | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/mysetup/metadata.json b/apps/mysetup/metadata.json index 3fdf93476..acf75cdd4 100644 --- a/apps/mysetup/metadata.json +++ b/apps/mysetup/metadata.json @@ -13,6 +13,7 @@ "messageicons":"app", "widmsggrid":"app", "msgwakefup":"app", + "msgtwscr":"app", "notify":"app", "health":"app", "widminbate":"app", From f0b1fb2c2311b5c98816e3e1da663b3b62f008f1 Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Wed, 29 Jan 2025 21:19:26 +0100 Subject: [PATCH 15/38] mysetup: add icon --- apps/mysetup/app-icon.js | 1 - apps/mysetup/app.png | Bin 1620 -> 1789 bytes 2 files changed, 1 deletion(-) delete mode 100644 apps/mysetup/app-icon.js diff --git a/apps/mysetup/app-icon.js b/apps/mysetup/app-icon.js deleted file mode 100644 index 49232b838..000000000 --- a/apps/mysetup/app-icon.js +++ /dev/null @@ -1 +0,0 @@ -require("heatshrink").decompress(atob("mEwwJC/AH4A/AH4AgA==")) diff --git a/apps/mysetup/app.png b/apps/mysetup/app.png index 582cb2e0853a5a2899a3afbd7eb19cde2ee7f6a0..24ff01b8a4a6588bbfde982ce24cdb50735e51f5 100644 GIT binary patch delta 1773 zcmV8Q}8HClU z^Y4B?*T3^S=h~7qfg#e`-6GAWP2@HIA8XQU8dmRL{i6cz#H0)EZY9&ny4G~-v1B^A zukDkz?~awHC<9cZj8_OgNG1y0_RmSWzkh zbrs#C0gOO!{O56ji0?jhNwGB$QWjOW%*c%eFzyg`f`7^~WIB0FmF4M@BwdVTxt4kG zm+@DYjA`C+J0TYeVyrzxslLUoFxJ``W0za&5m`ozlP~72iyGzCzHZ9Yfr=X6*DcSt zoYTA`2!h#Hv(~g5HFrKN?8-AE(vK9Sakv%$Kw%soYu@(XQR!6k3mvfp({GwzIUt-U z^y7Gs>VE<^m~|9I`M!DQOJP2FO3`(7d8XsHCj`LUs3^yMiJgg(m`|pYqH%MBVIDaq z1mIK))oE_rTMCF99&0uzQ@gP&>)#Hb((H`o_vB;G?6nOr?I*4Mgz(+a1*^}3cr{V9 zdDZ1|ONER)jA=Xf26|&p@3952aC@hibMIE6d4DT=F=oq#YpMX;QWXnjodRfXk|O}v zdlJQ`jyl5 zz{^8fb0M3xn1>v``K_BBw@~vVO@e#q%eDYi2$u(A@jfT!8(;W?`3>ZJQ>I+@?{C0M zJAWECH#i2UT~%|OVsw9Dt%LDo2w@Xtde4GwyKI|Z@OVm;*VgBV=G!t{69C}XbdqiQ z)k3j+*K*PLV1rQ=ySitzg>5d_X$ykc=50-4=^IPMwdHImF!bMRP|lxOIx!2VzTe)_veyp{gLtPHlGPlNn{W2bCdD!Db5uXxjdf z@XeYxgaI^E00eXU2Cv)vTG0SzAf(J^8qN_~;GA~?;He4^g)kl3UsEG8k-1`}*MD~s zL)B<_?sr844DUU3D!oD~MW|5C*FEr*7*^z`j|&w*;PnoHg&`ExM@kz~5hR00X~vi|Ey`w?cz2nd8yVz?0W_LEq=k zy2bwlfT{crk9cW4GujrB+*7yGq1^V<-xp^9EbGX4;vHQH+vd#;gDc>;6Mypu=gbvB zqz;V+P>4RZ03_c&IC;hHBetf}BtL{N29Vl&m%k!s*ZjtcfPn!pDj6JnubmeSU_0Eh zx^@wF_Z^vAXZz0Y4bK*)`QL2N92pm-00 zgg6}B`}6Tx#GzWuS%JhwOCgXkBCmUzhD5fg+4C=V3R|DkABHTl^1+)8h=2iwo#;ck4W=a z!2o^;e>)wMo-iiec0~ags?jRS zcuqW(NtNRNw+WAyU5BS8QknM?sZ2i6(Y5k?`*9S@UjOIi@s7-DJ0JQNYblu(N>Kj^ P00000NkvXXu0mjf)Z}v3 delta 1603 zcmV-J2E6(G4b%*fB!32COGiWi{{a60|De66lK=n)2}wjjRA_4iBBgQZ;76qOQH!eYQP$e z!AKAcJ}AB5-5IcA@d8w#^g@T3&dgpul+x+U-n)CIwK<9WpMUnc?eD+#{x0kLJ~)lj z_;W+1>qV*0;V;<>t_7g#4P@iwmk z1qmdsUbfUStd9Y|TVP;i68~i*#Z&Y~>jipZkI1cLC-XG&6_#ObWSo3TMb<VnloLT~EMt9))wb_t9z`$fds1weiDS%fvYLsiPBH2ZnQDk6uTc5^7mPDSrl!}_vf zTUQ)F+oLxD4{1WMdd9!Hc|m5n$vQyR>+YsqvNZO#t<^15JLgwo1!6$$$ooOkyMm*J z0F*s8gnyK)TljRMmz2LruK4O$zQL{wjY9)Z0kt|Lq(2FsQU|U{&Lnw&nv-iz0UQ(1 z_C;r*+zXKT!Vl?Dy;NHGm#6;#j+0`o?rE&cS33Uzu^t4%0M>8gZsvJekQx2@V+fHo z*5xa0rzlknI`ob)Spqpmmr>I{XwtT=f>`%xcYlkXpJLUDL8`0V*CWqymfo()hTHYJB=sn`2^Q$mRE>02( z+W)np;)L1!GUvU2{O{<&F_nE6Qe#D~Xf|dD+?d3-D1(IUiL`C2;PPv4CKw8H)v7h8 z^nZyH25leAvW+P%&S;$=IlOmqK~5megP0ekG0q%cjYX8Luf59F*IsobYlouaRHM0~ z(;q09t|si8%+WECi^loRmFYCwYI6mr1b@o&75=}a@Lib3Y|Ie4CxKK>Okic}5Rq_U zeN+~H!uVe{{lz}^`kQW`|!xuR17T{A$XG+1=zihuSA zi1p!&kSPh)j$Fxp5Gw{9(I0?wrrO+K-v|fy4|DX;36jHEtgI3$_c6CFMEwO7gd?t7 z-aKL)pd~&(x0thy7QxaE*@Ws7r4mmjvcx<3IQ(NG=PY9s!vkrC2h#ks?>HAOpF`dJ zh_{!DY|1~1bS#dwebHHv-OtHAL4Pqg_G^mIKKhN3WERtBFmGXm+WH8Q3O|NVINqP; zhpz`Xd?0}cEM8H=+`36mP?GrceEI9%2{WYQhDKVxISl-_Sn>l$M(Eo9D?J ziW}=_T2jUA>LC80foTera{^p)Wi`>}Gf;(|ZwEZQS^k|*9wyt=f4ZOo!+#eiul{gC zVkpfgTMv^?S+&Oz-^QfHN=vA6Mu zqQHxcUJp$bNst%thoZ%hhv~ZHvseduC&kuI$^k?+Ves;_U-A`;(L4gMVKHj9f;MB& zfHIHq{q=E#pRw2n(gD^ETK4Xl>NV?WoW`FWzXM%bGkOQp1Xln6002ovPDHLkV1m{L B8@m7i From 9ff0718aba339a5004442f16b59c66da3d5acba0 Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Wed, 29 Jan 2025 21:53:35 +0100 Subject: [PATCH 16/38] mysetup: becomes "anotherconf" --- apps/{mysetup => anotherconf}/ChangeLog | 1 + apps/anotherconf/README.md | 26 ++++++++++++++++ apps/{mysetup => anotherconf}/app.png | Bin apps/{mysetup => anotherconf}/autoreset.json | 0 apps/{mysetup => anotherconf}/backswipe.json | 0 apps/anotherconf/boot.js | 5 +++ apps/{mysetup => anotherconf}/dtlaunch.json | 0 .../edgeclk.settings.json | 0 apps/{mysetup => anotherconf}/fastload.json | 0 .../{mysetup => anotherconf}/lightswitch.json | 0 .../messages.settings.json | 0 apps/{mysetup => anotherconf}/metadata.json | 25 +++++++-------- .../{mysetup => anotherconf}/quicklaunch.json | 0 apps/{mysetup => anotherconf}/recorder.json | 0 apps/{mysetup => anotherconf}/setting.json | 0 .../widbt_notify.json | 0 apps/mysetup/README.md | 29 ------------------ apps/mysetup/boot.js | 5 --- 18 files changed, 45 insertions(+), 46 deletions(-) rename apps/{mysetup => anotherconf}/ChangeLog (61%) create mode 100644 apps/anotherconf/README.md rename apps/{mysetup => anotherconf}/app.png (100%) rename apps/{mysetup => anotherconf}/autoreset.json (100%) rename apps/{mysetup => anotherconf}/backswipe.json (100%) create mode 100644 apps/anotherconf/boot.js rename apps/{mysetup => anotherconf}/dtlaunch.json (100%) rename apps/{mysetup => anotherconf}/edgeclk.settings.json (100%) rename apps/{mysetup => anotherconf}/fastload.json (100%) rename apps/{mysetup => anotherconf}/lightswitch.json (100%) rename apps/{mysetup => anotherconf}/messages.settings.json (100%) rename apps/{mysetup => anotherconf}/metadata.json (78%) rename apps/{mysetup => anotherconf}/quicklaunch.json (100%) rename apps/{mysetup => anotherconf}/recorder.json (100%) rename apps/{mysetup => anotherconf}/setting.json (100%) rename apps/{mysetup => anotherconf}/widbt_notify.json (100%) delete mode 100644 apps/mysetup/README.md delete mode 100644 apps/mysetup/boot.js diff --git a/apps/mysetup/ChangeLog b/apps/anotherconf/ChangeLog similarity index 61% rename from apps/mysetup/ChangeLog rename to apps/anotherconf/ChangeLog index e2cf1d249..6237f5b04 100644 --- a/apps/mysetup/ChangeLog +++ b/apps/anotherconf/ChangeLog @@ -1,3 +1,4 @@ 0.01: New App! 0.02: update to my current preferences. 0.03: update app list +0.04: change app name "mysetup" -> "anotherconf" diff --git a/apps/anotherconf/README.md b/apps/anotherconf/README.md new file mode 100644 index 000000000..4fac2feb4 --- /dev/null +++ b/apps/anotherconf/README.md @@ -0,0 +1,26 @@ +# Another Default Config + +A different default set of apps and configurations. Brings many quality of life improvements. Opinionated based on the creators taste. Read more below before installing. + +## Usage + +Before installing do this: + +1. Backup your current setup (via the "More..." tab of the App Loader) so you can restore it later if you want. +2. Factory reset the watch. +3. Remove all apps via the "More..." tab in the App Loader. +4. Make sure minification is turned off on the App Loader. +5. Then install. +6. Try it out, switch out apps to your favorites and tweak to your liking! + +## Features + +There will not be a trace of a "Another Default Config" app on your watch after installation. Only the apps it installed and the configurations. + +## Requests + +Add to the espruino/BangleApps issue tracker and mention @thyttan for bug reports and suggestions. Or do a pull request! + +## Creator + +thyttan diff --git a/apps/mysetup/app.png b/apps/anotherconf/app.png similarity index 100% rename from apps/mysetup/app.png rename to apps/anotherconf/app.png diff --git a/apps/mysetup/autoreset.json b/apps/anotherconf/autoreset.json similarity index 100% rename from apps/mysetup/autoreset.json rename to apps/anotherconf/autoreset.json diff --git a/apps/mysetup/backswipe.json b/apps/anotherconf/backswipe.json similarity index 100% rename from apps/mysetup/backswipe.json rename to apps/anotherconf/backswipe.json diff --git a/apps/anotherconf/boot.js b/apps/anotherconf/boot.js new file mode 100644 index 000000000..a04465039 --- /dev/null +++ b/apps/anotherconf/boot.js @@ -0,0 +1,5 @@ +{ +require("Storage").erase("anotherconf.info"); +require("Storage").erase("anotherconf.boot.js"); +load(); +} diff --git a/apps/mysetup/dtlaunch.json b/apps/anotherconf/dtlaunch.json similarity index 100% rename from apps/mysetup/dtlaunch.json rename to apps/anotherconf/dtlaunch.json diff --git a/apps/mysetup/edgeclk.settings.json b/apps/anotherconf/edgeclk.settings.json similarity index 100% rename from apps/mysetup/edgeclk.settings.json rename to apps/anotherconf/edgeclk.settings.json diff --git a/apps/mysetup/fastload.json b/apps/anotherconf/fastload.json similarity index 100% rename from apps/mysetup/fastload.json rename to apps/anotherconf/fastload.json diff --git a/apps/mysetup/lightswitch.json b/apps/anotherconf/lightswitch.json similarity index 100% rename from apps/mysetup/lightswitch.json rename to apps/anotherconf/lightswitch.json diff --git a/apps/mysetup/messages.settings.json b/apps/anotherconf/messages.settings.json similarity index 100% rename from apps/mysetup/messages.settings.json rename to apps/anotherconf/messages.settings.json diff --git a/apps/mysetup/metadata.json b/apps/anotherconf/metadata.json similarity index 78% rename from apps/mysetup/metadata.json rename to apps/anotherconf/metadata.json index acf75cdd4..cbbf97278 100644 --- a/apps/mysetup/metadata.json +++ b/apps/anotherconf/metadata.json @@ -1,19 +1,20 @@ -{ "id": "mysetup", - "name": "My Setup", - "version":"0.03", - "description": "Setup the Bangle.js watch as I want it.", +{ "id": "anotherconf", + "name": "Another Default Config", + "version":"0.04", + "description": "A different default loadout of apps and configurations. Brings many quality of life improvements. Opinionated based on the creators taste. Read more below before installing.", "icon": "app.png", "type": "settings", - "tags": "system,clkinfo", + "tags": "system, configuration, config", "supports" : ["BANGLEJS2"], "readme": "README.md", "dependencies" : { "sched":"app", - "kbedgewrite":"app", + "kbmulti":"app", "messageicons":"app", "widmsggrid":"app", "msgwakefup":"app", "msgtwscr":"app", + "delaylock":"app", "notify":"app", "health":"app", "widminbate":"app", @@ -31,22 +32,22 @@ "runplus":"app", "dtlaunch":"app", "quicklaunch":"app", - "forge":"app", "kineticscroll":"app", "alarm":"app", "recorder":"app", - "bthrm":"app", "agenda":"app", "edgeclk":"app", - "twenties":"app", "autoreset":"app", "chargent":"app", "setting":"app", "fastload":"app", "boot":"app", - "gbdiscon":"app", "ateatimer":"app", - "delaylock":"app" + "drained":"app", + "forge":"app", + "bthrm":"app", + "twenties":"app", + "gbdiscon":"app" }, "storage": [ {"name":"backswipe.json", @@ -69,7 +70,7 @@ "url":"edgeclk.settings.json"}, {"name":"setting.json", "url":"setting.json"}, - {"name":"mysetup.boot.js", + {"name":"anotherconf.boot.js", "url":"boot.js"} ] } diff --git a/apps/mysetup/quicklaunch.json b/apps/anotherconf/quicklaunch.json similarity index 100% rename from apps/mysetup/quicklaunch.json rename to apps/anotherconf/quicklaunch.json diff --git a/apps/mysetup/recorder.json b/apps/anotherconf/recorder.json similarity index 100% rename from apps/mysetup/recorder.json rename to apps/anotherconf/recorder.json diff --git a/apps/mysetup/setting.json b/apps/anotherconf/setting.json similarity index 100% rename from apps/mysetup/setting.json rename to apps/anotherconf/setting.json diff --git a/apps/mysetup/widbt_notify.json b/apps/anotherconf/widbt_notify.json similarity index 100% rename from apps/mysetup/widbt_notify.json rename to apps/anotherconf/widbt_notify.json diff --git a/apps/mysetup/README.md b/apps/mysetup/README.md deleted file mode 100644 index 278665743..000000000 --- a/apps/mysetup/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# App Name - -Describe the app... - -Add screen shots (if possible) to the app folder and link then into this file with ![](.png) - -## Usage - -Before installing this do: - -1. Factory reset the watch. -2. Remove all apps via the "More..." tab in the App Loader. -3. Make sure minification is turned off on the App Loader. - -## Features - -Name the function - -## Controls - -Name the buttons and what they are used for - -## Requests - -Name who should be contacted for support/update requests - -## Creator - -thyttan diff --git a/apps/mysetup/boot.js b/apps/mysetup/boot.js deleted file mode 100644 index 85f2c4ff0..000000000 --- a/apps/mysetup/boot.js +++ /dev/null @@ -1,5 +0,0 @@ -{ -require("Storage").erase("mysetup.info"); -require("Storage").erase("mysetup.boot.js"); -load(); -} From feda047a417b4fbfd4e5119d45e7b5fa5e36570f Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Wed, 29 Jan 2025 22:07:26 +0100 Subject: [PATCH 17/38] anotherconf: remove some apps not as important as the others --- apps/anotherconf/ChangeLog | 1 + apps/anotherconf/metadata.json | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/anotherconf/ChangeLog b/apps/anotherconf/ChangeLog index 6237f5b04..6c717cad7 100644 --- a/apps/anotherconf/ChangeLog +++ b/apps/anotherconf/ChangeLog @@ -2,3 +2,4 @@ 0.02: update to my current preferences. 0.03: update app list 0.04: change app name "mysetup" -> "anotherconf" +0.05: remove apps that are not "core" to the experience. diff --git a/apps/anotherconf/metadata.json b/apps/anotherconf/metadata.json index cbbf97278..2a65584db 100644 --- a/apps/anotherconf/metadata.json +++ b/apps/anotherconf/metadata.json @@ -1,6 +1,6 @@ { "id": "anotherconf", "name": "Another Default Config", - "version":"0.04", + "version":"0.05", "description": "A different default loadout of apps and configurations. Brings many quality of life improvements. Opinionated based on the creators taste. Read more below before installing.", "icon": "app.png", "type": "settings", @@ -43,11 +43,7 @@ "fastload":"app", "boot":"app", "ateatimer":"app", - "drained":"app", - "forge":"app", - "bthrm":"app", - "twenties":"app", - "gbdiscon":"app" + "drained":"app" }, "storage": [ {"name":"backswipe.json", From 6af32d4c71ba920f129e49670fdc1563746aaed2 Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Wed, 29 Jan 2025 22:24:39 +0100 Subject: [PATCH 18/38] anotherconf: add to readme --- apps/anotherconf/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/anotherconf/README.md b/apps/anotherconf/README.md index 4fac2feb4..c292bb0a6 100644 --- a/apps/anotherconf/README.md +++ b/apps/anotherconf/README.md @@ -17,6 +17,14 @@ Before installing do this: There will not be a trace of a "Another Default Config" app on your watch after installation. Only the apps it installed and the configurations. +On the clock face: +- Swipe right on the screen to open the launcher (Desktop Launcher) - or press the hardware button. +- Swipe left to open a flashlight app. +- Swipe up to open the messages. +- Swipe down for quick access to music and podcast controls. + - (Do a subsequent left or right swipe to enter the listed apps) +- (Check out the "Quick Launch" app readme for more info) + ## Requests Add to the espruino/BangleApps issue tracker and mention @thyttan for bug reports and suggestions. Or do a pull request! From 991492c04706b7b46a9492808a30aecd9be7601f Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Wed, 29 Jan 2025 22:32:00 +0100 Subject: [PATCH 19/38] anotherconf: left swipe on clock fires up the torch --- apps/anotherconf/quicklaunch.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/anotherconf/quicklaunch.json b/apps/anotherconf/quicklaunch.json index 56df7d3d2..4edbb083b 100644 --- a/apps/anotherconf/quicklaunch.json +++ b/apps/anotherconf/quicklaunch.json @@ -1 +1 @@ -{lapp:{name:"Show Launcher",sortorder:-12,src:"no source"},rapp:{name:"Extension",type:"app",sortorder:-11,src:"quicklaunch.app.js"},uapp:{name:"Messages",sortorder:-9,src:"messagegui.app.js"},dapp:{name:"Extension",type:"app",sortorder:-11,src:"quicklaunch.app.js"},tapp:{name:""},dlapp:{name:"PA Remote",src:"podadrem.app.js"},drapp:{name:"Remote for Spotify",src:"spotrem.app.js"},duapp:{name:""},ddapp:{name:"Extension",type:"app",sortorder:-11,src:"quicklaunch.app.js"},dtapp:{name:""},ddlapp:{name:"Alarms",src:"alarm.app.js"},ddrapp:{name:"Run+",src:"runplus.app.js"},dduapp:{name:""},dddapp:{name:"Agenda",src:"agenda.app.js"},ddtapp:{name:""},rlapp:{name:""},rrapp:{name:""},ruapp:{name:""},rdapp:{name:""},rtapp:{name:""},trace:"dr"} \ No newline at end of file +{lapp:{name:"Show Launcher",sortorder:-12,src:"no source"},rapp:{name:"torch",type:"app",sortorder:-11,src:"torch.app.js"},uapp:{name:"Messages",sortorder:-9,src:"messagegui.app.js"},dapp:{name:"Extension",type:"app",sortorder:-11,src:"quicklaunch.app.js"},tapp:{name:""},dlapp:{name:"PA Remote",src:"podadrem.app.js"},drapp:{name:"Remote for Spotify",src:"spotrem.app.js"},duapp:{name:""},ddapp:{name:"Extension",type:"app",sortorder:-11,src:"quicklaunch.app.js"},dtapp:{name:""},ddlapp:{name:"Alarms",src:"alarm.app.js"},ddrapp:{name:"Run+",src:"runplus.app.js"},dduapp:{name:""},dddapp:{name:"Agenda",src:"agenda.app.js"},ddtapp:{name:""},rlapp:{name:""},rrapp:{name:""},ruapp:{name:""},rdapp:{name:""},rtapp:{name:""},trace:"dr"} From 4154e24bb3ed0beb366933ed318e5a240c320bfb Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Mon, 3 Feb 2025 09:59:02 +0100 Subject: [PATCH 20/38] anotherconf: becomes "confthyttan" + some suggested changes --- apps/anotherconf/boot.js | 5 ----- apps/{anotherconf => confthyttan}/ChangeLog | 1 + apps/{anotherconf => confthyttan}/README.md | 6 +++--- apps/{anotherconf => confthyttan}/app.png | Bin .../autoreset.json | 0 .../backswipe.json | 0 .../{anotherconf => confthyttan}/dtlaunch.json | 0 .../edgeclk.settings.json | 0 .../{anotherconf => confthyttan}/fastload.json | 0 .../lightswitch.json | 0 .../messages.settings.json | 0 .../{anotherconf => confthyttan}/metadata.json | 17 +++++++---------- .../quicklaunch.json | 0 .../{anotherconf => confthyttan}/recorder.json | 0 apps/{anotherconf => confthyttan}/setting.json | 0 .../widbt_notify.json | 0 16 files changed, 11 insertions(+), 18 deletions(-) delete mode 100644 apps/anotherconf/boot.js rename apps/{anotherconf => confthyttan}/ChangeLog (78%) rename apps/{anotherconf => confthyttan}/README.md (82%) rename apps/{anotherconf => confthyttan}/app.png (100%) rename apps/{anotherconf => confthyttan}/autoreset.json (100%) rename apps/{anotherconf => confthyttan}/backswipe.json (100%) rename apps/{anotherconf => confthyttan}/dtlaunch.json (100%) rename apps/{anotherconf => confthyttan}/edgeclk.settings.json (100%) rename apps/{anotherconf => confthyttan}/fastload.json (100%) rename apps/{anotherconf => confthyttan}/lightswitch.json (100%) rename apps/{anotherconf => confthyttan}/messages.settings.json (100%) rename apps/{anotherconf => confthyttan}/metadata.json (77%) rename apps/{anotherconf => confthyttan}/quicklaunch.json (100%) rename apps/{anotherconf => confthyttan}/recorder.json (100%) rename apps/{anotherconf => confthyttan}/setting.json (100%) rename apps/{anotherconf => confthyttan}/widbt_notify.json (100%) diff --git a/apps/anotherconf/boot.js b/apps/anotherconf/boot.js deleted file mode 100644 index a04465039..000000000 --- a/apps/anotherconf/boot.js +++ /dev/null @@ -1,5 +0,0 @@ -{ -require("Storage").erase("anotherconf.info"); -require("Storage").erase("anotherconf.boot.js"); -load(); -} diff --git a/apps/anotherconf/ChangeLog b/apps/confthyttan/ChangeLog similarity index 78% rename from apps/anotherconf/ChangeLog rename to apps/confthyttan/ChangeLog index 6c717cad7..77d527619 100644 --- a/apps/anotherconf/ChangeLog +++ b/apps/confthyttan/ChangeLog @@ -3,3 +3,4 @@ 0.03: update app list 0.04: change app name "mysetup" -> "anotherconf" 0.05: remove apps that are not "core" to the experience. +0.06: change name "anotherconf" -> "confthyttan" diff --git a/apps/anotherconf/README.md b/apps/confthyttan/README.md similarity index 82% rename from apps/anotherconf/README.md rename to apps/confthyttan/README.md index c292bb0a6..5f7819171 100644 --- a/apps/anotherconf/README.md +++ b/apps/confthyttan/README.md @@ -1,4 +1,4 @@ -# Another Default Config +# Thyttan's Default Config A different default set of apps and configurations. Brings many quality of life improvements. Opinionated based on the creators taste. Read more below before installing. @@ -15,7 +15,7 @@ Before installing do this: ## Features -There will not be a trace of a "Another Default Config" app on your watch after installation. Only the apps it installed and the configurations. +There will not be a trace of a "Thyttan's Default Config" app on your watch after installation. Only the apps it installed and the configurations. On the clock face: - Swipe right on the screen to open the launcher (Desktop Launcher) - or press the hardware button. @@ -27,7 +27,7 @@ On the clock face: ## Requests -Add to the espruino/BangleApps issue tracker and mention @thyttan for bug reports and suggestions. Or do a pull request! +Add to the espruino/BangleApps issue tracker and mention @thyttan for bug reports and suggestions. ## Creator diff --git a/apps/anotherconf/app.png b/apps/confthyttan/app.png similarity index 100% rename from apps/anotherconf/app.png rename to apps/confthyttan/app.png diff --git a/apps/anotherconf/autoreset.json b/apps/confthyttan/autoreset.json similarity index 100% rename from apps/anotherconf/autoreset.json rename to apps/confthyttan/autoreset.json diff --git a/apps/anotherconf/backswipe.json b/apps/confthyttan/backswipe.json similarity index 100% rename from apps/anotherconf/backswipe.json rename to apps/confthyttan/backswipe.json diff --git a/apps/anotherconf/dtlaunch.json b/apps/confthyttan/dtlaunch.json similarity index 100% rename from apps/anotherconf/dtlaunch.json rename to apps/confthyttan/dtlaunch.json diff --git a/apps/anotherconf/edgeclk.settings.json b/apps/confthyttan/edgeclk.settings.json similarity index 100% rename from apps/anotherconf/edgeclk.settings.json rename to apps/confthyttan/edgeclk.settings.json diff --git a/apps/anotherconf/fastload.json b/apps/confthyttan/fastload.json similarity index 100% rename from apps/anotherconf/fastload.json rename to apps/confthyttan/fastload.json diff --git a/apps/anotherconf/lightswitch.json b/apps/confthyttan/lightswitch.json similarity index 100% rename from apps/anotherconf/lightswitch.json rename to apps/confthyttan/lightswitch.json diff --git a/apps/anotherconf/messages.settings.json b/apps/confthyttan/messages.settings.json similarity index 100% rename from apps/anotherconf/messages.settings.json rename to apps/confthyttan/messages.settings.json diff --git a/apps/anotherconf/metadata.json b/apps/confthyttan/metadata.json similarity index 77% rename from apps/anotherconf/metadata.json rename to apps/confthyttan/metadata.json index 2a65584db..c706d45f5 100644 --- a/apps/anotherconf/metadata.json +++ b/apps/confthyttan/metadata.json @@ -1,10 +1,10 @@ -{ "id": "anotherconf", - "name": "Another Default Config", - "version":"0.05", - "description": "A different default loadout of apps and configurations. Brings many quality of life improvements. Opinionated based on the creators taste. Read more below before installing.", +{ "id": "confthyttan", + "name": "Thyttan's Default Config", + "version":"0.06", + "description": "A different default set of apps and configurations. Brings many quality of life improvements. Opinionated based on the creators taste. Read more below before installing.", "icon": "app.png", - "type": "settings", - "tags": "system, configuration, config", + "type": "RAM", + "tags": "system, configuration, config, anotherconfig, thyttan", "supports" : ["BANGLEJS2"], "readme": "README.md", "dependencies" : { @@ -26,7 +26,6 @@ "torch":"app", "calculator":"app", "widbt_notify":"app", - "clock_info":"app", "smpltmr":"app", "clkinfostopw":"app", "runplus":"app", @@ -65,8 +64,6 @@ {"name":"edgeclk.settings.json", "url":"edgeclk.settings.json"}, {"name":"setting.json", - "url":"setting.json"}, - {"name":"anotherconf.boot.js", - "url":"boot.js"} + "url":"setting.json"} ] } diff --git a/apps/anotherconf/quicklaunch.json b/apps/confthyttan/quicklaunch.json similarity index 100% rename from apps/anotherconf/quicklaunch.json rename to apps/confthyttan/quicklaunch.json diff --git a/apps/anotherconf/recorder.json b/apps/confthyttan/recorder.json similarity index 100% rename from apps/anotherconf/recorder.json rename to apps/confthyttan/recorder.json diff --git a/apps/anotherconf/setting.json b/apps/confthyttan/setting.json similarity index 100% rename from apps/anotherconf/setting.json rename to apps/confthyttan/setting.json diff --git a/apps/anotherconf/widbt_notify.json b/apps/confthyttan/widbt_notify.json similarity index 100% rename from apps/anotherconf/widbt_notify.json rename to apps/confthyttan/widbt_notify.json From 0d3cad3dec6e45cd214dd6fdcf8a23af7439806e Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Mon, 3 Feb 2025 12:17:23 +0000 Subject: [PATCH 21/38] 0.15: Fix error when displaying a category with only one clockinfo (fix #3728) --- apps/clock_info/ChangeLog | 3 ++- apps/clock_info/lib.js | 2 +- apps/clock_info/metadata.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/clock_info/ChangeLog b/apps/clock_info/ChangeLog index 7d2043899..cf7da2fa1 100644 --- a/apps/clock_info/ChangeLog +++ b/apps/clock_info/ChangeLog @@ -12,4 +12,5 @@ 0.11: Prepend swipe listener if possible 0.12: Add drawFilledImage to allow drawing icons with a separately coloured middle 0.13: Cache loaded ClockInfos so if we have clockInfoWidget and a clock, we don't load them twice (saves ~300ms) -0.14: Check for .clkinfocache and use that if exists (from boot 0.64) \ No newline at end of file +0.14: Check for .clkinfocache and use that if exists (from boot 0.64) +0.15: Fix error when displaying a category with only one clockinfo (fix #3728) diff --git a/apps/clock_info/lib.js b/apps/clock_info/lib.js index 0e20ab855..cb6a19abb 100644 --- a/apps/clock_info/lib.js +++ b/apps/clock_info/lib.js @@ -283,7 +283,7 @@ exports.addInteractive = function(menu, options) { //in the worst case we come back to 0 } while(menu[options.menuA].items.length==0); // When we change, ensure we don't display the same thing as another clockinfo if we can avoid it - while ((options.menuB < menu[options.menuA].items.length) && + while ((options.menuB < menu[options.menuA].items.length-1) && exports.clockInfos.some(m => (m!=options) && m.menuA==options.menuA && m.menuB==options.menuB)) options.menuB++; } diff --git a/apps/clock_info/metadata.json b/apps/clock_info/metadata.json index 1d9a73ce3..9e9079c28 100644 --- a/apps/clock_info/metadata.json +++ b/apps/clock_info/metadata.json @@ -1,7 +1,7 @@ { "id": "clock_info", "name": "Clock Info Module", "shortName": "Clock Info", - "version":"0.14", + "version":"0.15", "description": "A library used by clocks to provide extra information on the clock face (Altitude, BPM, etc)", "icon": "app.png", "type": "module", From 9de824a8b255942c61ab64e119c95b2fd92ca734 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Mon, 3 Feb 2025 12:17:39 +0000 Subject: [PATCH 22/38] fix generator script --- apps/icons/gen/generate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/icons/gen/generate.js b/apps/icons/gen/generate.js index b91eedcdc..fd97a1ce9 100755 --- a/apps/icons/gen/generate.js +++ b/apps/icons/gen/generate.js @@ -7,7 +7,7 @@ /* eslint-env node */ -var imageconverter = require("../../../webtools/imageconverter.js").imageconverter; +var imageconverter = require("../../../webtools/imageconverter.js"); var icons = JSON.parse(require("fs").readFileSync(__dirname+"/icon_names.json")); const imgOptions = { mode : "1bit", From 62d3f803dad8cbef7503d0664d69d083c1595b42 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Mon, 3 Feb 2025 12:17:23 +0000 Subject: [PATCH 23/38] 0.15: Fix error when displaying a category with only one clockinfo (fix #3728) --- apps/clock_info/ChangeLog | 3 ++- apps/clock_info/lib.js | 2 +- apps/clock_info/metadata.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/clock_info/ChangeLog b/apps/clock_info/ChangeLog index 7d2043899..cf7da2fa1 100644 --- a/apps/clock_info/ChangeLog +++ b/apps/clock_info/ChangeLog @@ -12,4 +12,5 @@ 0.11: Prepend swipe listener if possible 0.12: Add drawFilledImage to allow drawing icons with a separately coloured middle 0.13: Cache loaded ClockInfos so if we have clockInfoWidget and a clock, we don't load them twice (saves ~300ms) -0.14: Check for .clkinfocache and use that if exists (from boot 0.64) \ No newline at end of file +0.14: Check for .clkinfocache and use that if exists (from boot 0.64) +0.15: Fix error when displaying a category with only one clockinfo (fix #3728) diff --git a/apps/clock_info/lib.js b/apps/clock_info/lib.js index 0e20ab855..cb6a19abb 100644 --- a/apps/clock_info/lib.js +++ b/apps/clock_info/lib.js @@ -283,7 +283,7 @@ exports.addInteractive = function(menu, options) { //in the worst case we come back to 0 } while(menu[options.menuA].items.length==0); // When we change, ensure we don't display the same thing as another clockinfo if we can avoid it - while ((options.menuB < menu[options.menuA].items.length) && + while ((options.menuB < menu[options.menuA].items.length-1) && exports.clockInfos.some(m => (m!=options) && m.menuA==options.menuA && m.menuB==options.menuB)) options.menuB++; } diff --git a/apps/clock_info/metadata.json b/apps/clock_info/metadata.json index 1d9a73ce3..9e9079c28 100644 --- a/apps/clock_info/metadata.json +++ b/apps/clock_info/metadata.json @@ -1,7 +1,7 @@ { "id": "clock_info", "name": "Clock Info Module", "shortName": "Clock Info", - "version":"0.14", + "version":"0.15", "description": "A library used by clocks to provide extra information on the clock face (Altitude, BPM, etc)", "icon": "app.png", "type": "module", From b4f405f1c95887a3b17c77e1cd259fa3f5199592 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Mon, 3 Feb 2025 12:17:39 +0000 Subject: [PATCH 24/38] fix generator script --- apps/icons/gen/generate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/icons/gen/generate.js b/apps/icons/gen/generate.js index b91eedcdc..fd97a1ce9 100755 --- a/apps/icons/gen/generate.js +++ b/apps/icons/gen/generate.js @@ -7,7 +7,7 @@ /* eslint-env node */ -var imageconverter = require("../../../webtools/imageconverter.js").imageconverter; +var imageconverter = require("../../../webtools/imageconverter.js"); var icons = JSON.parse(require("fs").readFileSync(__dirname+"/icon_names.json")); const imgOptions = { mode : "1bit", From dbbc9886c9b918e8930f004c8ec95f99eb26a41b Mon Sep 17 00:00:00 2001 From: Randy Heydon Date: Tue, 28 Jan 2025 20:37:58 -0500 Subject: [PATCH 25/38] calendar: read events synchronized from Gadgetbridge This is a partial fix for feature request #3707. This allows synchronized events (stored in android.calendar.json) to be shown in the app, alongside the manually entered events and alarm events that are already shown. Note only date/time and event title are currently used; other information available in the synchronized events (e.g. duration, description) are ignored. --- apps/calendar/ChangeLog | 1 + apps/calendar/calendar.js | 6 ++++++ apps/calendar/metadata.json | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/calendar/ChangeLog b/apps/calendar/ChangeLog index 9a4f81491..d737ec6d4 100644 --- a/apps/calendar/ChangeLog +++ b/apps/calendar/ChangeLog @@ -19,3 +19,4 @@ Display Widgets in menus 0.17: Load holidays before events so the latter is not overpainted 0.18: Minor code improvements +0.19: Read events synchronized from Gadgetbridge diff --git a/apps/calendar/calendar.js b/apps/calendar/calendar.js index e140ff576..da5a00a6e 100644 --- a/apps/calendar/calendar.js +++ b/apps/calendar/calendar.js @@ -60,6 +60,12 @@ const loadEvents = () => { date.setSeconds(time.s); return {date: date, msg: a.msg, type: "e"}; })); + // all events synchronized from Gadgetbridge + events = events.concat((require("Storage").readJSON("android.calendar.json",1) || []).map(a => { + // timestamp is in seconds, Date requires milliseconds + const date = new Date(a.timestamp * 1000); + return {date: date, msg: a.title, type: "e"}; + })); }; const loadSettings = () => { diff --git a/apps/calendar/metadata.json b/apps/calendar/metadata.json index 468bceabb..5f5f21b27 100644 --- a/apps/calendar/metadata.json +++ b/apps/calendar/metadata.json @@ -1,7 +1,7 @@ { "id": "calendar", "name": "Calendar", - "version": "0.18", + "version": "0.19", "description": "Monthly calendar, displays holidays uploaded from the web interface and scheduled events.", "icon": "calendar.png", "screenshots": [{"url":"screenshot_calendar.png"}], From 77cebe31780a6a03467e95847c220dd46632755d Mon Sep 17 00:00:00 2001 From: Randy Heydon Date: Wed, 29 Jan 2025 19:30:43 -0500 Subject: [PATCH 26/38] Fix lint warnings. Loop variables had warnings for being undefinied. Added the "let" keyword where they are initialized. --- apps/calendar/calendar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/calendar/calendar.js b/apps/calendar/calendar.js index da5a00a6e..ea06b70e8 100644 --- a/apps/calendar/calendar.js +++ b/apps/calendar/calendar.js @@ -227,8 +227,8 @@ const drawCalendar = function(date) { }, []); let i = 0; g.setFont("8x12", fontSize); - for (y = 0; y < rowN - 1; y++) { - for (x = 0; x < colN; x++) { + for (let y = 0; y < rowN - 1; y++) { + for (let x = 0; x < colN; x++) { i++; const day = days[i]; const curMonth = day < 15 ? month+1 : day < 50 ? month-1 : month; From c307f1f76044bfb8ef8b798836172b83e6228510 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Tue, 4 Feb 2025 11:44:41 +0000 Subject: [PATCH 27/38] fix broken messagesoverlay metadata file --- apps/messagesoverlay/metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/messagesoverlay/metadata.json b/apps/messagesoverlay/metadata.json index 26095eb33..ba5f005c3 100644 --- a/apps/messagesoverlay/metadata.json +++ b/apps/messagesoverlay/metadata.json @@ -15,6 +15,6 @@ {"name":"messagesoverlay.settings.js","url":"settings.js"}, {"name":"messagesoverlay.default.json","url":"default.json"} ], - "data": [{"name":"bthrm.json"}], + "data":[{"name":"messagesoverlay.json"}], "screenshots": [{"url":"screen_call.png"} ,{"url":"screen_message.png"} ] } From 0c0498886cc8c23d025faef4cecd409f7fbea493 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Tue, 4 Feb 2025 12:23:03 +0000 Subject: [PATCH 28/38] handle 'defaultconfig' app type for default configurations --- README.md | 1 + apps/confthyttan/README.md | 7 ++----- apps/confthyttan/metadata.json | 5 ++--- bin/sanitycheck.js | 11 ++++++++--- core | 2 +- typescript/types/info.d.ts | 2 +- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index ddcf23f25..13da10b0a 100644 --- a/README.md +++ b/README.md @@ -270,6 +270,7 @@ and which gives information about the app for the Launcher. // 'notify' - provides 'notify' library for showing notifications // 'locale' - provides 'locale' library for language-specific date/distance/etc // (a version of 'locale' is included in the firmware) + // 'defaultconfig' - a set of apps that will can be installed and will wipe out all previously installed apps "tags": "", // comma separated tag list for searching // common types are: // 'clock' - it's a clock diff --git a/apps/confthyttan/README.md b/apps/confthyttan/README.md index 5f7819171..e9b952c82 100644 --- a/apps/confthyttan/README.md +++ b/apps/confthyttan/README.md @@ -7,11 +7,8 @@ A different default set of apps and configurations. Brings many quality of life Before installing do this: 1. Backup your current setup (via the "More..." tab of the App Loader) so you can restore it later if you want. -2. Factory reset the watch. -3. Remove all apps via the "More..." tab in the App Loader. -4. Make sure minification is turned off on the App Loader. -5. Then install. -6. Try it out, switch out apps to your favorites and tweak to your liking! +2. Install this app (you'll be prompted about all data being removed from your Bangle) +3. Try it out, switch out apps to your favorites and tweak to your liking! ## Features diff --git a/apps/confthyttan/metadata.json b/apps/confthyttan/metadata.json index c706d45f5..5fd18c7e9 100644 --- a/apps/confthyttan/metadata.json +++ b/apps/confthyttan/metadata.json @@ -3,8 +3,8 @@ "version":"0.06", "description": "A different default set of apps and configurations. Brings many quality of life improvements. Opinionated based on the creators taste. Read more below before installing.", "icon": "app.png", - "type": "RAM", - "tags": "system, configuration, config, anotherconfig, thyttan", + "type": "defaultconfig", + "tags": "system,configuration,config,anotherconfig,thyttan", "supports" : ["BANGLEJS2"], "readme": "README.md", "dependencies" : { @@ -13,7 +13,6 @@ "messageicons":"app", "widmsggrid":"app", "msgwakefup":"app", - "msgtwscr":"app", "delaylock":"app", "notify":"app", "health":"app", diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index 086c2e551..80f8abe24 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -169,7 +169,7 @@ const APP_KEYS = [ const STORAGE_KEYS = ['name', 'url', 'content', 'evaluate', 'noOverwite', 'supports', 'noOverwrite']; const DATA_KEYS = ['name', 'wildcard', 'storageFile', 'url', 'content', 'evaluate']; const SUPPORTS_DEVICES = ["BANGLEJS","BANGLEJS2"]; // device IDs allowed for 'supports' -const METADATA_TYPES = ["app","clock","widget","bootloader","RAM","launch","scheduler","notify","locale","settings","textinput","module","clkinfo"]; // values allowed for "type" field +const METADATA_TYPES = ["app","clock","widget","bootloader","RAM","launch","scheduler","notify","locale","settings","textinput","module","clkinfo","defaultconfig"]; // values allowed for "type" field - listed in README.md const FORBIDDEN_FILE_NAME_CHARS = /[,;]/; // used as separators in appid.info const VALID_DUPLICATES = [ '.tfmodel', '.tfnames' ]; const GRANDFATHERED_ICONS = ["s7clk", "snek", "astral", "alpinenav", "slomoclock", "arrow", "pebble", "rebble"]; @@ -207,6 +207,10 @@ apps.forEach((app,appIdx) => { if (!app.name) ERROR(`App ${app.id} has no name`, {file:metadataFile}); var isApp = !app.type || app.type=="app"; var appTags = app.tags ? app.tags.split(",") : []; + /*if (appTags.some(tag => tag!=tag.trim())) + WARN(`App ${app.id} 'tag' list contains whitespace ("${app.tags}")`, {file:metadataFile}); + if (appTags.some(tag => tag!=tag.toLowerCase())) + WARN(`App ${app.id} 'tag' list contains uppercase ("${app.tags}")`, {file:metadataFile});*/ if (app.name.length>20 && !app.shortName && isApp) ERROR(`App ${app.id} has a long name, but no shortName`, {file:metadataFile}); if (app.type && !METADATA_TYPES.includes(app.type)) ERROR(`App ${app.id} 'type' is one one of `+METADATA_TYPES, {file:metadataFile}); @@ -296,7 +300,8 @@ apps.forEach((app,appIdx) => { if (INTERNAL_FILES_IN_APP_TYPE[app.type].includes(file.name)) fileInternal = true; } - allFiles.push({app: app.id, file: file.name, internal:fileInternal}); + if (!app.type=="defaultconfig") + allFiles.push({app: app.id, file: file.name, internal:fileInternal}); if (file.url) if (!fs.existsSync(appDir+file.url)) ERROR(`App ${app.id} file ${file.url} doesn't exist`, {file:metadataFile}); if (!file.url && !file.content && !app.custom) ERROR(`App ${app.id} file ${file.name} has no contents`, {file:metadataFile}); var fileContents = ""; @@ -494,7 +499,7 @@ while(fileA=allFiles.pop()) { if (isGlob(nameA)||isGlob(nameB)) ERROR(`App ${fileB.app} ${typeB} file ${nameB} matches app ${fileA.app} ${typeB} file ${nameA}`); else if (fileA.app != fileB.app && (!fileA.internal) && (!fileB.internal)) - WARN(`App ${fileB.app} ${typeB} file ${nameB} is also listed as ${typeA} file for app ${fileA.app}`); + WARN(`App ${fileB.app} ${typeB} file ${nameB} is also listed as ${typeA} file for app ${fileA.app}`, {file:APPSDIR_RELATIVE+fileB.app+"/metadata.json"}); } }) } diff --git a/core b/core index bf08b4848..3ec8e289a 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit bf08b484830ef4e811faf67ec663ebf839b5d09b +Subproject commit 3ec8e289a26a545d0d0c50f6945978584fb3d7f8 diff --git a/typescript/types/info.d.ts b/typescript/types/info.d.ts index c305b0261..21014ff8f 100644 --- a/typescript/types/info.d.ts +++ b/typescript/types/info.d.ts @@ -14,4 +14,4 @@ type AppInfo = { type AppType = "app" | "clock" | "widget" | "module" | "bootloader" | "settings" | "clkinfo" | "RAM" | "launch" | "textinput" | "scheduler" | - "notify" | "locale"; + "notify" | "locale" | "defaultconfig"; From 9b224171e175084f515585266a748a40d6154d85 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Tue, 4 Feb 2025 12:38:56 +0000 Subject: [PATCH 29/38] Fix up app metadata - spaces/uppercase in tags meant these apps wouldn't have appeared in some searches --- README.md | 2 +- apps/UI4swatch/metadata.json | 2 +- apps/Uke/metadata.json | 4 ++-- apps/bblobface/metadata.json | 2 +- apps/beeptest/metadata.json | 2 +- apps/bordle/metadata.json | 2 +- apps/calclock/metadata.json | 2 +- apps/cassioWatch/metadata.json | 2 +- apps/chronlog/metadata.json | 2 +- apps/color_catalog/metadata.json | 2 +- apps/delaylock/metadata.json | 2 +- apps/dinoClock/metadata.json | 2 +- apps/followtherecipe/metadata.json | 2 +- apps/gassist/metadata.json | 2 +- apps/gbdiscon/metadata.json | 2 +- apps/golfview/metadata.json | 4 ++-- apps/guitar/metadata.json | 4 ++-- apps/guitarsongs/metadata.json | 2 +- apps/intervalTimer/metadata.json | 2 +- apps/kanagsec/metadata.json | 12 ++++++------ apps/ohmcalc/metadata.json | 2 +- apps/pastel/metadata.json | 2 +- apps/poweroff/metadata.json | 2 +- apps/quicklaunch/metadata.json | 2 +- apps/rescalc/metadata.json | 2 +- apps/scribble/metadata.json | 2 +- apps/sevenmin/metadata.json | 2 +- apps/spaceclock/metadata.json | 4 ++-- apps/swiperclocklaunch/metadata.json | 2 +- apps/tabanchi/metadata.json | 2 +- apps/testuserinput/metadata.json | 2 +- apps/timestamplog/metadata.json | 2 +- apps/tinydraw/metadata.json | 2 +- apps/weatherClock/metadata.json | 2 +- apps/widscrlock/metadata.json | 4 ++-- bin/sanitycheck.js | 4 ++-- 36 files changed, 47 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 13da10b0a..b9b770b37 100644 --- a/README.md +++ b/README.md @@ -271,7 +271,7 @@ and which gives information about the app for the Launcher. // 'locale' - provides 'locale' library for language-specific date/distance/etc // (a version of 'locale' is included in the firmware) // 'defaultconfig' - a set of apps that will can be installed and will wipe out all previously installed apps - "tags": "", // comma separated tag list for searching + "tags": "", // comma separated tag list for searching (don't include uppercase or spaces) // common types are: // 'clock' - it's a clock // 'widget' - it is (or provides) a widget diff --git a/apps/UI4swatch/metadata.json b/apps/UI4swatch/metadata.json index bcb0e6c51..5b4abf406 100644 --- a/apps/UI4swatch/metadata.json +++ b/apps/UI4swatch/metadata.json @@ -5,7 +5,7 @@ "version": "0.02", "description": "A UI/UX for espruino smartwatches, displays dinamically calc. x,y coordinates.", "icon": "app.png", - "tags": "Color,input,buttons,touch,UI", + "tags": "color,input,buttons,touch,ui", "supports": ["BANGLEJS"], "readme": "README.md", "screenshots": [{"url":"UI4swatch_icon.png"},{"url":"UI4swatch_s1.png"}], diff --git a/apps/Uke/metadata.json b/apps/Uke/metadata.json index 5a3f17639..1185c7202 100644 --- a/apps/Uke/metadata.json +++ b/apps/Uke/metadata.json @@ -4,8 +4,8 @@ "version": "0.04", "description": "Wrist mounted ukulele chords", "icon": "app.png", - "tags": "uke, chords", - "supports" : ["BANGLEJS2"], + "tags": "uke,chords", + "supports" : ["BANGLEJS2"], "readme": "README.md", "storage": [ {"name":"Uke.app.js","url":"app.js"}, diff --git a/apps/bblobface/metadata.json b/apps/bblobface/metadata.json index 6af247c91..8393755b0 100644 --- a/apps/bblobface/metadata.json +++ b/apps/bblobface/metadata.json @@ -6,7 +6,7 @@ "description": "A fully featured watch face with a playable game on the side.", "readme":"README.md", "type": "clock", - "tags": "clock, game", + "tags": "clock,game", "supports" : ["BANGLEJS2"], "storage": [ {"name":"bblobface.app.js","url":"app.js"}, diff --git a/apps/beeptest/metadata.json b/apps/beeptest/metadata.json index a9856bc93..7c25a3848 100644 --- a/apps/beeptest/metadata.json +++ b/apps/beeptest/metadata.json @@ -5,7 +5,7 @@ "version": "0.01", "description": "Aerobic fitness test created by Léger & Lambert", "icon": "beeptest.png", - "tags": "Health", + "tags": "health", "supports": ["BANGLEJS2"], "readme": "README.md", "storage": [ diff --git a/apps/bordle/metadata.json b/apps/bordle/metadata.json index f6011f798..0dbcf09f9 100644 --- a/apps/bordle/metadata.json +++ b/apps/bordle/metadata.json @@ -6,7 +6,7 @@ "description": "Bangle version of a popular word search game", "supports" : ["BANGLEJS2"], "readme": "README.md", - "tags": "game, text", + "tags": "game,text", "storage": [ {"name":"bordle.app.js","url":"bordle.app.js"}, {"name":"wordlencr.txt","url":"wordlencr.txt"}, diff --git a/apps/calclock/metadata.json b/apps/calclock/metadata.json index c339e8ce0..31dcb88d0 100644 --- a/apps/calclock/metadata.json +++ b/apps/calclock/metadata.json @@ -6,7 +6,7 @@ "description": "Show the current and upcoming events synchronized from Gadgetbridge", "icon": "calclock.png", "type": "clock", - "tags": "clock agenda", + "tags": "clock,agenda", "supports": ["BANGLEJS2"], "readme": "README.md", "storage": [ diff --git a/apps/cassioWatch/metadata.json b/apps/cassioWatch/metadata.json index fb7dfd401..5ec12e751 100644 --- a/apps/cassioWatch/metadata.json +++ b/apps/cassioWatch/metadata.json @@ -6,7 +6,7 @@ "icon": "app.png", "version": "0.13", "type": "clock", - "tags": "clock, weather, cassio, retro", + "tags": "clock,weather,cassio,retro", "supports": ["BANGLEJS2"], "allow_emulator": true, "readme": "README.md", diff --git a/apps/chronlog/metadata.json b/apps/chronlog/metadata.json index 8ed618b27..50a9166bf 100644 --- a/apps/chronlog/metadata.json +++ b/apps/chronlog/metadata.json @@ -3,7 +3,7 @@ "version":"0.01", "description": "Record time active on a task, course, work or anything really.", "icon": "app.png", - "tags": "logging, record, work, tasks", + "tags": "logging,record,work,tasks", "supports" : ["BANGLEJS2"], "readme": "README.md", "screenshots" : [ { "url":"dump.png"}, { "url":"dump1.png" }, { "url":"dump2.png" }, { "url":"dump3.png" }, { "url":"dump4.png" }, { "url":"dump5.png" }, { "url":"dump6.png" } ], diff --git a/apps/color_catalog/metadata.json b/apps/color_catalog/metadata.json index 4d49308ef..e445e3175 100644 --- a/apps/color_catalog/metadata.json +++ b/apps/color_catalog/metadata.json @@ -5,7 +5,7 @@ "version": "0.03", "description": "Displays RGB565 and RGB888 colors, its name and code in screen.", "icon": "app.png", - "tags": "Color,input,buttons,touch,UI", + "tags": "color,input,buttons,touch,ui", "supports": ["BANGLEJS"], "readme": "README.md", "storage": [ diff --git a/apps/delaylock/metadata.json b/apps/delaylock/metadata.json index dff4d9219..7441d822b 100644 --- a/apps/delaylock/metadata.json +++ b/apps/delaylock/metadata.json @@ -3,7 +3,7 @@ "version":"0.01", "description": "Delay the locking of the screen to 5 seconds after the backlight turns off.", "icon": "app.png", - "tags": "settings, configuration, backlight, touchscreen, screen", + "tags": "settings,configuration,backlight,touchscreen,screen", "type": "bootloader", "supports" : ["BANGLEJS2"], "readme": "README.md", diff --git a/apps/dinoClock/metadata.json b/apps/dinoClock/metadata.json index a61ce122b..1455e84a6 100644 --- a/apps/dinoClock/metadata.json +++ b/apps/dinoClock/metadata.json @@ -6,7 +6,7 @@ "icon": "app.png", "version": "0.01", "type": "clock", - "tags": "clock, weather, dino, trex, chrome", + "tags": "clock,weather,dino,trex,chrome", "supports": ["BANGLEJS2"], "allow_emulator": true, "readme": "README.md", diff --git a/apps/followtherecipe/metadata.json b/apps/followtherecipe/metadata.json index 0c1de0817..59fabc8c5 100644 --- a/apps/followtherecipe/metadata.json +++ b/apps/followtherecipe/metadata.json @@ -6,7 +6,7 @@ "version": "0.02", "description": "Follow The Recipe (FTR) is a bangle.js app to follow a recipe step by step", "type": "app", - "tags": "tool, tools, cook", + "tags": "tool,tools,cook", "supports": [ "BANGLEJS2" ], diff --git a/apps/gassist/metadata.json b/apps/gassist/metadata.json index 995c44adb..bd38cdfb8 100644 --- a/apps/gassist/metadata.json +++ b/apps/gassist/metadata.json @@ -5,7 +5,7 @@ "description": "A simple way to initiate Google Assistant on Android. Intents must be enabled in Gadgetbridge.", "icon": "app.png", "type": "app", - "tags": "tool, voice, tasker", + "tags": "tool,voice,tasker", "supports": ["BANGLEJS","BANGLEJS2"], "allow_emulator": false, "storage": [ diff --git a/apps/gbdiscon/metadata.json b/apps/gbdiscon/metadata.json index ecc92d01c..904b4c6a2 100644 --- a/apps/gbdiscon/metadata.json +++ b/apps/gbdiscon/metadata.json @@ -4,7 +4,7 @@ "version":"0.01", "description": "Disconnect from your android device by running this app. The app will forward you to your clock face immediately after triggering the command. (Gadgetbridge nightly required until version 82 is released)", "icon": "app.png", - "tags": "android, gadgetbridge, bluetooth, bt", + "tags": "android,gadgetbridge,bluetooth,bt", "supports" : ["BANGLEJS", "BANGLEJS2"], "storage": [ {"name":"gbdiscon.app.js","url":"app.js"}, diff --git a/apps/golfview/metadata.json b/apps/golfview/metadata.json index bc3a00f90..cf77f3a26 100644 --- a/apps/golfview/metadata.json +++ b/apps/golfview/metadata.json @@ -3,9 +3,9 @@ "version": "0.03", "description": "This app will provide you with on course data to support your golf game!", "icon": "golfview.png", - "tags": "outdoors, gps", + "tags": "outdoors,gps", "allow_emulator": true, - "supports" : ["BANGLEJS2"], + "supports" : ["BANGLEJS2"], "readme": "README.md", "custom": "custom.html", "storage": [ diff --git a/apps/guitar/metadata.json b/apps/guitar/metadata.json index 0dc6893d6..7b4683c47 100644 --- a/apps/guitar/metadata.json +++ b/apps/guitar/metadata.json @@ -4,8 +4,8 @@ "version": "0.03", "description": "Wrist mounted guitar chords", "icon": "app.png", - "tags": "guitar, chords", - "supports" : ["BANGLEJS2"], + "tags": "guitar,chords", + "supports" : ["BANGLEJS2"], "readme": "README.md", "storage": [ {"name":"guitar.app.js","url":"app.js"}, diff --git a/apps/guitarsongs/metadata.json b/apps/guitarsongs/metadata.json index 242850a70..18e1f7146 100644 --- a/apps/guitarsongs/metadata.json +++ b/apps/guitarsongs/metadata.json @@ -5,7 +5,7 @@ "description": "Songs lyrics and guitar chords", "icon": "app.png", "screenshots": [{"url": "screenshot.png"}], - "tags": "guitar, song, lyrics, chords", + "tags": "guitar,song,lyrics,chords", "supports" : ["BANGLEJS2"], "interface": "manage_songs.html", "readme": "README.md", diff --git a/apps/intervalTimer/metadata.json b/apps/intervalTimer/metadata.json index 2722473c1..a0489833c 100644 --- a/apps/intervalTimer/metadata.json +++ b/apps/intervalTimer/metadata.json @@ -5,7 +5,7 @@ "icon": "app.png", "version":"0.01", "description": "Interval Timer for workouts, HIIT, or whatever else.", - "tags": "timer, interval, hiit, workout", + "tags": "timer,interval,hiit,workout", "readme":"README.md", "supports":["BANGLEJS2"], "storage": [ diff --git a/apps/kanagsec/metadata.json b/apps/kanagsec/metadata.json index c00ec9d7a..2e3376c5b 100644 --- a/apps/kanagsec/metadata.json +++ b/apps/kanagsec/metadata.json @@ -1,23 +1,23 @@ -{ +{ "id": "kanagsec", "name": "Kanagawa clock", "shortName":"kanagawa", "version": "0.04", "description": "A clock that displays the great wave of kanagawa (image from wikipedia) with seconds in active mode.", "icon": "app.png", - "tags": "clock, kanagawa, wave", + "tags": "clock,kanagawa,wave", "type": "clock", - "supports" : ["BANGLEJS2"], + "supports" : ["BANGLEJS2"], "readme": "README.md", "allow_emulator":true, - "storage": + "storage": [ {"name":"kanagsec.app.js","url":"app.js"}, {"name":"kanagsec.img","url":"app-icon.js","evaluate":true} ], - "screenshots" : + "screenshots" : [ { "url":"screenshot.png" }, - { "url":"screenshot2.png" } + { "url":"screenshot2.png" } ] } \ No newline at end of file diff --git a/apps/ohmcalc/metadata.json b/apps/ohmcalc/metadata.json index c72727a4c..2ab25947f 100644 --- a/apps/ohmcalc/metadata.json +++ b/apps/ohmcalc/metadata.json @@ -6,7 +6,7 @@ "description": "A smart and simple calculator for Ohm's Law calculations, designed specifically for Bangle.js 2 smartwatches. Handles voltage, current, resistance, and power calculations with smart logic to prevent invalid inputs.", "icon": "app.png", "type": "app", - "tags": "calculator, utilities, electric", + "tags": "calculator,utilities,electric", "supports": ["BANGLEJS2"], "readme": "README.md", "allow_emulator": true, diff --git a/apps/pastel/metadata.json b/apps/pastel/metadata.json index 532aa8ccc..5d1f925fe 100644 --- a/apps/pastel/metadata.json +++ b/apps/pastel/metadata.json @@ -8,7 +8,7 @@ "dependencies": {"mylocation":"app","weather":"app"}, "screenshots": [{"url":"screenshot_pastel.png"}, {"url":"weather_icons.png"}], "type": "clock", - "tags": "clock, weather, tool", + "tags": "clock,weather,tool", "supports": ["BANGLEJS","BANGLEJS2"], "readme": "README.md", "storage": [ diff --git a/apps/poweroff/metadata.json b/apps/poweroff/metadata.json index 218e4b441..b9a7d60ea 100644 --- a/apps/poweroff/metadata.json +++ b/apps/poweroff/metadata.json @@ -4,7 +4,7 @@ "version": "0.05", "description": "Simple app to power off your Bangle.js", "icon": "app.png", -"tags": "tool, poweroff, shutdown", +"tags": "tool,poweroff,shutdown", "supports" : ["BANGLEJS", "BANGLEJS2"], "readme": "README.md", "allow_emulator": true, diff --git a/apps/quicklaunch/metadata.json b/apps/quicklaunch/metadata.json index 15c40dfdc..95ae0b014 100644 --- a/apps/quicklaunch/metadata.json +++ b/apps/quicklaunch/metadata.json @@ -5,7 +5,7 @@ "version": "0.16", "description": "Tap or swipe left/right/up/down on your clock face to launch up to five apps of your choice. Configurations can be accessed through Settings->Apps.", "type": "bootloader", - "tags": "tools, system", + "tags": "tools,system", "readme": "README.md", "supports": ["BANGLEJS2"], "storage": [ diff --git a/apps/rescalc/metadata.json b/apps/rescalc/metadata.json index cd2b7ea31..f7f7c5e29 100644 --- a/apps/rescalc/metadata.json +++ b/apps/rescalc/metadata.json @@ -10,7 +10,7 @@ {"url": "screenshot-2.png"} ], "description": "An intuitive, easy-to-use app that aids in the interpretation of resistor color codes and calculation of resistance values.", - "tags": "app, tool, electricity, ohms, converter", + "tags": "app,tool,electricity,ohms,converter", "supports": ["BANGLEJS2"], "readme": "README.md", "allow_emulator": true, diff --git a/apps/scribble/metadata.json b/apps/scribble/metadata.json index 2c31be931..19c6c707c 100644 --- a/apps/scribble/metadata.json +++ b/apps/scribble/metadata.json @@ -6,7 +6,7 @@ "description": "A keyboard on your wrist! Swipe right for space, left for delete.", "icon": "app.png", "allow_emulator": true, - "tags": "tools, keyboard, text, scribble", + "tags": "tools,keyboard,text,scribble", "supports" : ["BANGLEJS2"], "readme": "README.md", "storage": [ diff --git a/apps/sevenmin/metadata.json b/apps/sevenmin/metadata.json index 5103a5f97..8a1867e4a 100644 --- a/apps/sevenmin/metadata.json +++ b/apps/sevenmin/metadata.json @@ -5,7 +5,7 @@ "description": "A basic implementation of the famous consice workout", "icon": "icon.png", "type":"app", - "tags": "Training, Workout", + "tags": "training,workout", "supports": ["BANGLEJS2"], "readme": "README.md", "allow_emulator":true, diff --git a/apps/spaceclock/metadata.json b/apps/spaceclock/metadata.json index 1e8bc266f..cff458d08 100644 --- a/apps/spaceclock/metadata.json +++ b/apps/spaceclock/metadata.json @@ -5,8 +5,8 @@ "description": "Watch face in the style of Casio Prototype Space Resist", "icon": "app-icon.png", "type": "clock", - "tags": "clock, casio, retro", - "supports" : ["BANGLEJS2"], + "tags": "clock,casio,retro", + "supports" : ["BANGLEJS2"], "readme": "README.md", "storage": [ {"name":"spaceclock.app.js","url":"app.js"}, diff --git a/apps/swiperclocklaunch/metadata.json b/apps/swiperclocklaunch/metadata.json index d474b38e3..6bb24987e 100644 --- a/apps/swiperclocklaunch/metadata.json +++ b/apps/swiperclocklaunch/metadata.json @@ -5,7 +5,7 @@ "description": "Navigate between clock and launcher with Swipe action", "icon": "swiperclocklaunch.png", "type": "bootloader", - "tags": "tools, system", + "tags": "tools,system", "supports": ["BANGLEJS", "BANGLEJS2"], "storage": [ {"name":"swiperclocklaunch.boot.js","url":"boot.js"}, diff --git a/apps/tabanchi/metadata.json b/apps/tabanchi/metadata.json index db81707b5..43ebc62ac 100644 --- a/apps/tabanchi/metadata.json +++ b/apps/tabanchi/metadata.json @@ -7,7 +7,7 @@ "description": "Tamagotchi WatchApp", "icon": "app.png", "allow_emulator": true, - "tags": "clock, watch, virtual pet", + "tags": "clock,watch,virtualpet", "supports": [ "BANGLEJS2" ], diff --git a/apps/testuserinput/metadata.json b/apps/testuserinput/metadata.json index 409843198..39fab86af 100644 --- a/apps/testuserinput/metadata.json +++ b/apps/testuserinput/metadata.json @@ -5,7 +5,7 @@ "version": "0.08", "description": "App to test the bangle.js input interface. It displays the user action in text, circle buttons or on/off switch UI elements.", "icon": "app.png", - "tags": "input,interface,buttons,touch,UI", + "tags": "input,interface,buttons,touch,ui", "supports": ["BANGLEJS"], "readme": "README.md", "storage": [ diff --git a/apps/timestamplog/metadata.json b/apps/timestamplog/metadata.json index e1aa0eb23..6f0126c4a 100644 --- a/apps/timestamplog/metadata.json +++ b/apps/timestamplog/metadata.json @@ -7,7 +7,7 @@ "description": "Conveniently record a series of date/time stamps", "screenshots": [ {"url": "screenshot.png" } ], "readme": "README.md", - "tags": "timestamp, log", + "tags": "timestamp,log", "supports": ["BANGLEJS2"], "interface": "interface.html", "storage": [ diff --git a/apps/tinydraw/metadata.json b/apps/tinydraw/metadata.json index 21ea1eb89..61f4129e8 100644 --- a/apps/tinydraw/metadata.json +++ b/apps/tinydraw/metadata.json @@ -6,7 +6,7 @@ "description": "Draw stuff in your wrist", "icon": "app.png", "allow_emulator": true, - "tags": "tools, keyboard, text, scribble", + "tags": "tools,keyboard,text,scribble", "supports" : ["BANGLEJS2"], "readme": "README.md", "storage": [ diff --git a/apps/weatherClock/metadata.json b/apps/weatherClock/metadata.json index 88057c8dd..b1b586a21 100644 --- a/apps/weatherClock/metadata.json +++ b/apps/weatherClock/metadata.json @@ -8,7 +8,7 @@ "dependencies": {"weather":"app"}, "screenshots": [{"url":"screens/screen1.png"}], "type": "clock", - "tags": "clock, weather", + "tags": "clock,weather", "supports": ["BANGLEJS","BANGLEJS2"], "allow_emulator": true, "readme": "README.md", diff --git a/apps/widscrlock/metadata.json b/apps/widscrlock/metadata.json index 5110d76c1..568c61b93 100644 --- a/apps/widscrlock/metadata.json +++ b/apps/widscrlock/metadata.json @@ -3,9 +3,9 @@ "shortName":"Screenlock", "version":"0.03", "description": "Lock a Bangle 2 screen by tapping a widget.", - "icon": "widget.png", + "icon": "widget.png", "type": "widget", - "tags": "widget, screenlock", + "tags": "widget,screenlock", "supports" : ["BANGLEJS2"], "readme": "README.md", "storage": [ diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index 80f8abe24..5432999eb 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -207,10 +207,10 @@ apps.forEach((app,appIdx) => { if (!app.name) ERROR(`App ${app.id} has no name`, {file:metadataFile}); var isApp = !app.type || app.type=="app"; var appTags = app.tags ? app.tags.split(",") : []; - /*if (appTags.some(tag => tag!=tag.trim())) + if (appTags.some(tag => tag!=tag.trim())) WARN(`App ${app.id} 'tag' list contains whitespace ("${app.tags}")`, {file:metadataFile}); if (appTags.some(tag => tag!=tag.toLowerCase())) - WARN(`App ${app.id} 'tag' list contains uppercase ("${app.tags}")`, {file:metadataFile});*/ + WARN(`App ${app.id} 'tag' list contains uppercase ("${app.tags}")`, {file:metadataFile}); if (app.name.length>20 && !app.shortName && isApp) ERROR(`App ${app.id} has a long name, but no shortName`, {file:metadataFile}); if (app.type && !METADATA_TYPES.includes(app.type)) ERROR(`App ${app.id} 'type' is one one of `+METADATA_TYPES, {file:metadataFile}); From f5e6842019a22cf3b14234921bb752984a01379d Mon Sep 17 00:00:00 2001 From: tonykakuuu Date: Tue, 4 Feb 2025 18:56:20 +0100 Subject: [PATCH 30/38] New app! --- apps/txtreader/ChangeLog | 1 + apps/txtreader/README.md | 20 ++++++ apps/txtreader/app-icon.js | 1 + apps/txtreader/app.js | 88 +++++++++++++++++++++++ apps/txtreader/metadata.json | 16 +++++ apps/txtreader/screenshot_txtreader.png | Bin 0 -> 7168 bytes apps/txtreader/txtreader.png | Bin 0 -> 1549 bytes apps/txtreader/txtreader_transparent.png | Bin 0 -> 1549 bytes 8 files changed, 126 insertions(+) create mode 100644 apps/txtreader/ChangeLog create mode 100644 apps/txtreader/README.md create mode 100644 apps/txtreader/app-icon.js create mode 100644 apps/txtreader/app.js create mode 100644 apps/txtreader/metadata.json create mode 100644 apps/txtreader/screenshot_txtreader.png create mode 100644 apps/txtreader/txtreader.png create mode 100644 apps/txtreader/txtreader_transparent.png diff --git a/apps/txtreader/ChangeLog b/apps/txtreader/ChangeLog new file mode 100644 index 000000000..5560f00bc --- /dev/null +++ b/apps/txtreader/ChangeLog @@ -0,0 +1 @@ +0.01: New App! diff --git a/apps/txtreader/README.md b/apps/txtreader/README.md new file mode 100644 index 000000000..1cede764c --- /dev/null +++ b/apps/txtreader/README.md @@ -0,0 +1,20 @@ +# txtreader + +Very basic text reader with an integrated file selector. + +## Features + +- select files from storage (.txt) +- display their contents +- browse pages + +## Controls + +Bangle.js 2 +- tap the right side of the screen to flip to the next page +- tap the left side of the screen to flip to the previous page +- exit by pressing the physical button + +## Creator + + diff --git a/apps/txtreader/app-icon.js b/apps/txtreader/app-icon.js new file mode 100644 index 000000000..a8c210baf --- /dev/null +++ b/apps/txtreader/app-icon.js @@ -0,0 +1 @@ +require("heatshrink").decompress(atob("mEwwkCkQA/AH4A/AAcosd2m9jw04AQlyC5WL1e63YCG3lUC5WPj/x/8f+H/h4CBj/3jYXLv/3/4CCt4FC/IXM/4AI/YXk/WZzOfCgWfAoIXN/F3u9/C4V/AoIvUI6H3F4p3oC6/73e734XTR4wXQ/vd7vfC6f85gAG55HQAAppBC5n5xAAGz4vmzIAGF/33F49/C5v6F4+vC5rrFd6JHCv4XTI4WfF6lms1vF6mq1WvC6Z3WxfdABHVugXKlFUogAHoVCC5QA/AH4A6A")) \ No newline at end of file diff --git a/apps/txtreader/app.js b/apps/txtreader/app.js new file mode 100644 index 000000000..890b4254c --- /dev/null +++ b/apps/txtreader/app.js @@ -0,0 +1,88 @@ +function showFileSelector() { + let files = require("Storage").list().filter(f => f.endsWith('.txt')); + + let menuItems = {}; + files.forEach(file => { + menuItems[file] = () => { + E.showPrompt(`Select ${file}?`).then(confirm => { + if (confirm) { + onFileSelected(file); + } else { + showFileSelector(); + } + }); + }; + }); + + menuItems['< Back'] = () => { load(); }; // Go back to the launcher or previous screen + E.showMenu(menuItems); +} + +function onFileSelected(file) { + + var text = require("Storage").read(file); + + function displayText(text, startLine, pageNumber) { + g.clear(); + g.setFont("6x8", 1); + g.setColor(1); + g.drawString("Page " + pageNumber, 10, 2); + g.drawString(file, g.getWidth()-file.length*6, 2); + + var lines = text.split("\n"); + var y = 15; // Text start, top row reserved for page number + var currentLine = startLine || 0; + var linesDisplayed = 0; //Per page + + for (var i = currentLine; i < lines.length; i++) { + var wrappedLines = g.wrapString(lines[i], g.getWidth() - 20); + for (var j = 0; j < wrappedLines.length; j++) { + g.drawString(wrappedLines[j], 10, y); + y += 10; // Move down for the next line + linesDisplayed++; + if (y >= g.getHeight() - 10) { + // If we run out of space, stop drawing + return { nextStartLine: i , linesDisplayed: linesDisplayed }; + } + } + } + return null; // No more lines to display + } + + var currentStartLine = 0; + var currentPage = 1; + var history = []; // Track the start line and lines displayed for each page + + // Initial display + var result = displayText(text, currentStartLine, currentPage); + history.push({ startLine: currentStartLine, linesDisplayed: result.linesDisplayed }); + + // Handle touch events + Bangle.on('touch', function(button) { + if (button === 2) { // Right side of the screen (next page) + var nextStartLine = displayText(text, currentStartLine, currentPage + 1); + if (nextStartLine !== null) { + currentStartLine = nextStartLine.nextStartLine; + currentPage++; + history.push({ startLine: currentStartLine, linesDisplayed: nextStartLine.linesDisplayed }); + displayText(text, currentStartLine, currentPage); + } else { + currentStartLine = 0; + currentPage = 1; + history = [{ startLine: currentStartLine, linesDisplayed: result.linesDisplayed }]; + displayText(text, currentStartLine, currentPage); + } + } else if (button === 1) { // Left side of the screen (previous page) + if (currentPage > 1) { + // Go back to the previous page + history.pop(); // Remove the current page from history + var previousPage = history[history.length - 1]; + currentStartLine = previousPage.startLine; + currentPage--; + displayText(text, currentStartLine, currentPage); + } + } + }); +} + +showFileSelector(); \ No newline at end of file diff --git a/apps/txtreader/metadata.json b/apps/txtreader/metadata.json new file mode 100644 index 000000000..985b8e5ea --- /dev/null +++ b/apps/txtreader/metadata.json @@ -0,0 +1,16 @@ +{ + "id": "txtreader", + "name": "txtreader", + "shortName": "txtreader", + "version": "0.01", + "description": "Basic text reader with pages and a file selector.", + "icon": "txtreader.png", + "screenshots": [{"url":"screenshot_txtreader.png"}], + "tags": "app,tool", + "supports": ["BANGLEJS2"], + "readme": "README.md", + "storage": [ + {"name":"txtreader.app.js","url":"app.js"}, + {"name":"txtreader.img","url":"app-icon.js","evaluate":true} + ] +} diff --git a/apps/txtreader/screenshot_txtreader.png b/apps/txtreader/screenshot_txtreader.png new file mode 100644 index 0000000000000000000000000000000000000000..1b565024aa69b1dde87b3fe1fb703fdb8c007583 GIT binary patch literal 7168 zcmeHKcTiJ#*G2@vpr~|EF$SecNJt2TNJI=(2_Q`ZD-eUt)i&{xY~7s2w`*=dO+*j zGMmFQQ#(RloXV;)yb*7L4^qV}w{pq^y8WUWF2;6;bR4_oGuoK2^@&1q-GD->77XBI-j*VD~K%F+Jbo3rkU~Hp)4-2s=f* zg__urYEirWiPzLp1FvJV-)-`Ds{rq202QuhR8#cW<# z8VQOn*j~_&h|-)?;{Q~Y=B$`-I3FdWBV`#TT0IxC@@$$hS^4UAx`ZiT40Kp^IRRn4^~a1}JA3inPruE3?JzGa)3HH4|Mm4JLcdJ$5iIVws-#KWQIUXD ze3T8g7L_R#T;_i2b@+%4=0m-*9ovA#3e-gW`c(eiRBub~7yQeyX`z}F-@4OIR}XFb8j(9zLBAW;Yu3JzMpSwRdoIS|fZDXc<##V`O^6kobGo6clFS24-1Og}ar1_Slb zzw-0)CKA8HGg#kP0Qo=!lD!cc>PUo_7vg6R7TeGt1o@WGfAnD4fD?+a0$5BxUkYI8 z4=~sYKSNL{-~GM)d_C97p;8clC*TE|vcRYse+y}BO0@j$u}Xm(-OGE;3ncq*mTWrh z2U&m1ZB?^Y&d-T}?%#3$X8l*~YsR1zk%%*3Qv6oaGc~}&R^#KSObVTfTl=e{sg1;< zumGHjrfI`9DQF5D3m~=NNLLJ5TbqW$(x}v*piCJoHkm;IR-r&}bvlTHa;2du6r=_m zN!0)$kTear4h;lDX#uWS9SsbiL3RBJ!orshb|u;K=d4zts34S<78RkQ1FBMs|QN3+%*IObw(u zT5Cwn031cp zp}{rDWDHyfg+;@)H89$m7)`Ve#TC28!gq8Qlg17p`vUrIAdetdV0*4{1yx=PrvMTLN21_A2-EsT7~)&Oh}E6(SH-%B|HX;!n!!&?2K4(X1D6-L3lZO!;Wy5} zeE*xTZ)fq}3;~7y8{{AH`!8Mp()EuR_(#V7cGtgj{UZkck@3IX_5Vf}Fo*Olaj8_@K4H^@yJJqKb@`?S`Zj@GlgHb{USowlaZ4-CEqLJi4C%b#<V9jy)j7r^kwpME&BLS-^l`Yn_jxb zlUclJ%cj!2uqE5<>2ya3*NS7X`^+?JaYQw~^ZJV4RNu-MCu8p7$3>oxr3m-RMGWGI z)HE)z_Kb1ghm!5RL^<2KaeiAHr`Ase+_wE&j@)zH(u+2?NSg>MKD~1C^WyZ=!E$3b zF@DQvu%)fu;L)%Jx#&pD;ncdTgGeW^HY2A=S&L`i>mYtk``-tlR;^vf4v(pSTCZU>&f zwYA717E0AOxBwND5>P3Gnw%3m2bpDWKbGs<_s)F>t2 z6jwCfome&$?&cN-gET37cE8TONuf%IPSvMX|FO{&(ruM^v?j`nP7=I%()p6v1#|oU zLk1EquV99W8Kh@tmTHCec{f@CQRS5}ZgmQ=l8Jy0-fsh^IySF6UpCT0i=edW)MT0o zwGM$7irIs@T?!6C$B}c5uhv0_uH{|dQt1-0PE9QA?uRAkKaJ`Z(@Mh$zFbauakk1W z-cxvP?r7~OHqDPxBu5w-+PO0I*j^_lZsZyr+27?Jmy%nuV(gfFx^~gddcMfCczAm~ zhN6*(mO1!q){bUdwX5P6m&tG=&&=)|_<_vZBb85>oheugA&VmW9gPL2en+`|?>d`f&B;M<^x}9PPiLmP6HTJi+)~=m+c*8@@Qm*kzCfYXr%Ta%zvu43C97I1 z^OQpL^XD6_`bR~JtT1&EN6#lwXnB(R0Ya+D;7&W+kW%Xw;rkaHcCta8Ja92+`|9{b_~pVLIkax8fjo{zTB1M3ZA?}vyhxrwIk@M` zRvyffyDcH}-kGF%({~`$M({ybTC}py{Dc53Q*Aax@=^7{o}oBH-y64@dTjr+-8|db z5fT29Mm+n=r4z9)AjiPgO3A6h(z_-&L&qac_4-}RJTedzO)YRXB(ZkW6D>OtY~_U3Sc=waI?dvmve(z5ZUlOiJrO;anmTg8=9 z@+vag1@oM|I=2aEYCTy$-r*`nGLxN4@js%-#ha-vmFU;K)1-MlC@OIdF`3@vAaS0A zzw*pJNc)6T#`7zg4t<*3xd@wUYW2^H6BA6Fkw)pocLfhFKf5_gMPG;qN<@63?8+ml zU7oeifki<|HTu|xHgru}=>|#c>xWsxms=8fo{hHmREH%5<=;+oIhW+`)O&k{o@8kQ5KKo35R5e9gT)@{34a65M8uT!=Q0tYXq^UQNg-&h$IcOfyn=v3j z7E+E>1b6zM?t<^%984_|Z>0RPQH~l);=!V~uCKI`-$w`<-guwOnMXzg2w z8f?%zg^_-{q7p5ccy0d!)))Js6Y&<|o}rS7GxV;{b9W}IIHgaS_lm2^{9~AgN~LWO zL`Y4xSU4)Um-wNkfIqfQf((%N}?@_@7hRL&K8$?9d8>83$R0U2~Bb~PqIeHRa0+v+3MDu zO6Sw?sZT%Mekzt<wvAQy8^GR!d0;gZgDZSX$Oxbv=Y3CDBE~(!n`sQL2rm_gdOJAxEJ$&SNf%C2xJqso+ z(pG!LCf!Dgacu_zMsYXhA`T!tKIi#xCPv-$o@oj?y=~N}IXac>+}Rd*VE=e&5r090 zK4E&?Pm;rBD3xDX2y@VJPT11KSUjQOk@kfV?|12a^4#h8qved-D?7((Po_yX6umzk zldG4kArZIEULvMiN>NW+rSRK!%vRSQQa%@LeE6K;x&m`qa&Bzu;^=VW)y4~`!?NQP zuMNgI!5kR^`%|98BOy(mXM0kI=dcGmSQpW6Qf%>NZ}&p3@8f~fy)A|c2qVmjcwTAe)M4aQ+CQGUWRLa5-e#WWCFP1P@eu)5t{W$IYU}jXbGPafxA8)U{lAQ{-B%N9wQN7MhBG5b=A}wIJAM9xT#+d|4SC z*89-SmgC_vB<|pA7$O^< zO$?rDP%bpS2mkZrJ=@f}h`iuEy{Avqp=|o)7UFcJj4sK>X4byw+ZHx&f1wvMJ}tu) z$}tKrcN*2=s$x06+A4}!>Wz}J=TGxwwj+%=6T=6pPYEH9V(XhSd zqH34)!177W+>2#(YC3TrIo!Mi)`)ER;-(zi`?piW4qo4m0%tqvQQT<5rIbiNchVOV z+op-J)V-223#qw^XYUWqs0uo^IJFbmJ?8J|2`YuW>BiCN_(>(&@I1-R@e7J9J`()0 z?ZVjrJF0E|jxpZJn)=ZK9?LlP3kSW-B`!Tdhi@{3hvo&lsN^BHgOimvv+LR-kTR^5 SR1MzD^O+i&8{{8yIsZS{p3)Tn literal 0 HcmV?d00001 diff --git a/apps/txtreader/txtreader.png b/apps/txtreader/txtreader.png new file mode 100644 index 0000000000000000000000000000000000000000..a60ee864722a913e9f359abe54bdce504f32634e GIT binary patch literal 1549 zcmYLJdpMM76o0>Q8RRl9VOx!H7d@I}_mPbmX2eL->?D+F4ZEx)j8r0Kh^=?RMA{;jen*bkbv}O14oGWy0-e^4&Ip+wR%5bohJMtD;B1+D2h zmxuL=UghRr8nQZgJgR_wsL%d2;Y`BILr<34t(~3M$T!O?XlAw()nVyV_oh zDa&$-YmfQHzm|VlS&_?qHrM@@*|iI?5o2N{mv3iGlRitUcL_>o^8cijt#oj_9%f2h zB=H_k7HUTtcJPKbB}OGH8%>EzwA6Z`Z!Yi6f#HAd2&>XsNA-y_K_P)1XS3XLA`MeW zR}vnn<%O{mdnT&ubNjG_ZF?&dc*iO1a_Wl-uPOWonQUlN$#MoL98YR+WsRnwQ_)WJ z-+d5(RmSij;DW#$jw+e9-4{ECQ8RI0yT}rc1E9W^M)eL#c`3WlBNT<1h>MTVjuyL` zP?nLezAsExAe~_|W^C&pt!@0|B*(2D;?AHFzF|4FD{aQ8Zff|8=YmK{f1lJW=46PM zAD2coHT}%J)cE{$+5w=edHeyJXs)X{8zYJD=eVsoz4eNg9y9_;+_x8d?0G6T_^l(d zHWaAb2pcM!)|4&yTydckMn&_U#-K(pK9}0^1GeS`YSSwlnp#*==E~mQ4i@&uHZtc` z3amFpQz7R1C)(cN$o2(YKe_U#)_MN6F%2X-FBE!le~l%3l<2cXESKVK;4;I}LP}D<7V7L@_kIu+)J|`p3Cs5E^{h=W#TLs9QOVP@b#5V4!4lXPakD%|e zZ@rQoZmyhEfwzKKt{O)<*z;4pEYL;}E7(n<X=M2fqV`2qLCf%8U88EU^vm;LLUoYSy7=By;v>)Qdz&QSydARLNLt3mtfP^HWal( zI+wY3B^wN8QI>BO*A*y5Xo*+Kdo4bYB@&@Z@evs+fq?ObPLO9gHWj=Zipc0ELrlGD zxQz=*OR8}XohZ*G6im)S*+eGbwA3-+Jgmr&b@Kg|mx-89un3lH+cx3wX;0@o+H&6* zqZbyG-7_10vxQvAM2U_)dW4g%2&-!`-^R7;gTz-lra^xC+||7y1FxE9fk4d#2PvAK zGfq1&DaNq0YwxxROPjSBFy08%?ra%c9)qI&-@2`DU3n){$)W`re?0>6(pKd{PSy*$ zW!%Mft_ZY0RR^_m_XqExV-oiFu2@#oK*R$iK0uQ)t5}v<@fw_fMIMGPEK8fBS{`-? zG>!f!Lkyh3ZjQB%%R*X2dCe^9ZhSqJuZE`sRYNyPzqjG1yZB9pHP}HKfJ-2(#SU%< zb$_1`6##TojZUGd^U=jUugD0Wv~=d7dl=(3Fp#~n-&c24A~NGdxN%ZS0}xhhLWuE0 z467AxG+mH>Yy6C-`>o}aCPSAM}`!ssj7DX9r`gZE(z&eROhhh oS5&jfmUOGcM&0}W@3vo|vF~W8IN-EfJo@hdG+#RPh7UXIU&u?`tN;K2 literal 0 HcmV?d00001 diff --git a/apps/txtreader/txtreader_transparent.png b/apps/txtreader/txtreader_transparent.png new file mode 100644 index 0000000000000000000000000000000000000000..a60ee864722a913e9f359abe54bdce504f32634e GIT binary patch literal 1549 zcmYLJdpMM76o0>Q8RRl9VOx!H7d@I}_mPbmX2eL->?D+F4ZEx)j8r0Kh^=?RMA{;jen*bkbv}O14oGWy0-e^4&Ip+wR%5bohJMtD;B1+D2h zmxuL=UghRr8nQZgJgR_wsL%d2;Y`BILr<34t(~3M$T!O?XlAw()nVyV_oh zDa&$-YmfQHzm|VlS&_?qHrM@@*|iI?5o2N{mv3iGlRitUcL_>o^8cijt#oj_9%f2h zB=H_k7HUTtcJPKbB}OGH8%>EzwA6Z`Z!Yi6f#HAd2&>XsNA-y_K_P)1XS3XLA`MeW zR}vnn<%O{mdnT&ubNjG_ZF?&dc*iO1a_Wl-uPOWonQUlN$#MoL98YR+WsRnwQ_)WJ z-+d5(RmSij;DW#$jw+e9-4{ECQ8RI0yT}rc1E9W^M)eL#c`3WlBNT<1h>MTVjuyL` zP?nLezAsExAe~_|W^C&pt!@0|B*(2D;?AHFzF|4FD{aQ8Zff|8=YmK{f1lJW=46PM zAD2coHT}%J)cE{$+5w=edHeyJXs)X{8zYJD=eVsoz4eNg9y9_;+_x8d?0G6T_^l(d zHWaAb2pcM!)|4&yTydckMn&_U#-K(pK9}0^1GeS`YSSwlnp#*==E~mQ4i@&uHZtc` z3amFpQz7R1C)(cN$o2(YKe_U#)_MN6F%2X-FBE!le~l%3l<2cXESKVK;4;I}LP}D<7V7L@_kIu+)J|`p3Cs5E^{h=W#TLs9QOVP@b#5V4!4lXPakD%|e zZ@rQoZmyhEfwzKKt{O)<*z;4pEYL;}E7(n<X=M2fqV`2qLCf%8U88EU^vm;LLUoYSy7=By;v>)Qdz&QSydARLNLt3mtfP^HWal( zI+wY3B^wN8QI>BO*A*y5Xo*+Kdo4bYB@&@Z@evs+fq?ObPLO9gHWj=Zipc0ELrlGD zxQz=*OR8}XohZ*G6im)S*+eGbwA3-+Jgmr&b@Kg|mx-89un3lH+cx3wX;0@o+H&6* zqZbyG-7_10vxQvAM2U_)dW4g%2&-!`-^R7;gTz-lra^xC+||7y1FxE9fk4d#2PvAK zGfq1&DaNq0YwxxROPjSBFy08%?ra%c9)qI&-@2`DU3n){$)W`re?0>6(pKd{PSy*$ zW!%Mft_ZY0RR^_m_XqExV-oiFu2@#oK*R$iK0uQ)t5}v<@fw_fMIMGPEK8fBS{`-? zG>!f!Lkyh3ZjQB%%R*X2dCe^9ZhSqJuZE`sRYNyPzqjG1yZB9pHP}HKfJ-2(#SU%< zb$_1`6##TojZUGd^U=jUugD0Wv~=d7dl=(3Fp#~n-&c24A~NGdxN%ZS0}xhhLWuE0 z467AxG+mH>Yy6C-`>o}aCPSAM}`!ssj7DX9r`gZE(z&eROhhh oS5&jfmUOGcM&0}W@3vo|vF~W8IN-EfJo@hdG+#RPh7UXIU&u?`tN;K2 literal 0 HcmV?d00001 From 27bb244d1e7e765c917a901bbf3174507cd52524 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Wed, 5 Feb 2025 09:45:07 +0000 Subject: [PATCH 31/38] remove known warnings from list by default so we can see new errors more clearly (fix #3733) --- bin/sanitycheck.js | 48 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index 5432999eb..5366ab294 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -2,6 +2,31 @@ /* Checks for any obvious problems in apps.json */ +var BASEDIR = __dirname+"/../"; +var APPSDIR_RELATIVE = "apps/"; +var APPSDIR = BASEDIR + APPSDIR_RELATIVE; +var showAllErrors = process.argv.includes("--show-all"); + +if (process.argv.includes("--help")) { + console.log(`BangleApps Sanity Check +------------------------ + +Checks apps in this repository for common issues that might +cause problems. + +USAGE: + +bin/sanitycheck.js + - default, runs all tests (hides known errors) +bin/sanitycheck.js --show-all + - show all warnings/errors (including known ones) +bin/sanitycheck.js --help + - show this message +`); + process.exit(0); +} + + var fs = require("fs"); var vm = require("vm"); var heatshrink = require("../webtools/heatshrink"); @@ -27,9 +52,7 @@ var jsparse = (() => { return str => acorn.parse(str, { ecmaVersion: 2020 }); })(); -var BASEDIR = __dirname+"/../"; -var APPSDIR_RELATIVE = "apps/"; -var APPSDIR = BASEDIR + APPSDIR_RELATIVE; + var knownWarningCount = 0; var knownErrorCount = 0; var warningCount = 0; @@ -38,23 +61,23 @@ function ERROR(msg, opt) { // file=app.js,line=1,col=5,endColumn=7 opt = opt||{}; if (KNOWN_ERRORS.includes(msg)) { - console.log(`Known error : ${msg}`); knownErrorCount++; - } else { - console.log(`::error${Object.keys(opt).length?" ":""}${Object.keys(opt).map(k=>k+"="+opt[k]).join(",")}::${msg}`); - errorCount++; + if (!showAllErrors) return; + msg += " (KNOWN)" } + console.log(`::error${Object.keys(opt).length?" ":""}${Object.keys(opt).map(k=>k+"="+opt[k]).join(",")}::${msg}`); + errorCount++; } function WARN(msg, opt) { // file=app.js,line=1,col=5,endColumn=7 opt = opt||{}; if (KNOWN_WARNINGS.includes(msg)) { - console.log(`Known warning : ${msg}`); knownWarningCount++; - } else { - console.log(`::warning${Object.keys(opt).length?" ":""}${Object.keys(opt).map(k=>k+"="+opt[k]).join(",")}::${msg}`); - warningCount++; + if (!showAllErrors) return; + msg += " (KNOWN)" } + console.log(`::warning${Object.keys(opt).length?" ":""}${Object.keys(opt).map(k=>k+"="+opt[k]).join(",")}::${msg}`); + warningCount++; } /* These are errors that we temporarily allow */ var KNOWN_ERRORS = [ @@ -526,7 +549,8 @@ function sanityCheckLocales(){ promise.then(function() { console.log("=================================="); - console.log(`${errorCount} errors, ${warningCount} warnings (and ${knownErrorCount} known errors, ${knownWarningCount} known warnings)`); + console.log(`${errorCount} errors, ${warningCount} warnings`); + console.log(`${knownErrorCount} known errors, ${knownWarningCount} known warnings${(knownErrorCount||knownWarningCount)?", run with --show-all to see them":""}`); console.log("=================================="); if (errorCount) { process.exit(1); From d7ee6e0fb248115a4e741e50669e512bfa585c25 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Wed, 5 Feb 2025 10:11:55 +0000 Subject: [PATCH 32/38] now check for outdated known warnings/errors --- bin/sanitycheck.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index 5366ab294..e4532b41b 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -57,9 +57,13 @@ var knownWarningCount = 0; var knownErrorCount = 0; var warningCount = 0; var errorCount = 0; +var warningList = []; +var errorList = []; + function ERROR(msg, opt) { // file=app.js,line=1,col=5,endColumn=7 opt = opt||{}; + errorList.push(msg); if (KNOWN_ERRORS.includes(msg)) { knownErrorCount++; if (!showAllErrors) return; @@ -71,6 +75,7 @@ function ERROR(msg, opt) { function WARN(msg, opt) { // file=app.js,line=1,col=5,endColumn=7 opt = opt||{}; + warningList.push(msg); if (KNOWN_WARNINGS.includes(msg)) { knownWarningCount++; if (!showAllErrors) return; @@ -136,7 +141,6 @@ var KNOWN_ERRORS = [ var KNOWN_WARNINGS = [ "App gpsrec data file wildcard .gpsrc? does not include app ID", "App owmweather data file weather.json is also listed as data file for app weather", - "App messagegui storage file messagegui is also listed as storage file for app messagelist", "App carcrazy has a setting file but no corresponding data entry (add `\"data\":[{\"name\":\"carcrazy.settings.json\"}]`)", "App loadingscreen has a setting file but no corresponding data entry (add `\"data\":[{\"name\":\"loadingscreen.settings.json\"}]`)", "App trex has a setting file but no corresponding data entry (add `\"data\":[{\"name\":\"trex.settings.json\"}]`)", @@ -548,6 +552,14 @@ function sanityCheckLocales(){ } promise.then(function() { + KNOWN_ERRORS.forEach(msg => { + if (!errorList.includes(msg)) + WARN(`Known error '${msg}' no longer occurs`); + }); + KNOWN_WARNINGS.forEach(msg => { + if (!warningList.includes(msg)) + WARN(`Known warning '${msg}' no longer occurs`); + }); console.log("=================================="); console.log(`${errorCount} errors, ${warningCount} warnings`); console.log(`${knownErrorCount} known errors, ${knownWarningCount} known warnings${(knownErrorCount||knownWarningCount)?", run with --show-all to see them":""}`); From 52f084778f82de76cab16f035faab0af63da755c Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Wed, 5 Feb 2025 10:16:04 +0000 Subject: [PATCH 33/38] Update locales to avoid some sanity check errors based on month/etc length --- apps/locale/locales.js | 18 +++++++++--------- bin/sanitycheck.js | 28 ---------------------------- 2 files changed, 9 insertions(+), 37 deletions(-) diff --git a/apps/locale/locales.js b/apps/locale/locales.js index c704e0f90..1e3081227 100644 --- a/apps/locale/locales.js +++ b/apps/locale/locales.js @@ -261,7 +261,7 @@ var locales = { ampm: { 0: "am", 1: "pm" }, timePattern: { 0: "%HH:%MM:%SS", 1: "%HH:%MM" }, datePattern: { 0: "%d %B %Y", "1": "%d/%m/%Y" }, // 1 mars 2020 // 01/03/2020 - abmonth: "janv,févr,mars,avril,mai,juin,juil,août,sept,oct,nov,déc", + abmonth: "janv,févr,mars,avr,mai,juin,juil,août,sept,oct,nov,déc", month: "janvier,février,mars,avril,mai,juin,juillet,août,septembre,octobre,novembre,décembre", abday: "dim,lun,mar,mer,jeu,ven,sam", day: "dimanche,lundi,mardi,mercredi,jeudi,vendredi,samedi", @@ -423,7 +423,7 @@ var locales = { ampm: { 0: "am", 1: "pm" }, timePattern: { 0: "%HH:%MM:%SS", 1: "%HH:%MM" }, datePattern: { 0: "%A %B %d %Y", "1": "%d/%m/%y" }, // dimanche 1 mars 2020 // 01/03/20 - abmonth: "janv.,févr.,mars,avril,mai,juin,juil.,août,sept.,oct.,nov.,déc.", + abmonth: "janv,févr,mars,avr,mai,juin,juil,août,sept,oct,nov,déc", month: "janvier,février,mars,avril,mai,juin,juillet,août,septembre,octobre,novembre,décembre", abday: "dim,lun,mar,mer,jeu,ven,sam", day: "dimanche,lundi,mardi,mercredi,jeudi,vendredi,samedi", @@ -452,7 +452,7 @@ var locales = { speed: "kmh", distance: { 0: "m", 1: "km" }, temperature: "°C", - ampm: { 0: "vorm", 1: " nachm" }, + ampm: { 0: "vorm", 1: "nachm" }, timePattern: { 0: "%HH:%MM:%SS", 1: "%HH:%MM" }, datePattern: { 0: "%A, %d. %B %Y", "1": "%d.%m.%Y" }, // Sonntag, 1. März 2020 // 1.3.2020 abmonth: "Jan,Feb,März,Apr,Mai,Jun,Jul,Aug,Sep,Okt,Nov,Dez", @@ -471,7 +471,7 @@ var locales = { ampm: { 0: "AM", 1: "PM" }, timePattern: { 0: "%HH:%MM:%SS", 1: "%HH:%MM" }, datePattern: { 0: "%A %d %B %Y", "1": "%d/%m/%y" }, // dimanche 1 mars 2020 // 01/03/20 - abmonth: "janv.,févr.,mars,avril,mai,juin,juil.,août,sept.,oct.,nov.,déc.", + abmonth: "janv,févr,mars,avr,mai,juin,juil,août,sept,oct,nov,déc", month: "janvier,février,mars,avril,mai,juin,juillet,août,septembre,octobre,novembre,décembre", abday: "dim,lun,mar,mer,jeu,ven,sam", day: "dimanche,lundi,mardi,mercredi,jeudi,vendredi,samedi", @@ -567,7 +567,7 @@ var locales = { ampm: { 0: "am", 1: "pm" }, timePattern: { 0: "%HH:%MM:%SS", 1: "%HH:%MM" }, datePattern: { 0: "%A %d %B de %Y", "1": "%d/%m/%Y" }, // dimenge 1 de març de 2020 // 01/03/2020 - abmonth: "gen.,febr.,març,abril,mai,junh,julh,ago.,set.,oct.,nov.,dec.", + abmonth: "gen,febr,març,abril,mai,junh,julh,ago,set,oct,nov,dec", month: "genièr,febrièr,març,abril,mai,junh,julhet,agost,setembre,octòbre,novembre,decembre", abday: "dg,dl,dm,dc,dj,dv,ds", day: "dimenge,diluns,dimars,dimècres,dijòus,divendres,dissabte", @@ -612,10 +612,10 @@ var locales = { speed: "km/h", distance: { 0: "m", 1: "km" }, temperature: "°C", - ampm: { 0: "dop.", 1: "pop." }, + ampm: { 0: "dop", 1: "pop" }, timePattern: { 0: "%HH:%MM:%SS", 1: "%HH:%MM" }, datePattern: { 0: "%-d. %b %Y", 1: "%-d.%-m.%Y" }, // "3. jan. 2020" // "3.1.2020"(short) - abmonth: "sij.,velj.,ožu.,tra.,svi,lip.,srp.,kol.,ruj.,lis.,stu.,pro.", + abmonth: "sij,velj,ožu,tra,svi,lip,srp,kol,ruj,lis,stu,pro", month: "siječanj,veljača,ožujak,travanj,svibanj,lipanj,srpanj,kolovoz,rujan,listopad,studeni,prosinac", abday: "ned.,pon.,uto.,sri.,čet.,pet.,sub.", day: "nedjelja,ponedjeljak,utorak,srijeda,četvrtak,petak,subota", @@ -628,7 +628,7 @@ var locales = { speed: "km/h", distance: { 0: "m", 1: "km" }, temperature: "°C", - ampm: { 0: "dop.", 1: "pop." }, + ampm: { 0: "dop", 1: "pop" }, timePattern: { 0: "%HH:%MM:%SS", 1: "%HH:%MM" }, datePattern: { 0: "%-d. %b %Y", 1: "%-d.%-m.%Y" }, // "3. jan. 2020" // "3.1.2020"(short) abmonth: "jan.,feb.,mar.,apr.,maj,jun.,jul.,avg.,sep.,okt.,nov.,dec.", @@ -728,7 +728,7 @@ var locales = { ampm: { 0: "am", 1: "pm" }, timePattern: { 0: "%HH:%MM:%SS", 1: "%HH:%MM" }, datePattern: { 0: "%d %B %Y", "1": "%d/%m/%y" }, - abmonth: "gen.,febr.,març,abr.,maig,juny,jul.,ag.,set.,oct.,nov.,des.", + abmonth: "gen,febr,març,abr,maig,juny,jul,ag,set,oct,nov,des", month: "gener,febrer,març,abril,maig,juny,juliol,agost,setembre,octubre,novembre,desembre", abday: "dg.,dl.,dt.,dc.,dj.,dv.,ds.", day: "diumenge,dilluns,dimarts,dimecres,dijous,divendres,dissabte", diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index e4532b41b..75f740d4f 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -88,7 +88,6 @@ function WARN(msg, opt) { var KNOWN_ERRORS = [ "In locale en_CA, long date output must be shorter than 15 characters (Wednesday, September 10, 2024 -> 29)", "In locale fr_FR, long date output must be shorter than 15 characters (10 septembre 2024 -> 17)", - "In locale fr_FR, short month must be shorter than 5 characters", "In locale sv_SE, speed must be shorter than 5 characters", "In locale en_SE, long date output must be shorter than 15 characters (September 10 2024 -> 17)", "In locale en_NZ, long date output must be shorter than 15 characters (Wednesday, September 10, 2024 -> 29)", @@ -97,45 +96,18 @@ var KNOWN_ERRORS = [ "In locale en_IL, long date output must be shorter than 15 characters (Wednesday, September 10, 2024 -> 29)", "In locale es_ES, long date output must be shorter than 15 characters (miércoles, 10 de septiembre de 2024 -> 35)", "In locale fr_BE, long date output must be shorter than 15 characters (dimanche septembre 10 2024 -> 26)", - "In locale fr_BE, short month must be shorter than 5 characters", - "In locale fr_BE, short month must be shorter than 5 characters", - "In locale fr_BE, short month must be shorter than 5 characters", - "In locale fr_BE, short month must be shorter than 5 characters", - "In locale fr_BE, short month must be shorter than 5 characters", "In locale fi_FI, long date output must be shorter than 15 characters (keskiviikkona 10. maaliskuuta 2024 -> 34)", "In locale fi_FI, short month must be shorter than 5 characters", - "In locale fi_FI, short month must be shorter than 5 characters", - "In locale fi_FI, short month must be shorter than 5 characters", - "In locale fi_FI, short month must be shorter than 5 characters", - "In locale fi_FI, short month must be shorter than 5 characters", - "In locale fi_FI, short month must be shorter than 5 characters", - "In locale fi_FI, short month must be shorter than 5 characters", - "In locale fi_FI, short month must be shorter than 5 characters", - "In locale fi_FI, short month must be shorter than 5 characters", - "In locale fi_FI, short month must be shorter than 5 characters", - "In locale fi_FI, short month must be shorter than 5 characters", "In locale de_CH, meridian must be shorter than 4 characters", "In locale de_CH, meridian must be shorter than 4 characters", "In locale de_CH, long date output must be shorter than 15 characters (Donnerstag, 10. September 2024 -> 30)", "In locale fr_CH, long date output must be shorter than 15 characters (dimanche 10 septembre 2024 -> 26)", - "In locale fr_CH, short month must be shorter than 5 characters", - "In locale fr_CH, short month must be shorter than 5 characters", - "In locale fr_CH, short month must be shorter than 5 characters", - "In locale fr_CH, short month must be shorter than 5 characters", - "In locale fr_CH, short month must be shorter than 5 characters", "In locale wae_CH, long date output must be shorter than 15 characters (Sunntag, 10. Herbštmánet 2024 -> 29)", "In locale tr_TR, long date output must be shorter than 15 characters (10 Haziran 2024 Pazartesi -> 25)", "In locale hu_HU, long date output must be shorter than 15 characters (2024 Szep 10, Csütörtök -> 23)", "In locale oc_FR, long date output must be shorter than 15 characters (divendres 10 setembre de 2024 -> 29)", "In locale oc_FR, short month must be shorter than 5 characters", - "In locale oc_FR, short month must be shorter than 5 characters", - "In locale hr_HR, meridian must be shorter than 4 characters", - "In locale hr_HR, meridian must be shorter than 4 characters", - "In locale hr_HR, short month must be shorter than 5 characters", - "In locale sl_SI, meridian must be shorter than 4 characters", - "In locale sl_SI, meridian must be shorter than 4 characters", "In locale ca_ES, long date output must be shorter than 15 characters (10 setembre 2024 -> 16)", - "In locale ca_ES, short month must be shorter than 5 characters", ]; /* These are warnings we know about but don't want in our output */ var KNOWN_WARNINGS = [ From c51785467c006b5521def8985b0602e013719653 Mon Sep 17 00:00:00 2001 From: thyttan <97237430+thyttan@users.noreply.github.com> Date: Wed, 5 Feb 2025 23:11:02 +0100 Subject: [PATCH 34/38] sched: fix type re hidden set to false hiding widget --- apps/sched/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sched/README.md b/apps/sched/README.md index 1216a1a11..0fa780405 100644 --- a/apps/sched/README.md +++ b/apps/sched/README.md @@ -49,7 +49,7 @@ Alarms are stored in an array in `sched.json`, and take the form: // e.g. repeat every 2 months: { interval: "month", num: 2 }. // Supported intervals: day, week, month, year vibrate : "...", // OPTIONAL pattern of '.', '-' and ' ' to use for when buzzing out this alarm (defaults to '..' if not set) - hidden : false, // OPTIONAL if false, the widget should not show an icon for this alarm + hidden : false, // OPTIONAL if true, the widget should not show an icon for this alarm as : false, // auto snooze timer : 5*60*1000, // OPTIONAL - if set, this is a timer and it's the time in ms del : false, // OPTIONAL - if true, delete the timer after expiration From 45844692917d8000ce196574a0a7a9e2b6d00636 Mon Sep 17 00:00:00 2001 From: tonykakuuu Date: Thu, 6 Feb 2025 22:28:36 +0100 Subject: [PATCH 35/38] Implemented offsets, support larger files & general performance increase --- apps/txtreader/app.js | 55 ++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/apps/txtreader/app.js b/apps/txtreader/app.js index 890b4254c..bc6bec708 100644 --- a/apps/txtreader/app.js +++ b/apps/txtreader/app.js @@ -14,72 +14,73 @@ function showFileSelector() { }; }); - menuItems['< Back'] = () => { load(); }; // Go back to the launcher or previous screen + menuItems['< Back'] = () => { load(); }; E.showMenu(menuItems); } function onFileSelected(file) { + const fileSize = require("Storage").read(file, 0, 0).length; + const chunkSize = 1024; + let currentOffset = 0; + let currentPage = 1; + let history = []; - var text = require("Storage").read(file); - - function displayText(text, startLine, pageNumber) { + function displayText(offset, pageNumber) { g.clear(); g.setFont("6x8", 1); g.setColor(1); g.drawString("Page " + pageNumber, 10, 2); - g.drawString(file, g.getWidth()-file.length*6, 2); + //g.drawString("Offset " + offset, 60, 2); + g.drawString(file, g.getWidth() - file.length * 6, 2); + var text = require("Storage").read(file, offset, chunkSize); var lines = text.split("\n"); var y = 15; // Text start, top row reserved for page number - var currentLine = startLine || 0; - var linesDisplayed = 0; //Per page + var linesDisplayed = 0; // Lines per page + var totalCharsDisplayed = 0; // Total characters per page - for (var i = currentLine; i < lines.length; i++) { + for (var i = 0; i < lines.length; i++) { var wrappedLines = g.wrapString(lines[i], g.getWidth() - 20); for (var j = 0; j < wrappedLines.length; j++) { g.drawString(wrappedLines[j], 10, y); y += 10; // Move down for the next line linesDisplayed++; + totalCharsDisplayed += wrappedLines[j].length + (j < wrappedLines.length - 1 ? 0 : 1); // Add newline character for the last wrapped line if (y >= g.getHeight() - 10) { // If we run out of space, stop drawing - return { nextStartLine: i , linesDisplayed: linesDisplayed }; + return { nextOffset: offset + totalCharsDisplayed, linesDisplayed: linesDisplayed }; } } } return null; // No more lines to display } - var currentStartLine = 0; - var currentPage = 1; - var history = []; // Track the start line and lines displayed for each page - // Initial display - var result = displayText(text, currentStartLine, currentPage); - history.push({ startLine: currentStartLine, linesDisplayed: result.linesDisplayed }); + var result = displayText(currentOffset, currentPage); + history.push({ offset: currentOffset, linesDisplayed: result.linesDisplayed }); // Handle touch events Bangle.on('touch', function(button) { if (button === 2) { // Right side of the screen (next page) - var nextStartLine = displayText(text, currentStartLine, currentPage + 1); - if (nextStartLine !== null) { - currentStartLine = nextStartLine.nextStartLine; + var nextOffset = displayText(currentOffset, currentPage + 1); + if (nextOffset !== null) { + currentOffset = nextOffset.nextOffset; currentPage++; - history.push({ startLine: currentStartLine, linesDisplayed: nextStartLine.linesDisplayed }); - displayText(text, currentStartLine, currentPage); + history.push({ offset: currentOffset, linesDisplayed: nextOffset.linesDisplayed }); + displayText(currentOffset, currentPage); } else { - currentStartLine = 0; + currentOffset = 0; currentPage = 1; - history = [{ startLine: currentStartLine, linesDisplayed: result.linesDisplayed }]; - displayText(text, currentStartLine, currentPage); + history = [{ offset: currentOffset, linesDisplayed: result.linesDisplayed }]; + displayText(currentOffset, currentPage); } } else if (button === 1) { // Left side of the screen (previous page) if (currentPage > 1) { - // Go back to the previous page - history.pop(); // Remove the current page from history + history.pop(); // Remove current page from history var previousPage = history[history.length - 1]; - currentStartLine = previousPage.startLine; + currentOffset = previousPage.offset; currentPage--; - displayText(text, currentStartLine, currentPage); + displayText(currentOffset, currentPage); } } }); From a339c9fb634452f55ac65fb0b1ed169ab4357cf0 Mon Sep 17 00:00:00 2001 From: tonykakuuu Date: Thu, 6 Feb 2025 22:31:09 +0100 Subject: [PATCH 36/38] Unused variable --- apps/txtreader/app.js | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/txtreader/app.js b/apps/txtreader/app.js index bc6bec708..df61a2783 100644 --- a/apps/txtreader/app.js +++ b/apps/txtreader/app.js @@ -19,7 +19,6 @@ function showFileSelector() { } function onFileSelected(file) { - const fileSize = require("Storage").read(file, 0, 0).length; const chunkSize = 1024; let currentOffset = 0; let currentPage = 1; From e21979bd0815a4863e1ef1f57f22316d2252723d Mon Sep 17 00:00:00 2001 From: Brian Whelan Date: Fri, 7 Feb 2025 21:52:01 +0000 Subject: [PATCH 37/38] New app "Shortcuts" Adds a new app that allows you to pin apps to clockfaces that support clock_info --- apps/clkshortcuts/ChangeLog | 1 + apps/clkshortcuts/README.md | 10 + .../clkshortcuts/add_shortcuts_screenshot.png | Bin 0 -> 471 bytes apps/clkshortcuts/app-icon.js | 1 + apps/clkshortcuts/app.js | 224 ++++++++++++++++++ apps/clkshortcuts/app.png | Bin 0 -> 1131 bytes apps/clkshortcuts/clkinfo.js | 45 ++++ .../example_shortcuts_screenshot.png | Bin 0 -> 622 bytes apps/clkshortcuts/metadata.json | 17 ++ 9 files changed, 298 insertions(+) create mode 100644 apps/clkshortcuts/ChangeLog create mode 100644 apps/clkshortcuts/README.md create mode 100644 apps/clkshortcuts/add_shortcuts_screenshot.png create mode 100644 apps/clkshortcuts/app-icon.js create mode 100644 apps/clkshortcuts/app.js create mode 100644 apps/clkshortcuts/app.png create mode 100644 apps/clkshortcuts/clkinfo.js create mode 100644 apps/clkshortcuts/example_shortcuts_screenshot.png create mode 100644 apps/clkshortcuts/metadata.json diff --git a/apps/clkshortcuts/ChangeLog b/apps/clkshortcuts/ChangeLog new file mode 100644 index 000000000..759f68777 --- /dev/null +++ b/apps/clkshortcuts/ChangeLog @@ -0,0 +1 @@ +0.01: New app! \ No newline at end of file diff --git a/apps/clkshortcuts/README.md b/apps/clkshortcuts/README.md new file mode 100644 index 000000000..0d4b72318 --- /dev/null +++ b/apps/clkshortcuts/README.md @@ -0,0 +1,10 @@ +# Shortcuts + +An app that allows you to create custom ClockInfos that act as shortcuts to your favourite apps. + +## Create a Shortcut +After installing the app, you can open the app to add and manage existing shortcuts. If no shortcuts exist, the app will display a ``[+] Shortcuts`` button as a ClockInfo on your Clock (see screenshots), which when clicked will quickly launch into the app so you can add new shortcuts. + +When adding a shortcut, first select the app you wish to use, then select the icon you wish to register to the shortcut. If a keyboard is installed, you'll get the option to rename the shortcut before saving. + +Once created, your shortcut will appear on any Clocks with ClockInfo support, and tapping the shortcut will launch the chosen app \ No newline at end of file diff --git a/apps/clkshortcuts/add_shortcuts_screenshot.png b/apps/clkshortcuts/add_shortcuts_screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..ea7c6273b9f3d4ab4ad05105873455f8224660f8 GIT binary patch literal 471 zcmeAS@N?(olHy`uVBq!ia0vp^8$g(a8A!&?{Fw`+7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h2Ka=yGW=)w|NlRb7uwr89VA%b5n0T@z;_sg8IR|$NCBD>?&;zfl5y|t zbk0f53L>m0dH>vFcvpXdaf-_UR?YuCX}caX{dl7#GF5`1;j+h3(@4{e9ojei=AYE+ zifxUV7%KXFdvg4pIj(zz;@+%3q2%`G^`ocNA3W~NaE)n^%M{{$2&S+btzkmMCh?l3r5-k<)on|_~=Er%&U#wfGL-2oN zg%5M}I`PA`m8WLNZ+h+9A$Z>}C-`#Z$KO4zH@w`^EOVTCeyBZS-6ZGS^FzKn_iC5K zN7Y9;rxaH|ws>ou?)15lccW|1k8_VsJNEq0J_0tFnZd#O*dK=X$!@D#>el%K!=1s? L)z4*}Q$iB}H6zec literal 0 HcmV?d00001 diff --git a/apps/clkshortcuts/app-icon.js b/apps/clkshortcuts/app-icon.js new file mode 100644 index 000000000..99f51a2e8 --- /dev/null +++ b/apps/clkshortcuts/app-icon.js @@ -0,0 +1 @@ +require("heatshrink").decompress(atob("mEw4UB/4ACBIM889VAHmqAAwKCrQLH0oLCuBoFhoLCtJ1HtILBtYLH9ILBtALHlILQlRFCwALSnWwgECBY8O1gLJgeoBaojLHZfqAQILIFwMDBY8CFwMO2QLGhwuBlWuBY0K4ED1aDHBYJUBlQLGnRUChQLIKgJHHBYJUBZY8KgZUBBZHCKgILHh2CBZMC0fABZC+CBZBSBC5JUB14MDcY2q1YLIDAILGtY4EAAXpBYNpBY9pBYNauAKFhulBYWqAAwLCqoLHBQQA6A=")) \ No newline at end of file diff --git a/apps/clkshortcuts/app.js b/apps/clkshortcuts/app.js new file mode 100644 index 000000000..197ca70cf --- /dev/null +++ b/apps/clkshortcuts/app.js @@ -0,0 +1,224 @@ +var storage = require("Storage"); +var keyboard = "textinput"; +try { + keyboard = require(keyboard); +} catch (e) { + keyboard = null; +} + +var icons = [ + {name:"agenda", img :"GBiBAAAAAAA8AAB+AA/n8B/n+BgAGBgAGBn/mBn/mBgAGBgAGBn/mBn/+BgD/BgHDhn+Bhn8MxgMIxgMIx/8Ew/+BgAHDgAD/AAA8A=="}, + {name:"alarm", img:"GBiBAAAAAAAAAAYAYA4AcBx+ODn/nAOBwAcA4A4YcAwYMBgYGBgYGBgYGBgYGBgeGBgHGAwBMA4AcAcA4AOBwAH/gAB+AAAAAAAAAA=="}, + {name:"mail", img:"GBiBAAAAAAAAAAAAAAAAAB//+D///DAADDgAHDwAPDcA7DPDzDDnDDA8DDAYDDAADDAADDAADDAADD///B//+AAAAAAAAAAAAAAAAA=="}, + {name:"android", img: "GBiBAAAAAAEAgAD/AAD/AAHDgAGBgAMkwAMAwAP/wBv/2BsA2BsA2BsA2BsA2BsA2BsA2Bv/2AP/wADnAADnAADnAADnAADnAAAAAA=="}, + {name:"add", img:"GBiBAAAAAAAAAAAAAA//8B//+BgAGBgAGBgYGBgYGBgYGBgYGBn/mBn/mBgYGBgYGBgYGBgYGBgAGBgAGB//+A//8AAAAAAAAAAAAA=="}, + {name:"bangle", img:"GBiBAAD+AAH+AAH+AAH+AAH/AAOHAAYBgAwAwBgwYBgwYBgwIBAwOBAwOBgYIBgMYBgAYAwAwAYBgAOHAAH/AAH+AAH+AAH+AAD+AA=="}, + {name:"bike", img:"GBiBAAAAAAAAAAAAAAAD+AAD/AADjAABjAfhnAfjyAMDwAcGwB4O+H8M/GGZ5sD7c8fzM8fjM8DDA2GBhn8B/h4AeAAAAAAAAAAAAA=="}, + {name:"map", img:"GBiBAAAAAAAAAAAAAADgGAf8+B//+BjHGBjDGBjDGBjDGBjDGBjDGBjDGBjDGBjDGBjDGBjDGBjjGB//+B8/4BgHAAAAAAAAAAAAAA=="}, + {name:"play", img:"GBiBAAAAAAAAAAAAAA//8B//+BgAGBjAGBjwGBj8GBjeGBjHmBjB2BjB2BjHmBjeGBj8GBjwGBjAGBgAGB//+A//8AAAAAAAAAAAAA=="}, + {name:"fast forward", img:"GBiBAAAAAAAAAAAAAH///v///8AAA8YYA8eeA8f/g8b7w8Y488YYO8YYO8Y488b7w8f/g8eeA8YYA8AAA////3///gAAAAAAAAAAAA=="}, + {name:"rewind", img:"GBiBAAAAAAAAAAAAAH///v///8AAA8AYY8B548H/48PfY88cY9wYY9wYY88cY8PfY8H/48B548AYY8AAA////3///gAAAAAAAAAAAA=="}, + {name:"timer", img:"GBiBAAAAAAB+AAB+AAAAMAB+OAH/nAOByAcA4A4YcAwYMBgYGBgYGBgYGBgYGBgAGBgAGAwAMA4AcAcA4AOBwAH/gAB+AAAAAAAAAA=="}, + {name:"connected", img:"GBiBAAAAAAAAAAAAAA//8B//+BgAGBgAGBngGBn4GBgcGBgOGBnHGBnzGBgxmBgZmBmZmBmZmBgAGBgAGB//+A//8AAAAAAAAAAAAA=="}, + {name:"lock", img:"GBiBAAAAAAA8AAD/AAHDgAGBgAMAwAMAwAMAwAf/4A//8AwAMAwAMAwAMAwYMAw8MAw8MAwYMAwAMAwAMAwAMA//8Af/4AAAAAAAAA=="}, + {name:"battery", img:"GBiBAAAAAAAAAAB+AAB+AAHngAPnwAMAwAMAwAMIwAMIwAMYwAM4wAM+wAN8wAMcwAMYwAMQwAMQwAMAwAMAwAP/wAH/gAAAAAAAAA=="}, + {name:"game", img:"GBiBAAAAAAAAAAAAAAA8AAB+AABmAABmAAB+AAA8AAAYAAAYAAAYAAMYAA//8B//+BgAGBgAGBgAGBgAGB//+A//8AAAAAAAAAAAAA=="}, + {name:"dice", img:"GBiBAAAAAB//8D//+HAAPGMDHmeHnmeHnmMDHmAAHmMDHmeHnmeHnmMDHmAAHmMDHmeHnmeHnmMDHnAAPn///j///h///g///AAAAA=="}, + {name:"gear", img:"GBiBAAAAAAAAAAA8AAB+AABmAA3nsA/D8B8A+Dg8HBx+OAznMAzDMAzDMAznMBx+ODg8HB8A+A/D8A3nsABmAAB+AAA8AAAAAAAAAA=="}, + {name:"wrench", img:"GBiBAAAAAAAAAAAAAAAHgAAfwAA7gAAzEABjOABj+ABh+ABgGADgMAHAcAOP4AcfgA44AB9wADHgADHAADGAAB8AAA4AAAAAAAAAAA=="}, + {name:"calendar", img:"FhgBDADAMAMP/////////////////////8AADwAAPAAA8AADwAAPAAA8AADwAAPAAA8AADwAAPAAA8AADwAAP///////"}, + {name:"power", img:"GBiBAAAAAAAAAAB+AAH/gAeBwA4YcAwYMBjbGBnbmDGZjDMYzDMYzDMAzDMAzDGBjBnDmBj/GAw8MA4AcAeB4AH/gAB+AAAAAAAAAA=="}, + {name:"terminal", img:"GBiBAAAAAAAAAAAAAA//8B//+B//+B//+B//+BgAGBgAGBgAGBmAGBjAGBhgGBhgGBjAGBmPmBgAGBgAGB//+A//8AAAAAAAAAAAAA=="}, + {name:"camera", img:"GBiBAAAAAAAAAAD/AAH/gAMAwD8A/H8A/mA8BmD/BmHDhmGBhmMAxmMAxmMAxmMAxmGBhmHDhmD/BmA8BmAABn///j///AAAAAAAAA=="}, + {name:"phone", img:"GBiBAAAAAAAAAAOAAA/AABzgADBgADBgADBgABjgABjAABzAAAxgAA5wAAc58AMf+AGHHADgDABwDAA8GAAfGAAH8AAA4AAAAAAAAA=="}, + {name:"two prong plug", img:"GBiBAAABgAADwAAHwAAPgACfAAHOAAPkBgHwDwP4Hwf8Pg/+fB//OD//kD//wD//4D//8D//4B//QB/+AD/8AH/4APnwAHAAACAAAA=="}, + {name:"steps", img:"GBiBAAcAAA+AAA/AAA/AAB/AAB/gAA/g4A/h8A/j8A/D8A/D+AfH+AAH8AHn8APj8APj8AHj4AHg4AADAAAHwAAHwAAHgAAHgAADAA=="}, + {name:"graph", img:"GBiBAAAAAAAAAAAAAAAAAAAAAADAAADAAAHAAAHjAAHjgAPngH9n/n82/gA+AAA8AAA8AAAcAAAYAAAYAAAAAAAAAAAAAAAAAAAAAA=="}, + {name:"hills", img:"GBiBAAAAAAAAAAAAAAAAAAAAAAACAAAGAAAPAAEZgAOwwAPwQAZgYAwAMBgAGBAACDAADGAABv///////wAAAAAAAAAAAAAAAAAAAA=="}, + {name:"sun", img:"GBiBAAAYAAAYAAAYAAgAEBwAOAx+MAD/AAHDgAMAwAcA4AYAYOYAZ+YAZwYAYAcA4AMAwAHDgAD/AAx+MBwAOAgAEAAYAAAYAAAYAA=="}, + {name:"home", img:"GBiBAAAAAAAAAAAAAAH/gAP/wAdg4A5wYA44MBwf+DgP/BgAGBgAGBgAGBnnmBnnmBnnmBnnmBngGBngGB//+B//+AAAAAAAAAAAAA=="}, + {name:"bell", img:"GBiBAAAAAAAAAAAfgAB/2ADw+AHAMAOAGAcAGD4ADHgADDgADBwADA4AHAcAGAOAOAHAcAPg4ANxwAM5gAP/AAHvAAAHAAACAAAAAA=="}, + {name:"bin", img:"GBiBAAAAAAAAAAB+AB//+B//+AwAMAwAMAxmMAZmYAZmYAZmYAZmYAZmYAZmYAZmYAZmYAZmYANmwAMAwAMAwAP/wAH/gAAAAAAAAA=="}, +]; + +let storedApps; +var showMainMenu = () => { + storedApps = storage.readJSON("clkshortcuts.json", 1) || {}; + + var mainMenu = { + "": { + title: "Shortcuts", + }, + "< Back": () => { + load(); + }, + "New": () => { + // Select the app + getSelectedApp().then((app) => { + getSelectedIcon().then((icon) => { + promptForRename(app.name).then((name) => { + E.showMessage("Saving..."); + storedApps[app.src] = { + name: name, src: app.src, icon: icon + }; + storage.writeJSON("clkshortcuts.json", storedApps); + showMainMenu(); + }).catch(() => { + E.showMessage("Saving..."); + storedApps[app.src] = { + name: app.name, src: app.src, icon: icon + }; + storage.writeJSON("clkshortcuts.json", storedApps); + showMainMenu(); + } ); + }).catch(() => {showMainMenu();}); + }).catch(() => {showMainMenu();}); + }, + }; + getStoredAppsArray(storedApps).forEach((app) => { + mainMenu[app.name] = { + onchange: () => { + showEditMenu(app).then((dirty) => { + if (dirty) { + E.showMessage("Saving..."); + storage.writeJSON("clkshortcuts.json", storedApps); + } + showMainMenu(); + }); + }, + format: v=>"\0" + atob(app.icon) + }; + }); + E.showMenu(mainMenu); +}; + +var showEditMenu = (app) => { + return new Promise((resolve, reject) => { + var editMenu = { + "": { + title: "Edit " + app.name, + }, + "< Back": () => { + resolve(false); + }, + "Name":{ + onchange: () => { + promptForRename(app.name).then((name) => { + storedApps[app.src].name = name; + resolve(true); + }).catch(); + }, + format: v=>app.name.substring(0, 7) + }, + "Icon": { + onchange: () => { + getSelectedIcon().then((icon) => { + storedApps[app.src].icon = icon; + resolve(true); + }).catch(() => resolve(false)); + }, + format: v=>"\0" + atob(app.icon) + }, + "Delete": { + onchange: () => { + delete storedApps[app.src] + resolve(true); + }, + format: v=>"\0" + atob("GBiBAAAAAAAAAAB+AB//+B//+AwAMAwAMAxmMAZmYAZmYAZmYAZmYAZmYAZmYAZmYAZmYAZmYANmwAMAwAMAwAP/wAH/gAAAAAAAAA==") + } + }; + E.showMenu(editMenu); + }); +}; + +var promptForRename = (name) => { + return new Promise((resolve, reject) => { + if (!keyboard) { reject("No textinput is available"); } + else { + return require("textinput").input({text:name}).then((result) => resolve(result)); + } + }); +}; + +var getStoredAppsArray = (apps) => { + var appList = Object.keys(apps); + var storedAppArray = []; + for (var i = 0; i < appList.length; i++) { + var app = "" + appList[i]; + storedAppArray.push( + apps[app] + ); + } + return storedAppArray; +}; + +var getSelectedIcon = () => { + return new Promise((resolve, reject) => { + var iconMenu = { + "": { + title: "Select Icon", + }, + "< Back": () => { + reject("The user cancelled the operation"); + }, + }; + + icons.forEach((icon) => { + iconMenu["\0" + atob(icon.img) + " " + icon.name] = () => { + resolve(icon.img); + }; + }); + + E.showMenu(iconMenu); + }); +}; + +var getAppList = () => { + var appList = storage + .list(/\.info$/) + .map((appInfoFileName) => { + var appInfo = storage.readJSON(appInfoFileName, 1); + return ( + appInfo && { + name: appInfo.name, + sortorder: appInfo.sortorder, + src: appInfo.src, + } + ); + }) + .filter((app) => app && !!app.src); + appList.sort((a, b) => { + var n = (0 | a.sortorder) - (0 | b.sortorder); + if (n) return n; + if (a.name < b.name) return -1; + if (a.name > b.name) return 1; + return 0; + }); + + return appList; +}; + +var getSelectedApp = () => { + return new Promise((resolve, reject) => { + E.showMessage("Loading apps..."); + var selectAppMenu = { + "": { + title: "Select App", + }, + "< Back": () => { + reject("The user cancelled the operation"); + }, + }; + + var appList = getAppList(); + appList.forEach((app) => { + selectAppMenu[app.name] = () => { + resolve(app); + }; + }); + + E.showMenu(selectAppMenu); + }); +}; + +showMainMenu(); \ No newline at end of file diff --git a/apps/clkshortcuts/app.png b/apps/clkshortcuts/app.png new file mode 100644 index 0000000000000000000000000000000000000000..66e28fde79af1045cfc8f2a1ea3ebbd8b2a7c204 GIT binary patch literal 1131 zcmV-x1eE)UP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf6951U69E94oEQKA1OQ1yK~!i%?U_9+ zWKk5yuSoLP7`%QAk95G{ml+M4}=jqFd8Q6tgO|LZwuRPPZFE6lla(XoUER zkHqW_cH-mgIcM*keTV#aGm8f#V?$Dk5m)$?+HJ%gMM-$xa-dvLKPa)6BpT&_5w6wJFC`F@&h6Wua zIvnZ1?d`4Ji=3sUCB5e?eBnqrKR<`6sw(y=D=XtAP=d4_V}}wW3T%ZsQC(fle$hbZB_v3+R zWUTD(??Y*6Df^X_l)&EJo~{Xvv>juI5+e$1*xA{EoSYo?sjI7li;D|g6CPFkY`0Iy*b9 zNkCp+9_;S!29E8p_=>R&+||{^Hg30DmjpvMGjm^{(Vv)@fTpG35iSF)h=C(4h z@Z~ z%nWY_1_o3?K>_c-H&H*0_Vo1dc5G}+;i|;@xNP#awY8PE@g(dNB4{Z!Z()OjgIq>; z*r};0czSx`W2Z3rpv2gAfLL8!#{r$bJaTb#gN{pxj#N6B*q^72_eN9ab zEH5wX8s{+ipu~tfKrAjULUD0%pdorP9UmWum6a7ZJ39k>Gt-vQVdA31utOx!(mFCS z61W4ul*{FU(a}+D9T}E5K{)nKOiQcB<57o)hiZCyTJ`q!DtwSr+1c3&lh;|puCir6#A4+PQyA*+`t^7`n*m*6Ud2va12X6QaKH^iEUHzQT^Z`=(i3z xegsAQi^)K}rc=j1JYuXj|Kv-MAi;-6soz#qUFcx}E6o4^002ovPDHLkV1iM-87BY$ literal 0 HcmV?d00001 diff --git a/apps/clkshortcuts/clkinfo.js b/apps/clkshortcuts/clkinfo.js new file mode 100644 index 000000000..842ae2747 --- /dev/null +++ b/apps/clkshortcuts/clkinfo.js @@ -0,0 +1,45 @@ +(function() { + var storage = require("Storage"); + var storedApps = storage.readJSON("clkshortcuts.json", 1) || {}; + var items = []; + if (Object.keys(storedApps).length !== 0) { + for (var key in storedApps) { + var source = { + name: storedApps[key].name, + img: storedApps[key].icon, + src: storedApps[key].src, + get : function() { + return { + text : this.name, + img : atob(this.img) + } + }, + run: function() { load(this.src);}, + show : function() {}, + hide : function() {}, + } + items.push(source); + } + } + else { + var source = { + name: "Shortcuts", + img: "GBiBAAAAAAAAAAAAAA//8B//+BgAGBgAGBgYGBgYGBgYGBgYGBn/mBn/mBgYGBgYGBgYGBgYGBgAGBgAGB//+A//8AAAAAAAAAAAAA==", + src: "clkshortcuts.app.js", + get : function() { + return { + text : this.name, + img : atob(this.img) + } + }, + run: function() { load(this.src);}, + show : function() {}, + hide : function() {}, + }; + items = [source]; + } + return { + name: "Shortcuts", + items: items + }; +}) \ No newline at end of file diff --git a/apps/clkshortcuts/example_shortcuts_screenshot.png b/apps/clkshortcuts/example_shortcuts_screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..b60a57f5743622691d2ac5c937c4d36887896d39 GIT binary patch literal 622 zcmV-!0+IcRP)Px#1ZP1_K>z@;j|==^1poj52~bQ_MF9T*|Ns900032ug_i&T010qNS#tmY4#NNd z4#NS*Z>VGd00HhvL_t(&-tCtSmV+P+gy9B;8-)8Ga`|+f}a^bTVkCEW*qifr9 z+@k9sY6HP`%WZ)ZO&B}mp+@U@C8q`k@fdjSfOF4ootIj?yjRva_GZ z!@$zq11quq^e2cKQ&p9jC^ExpsbE1?Sc z-PPuN75x{=Q+gioeE&=#2!d`9Ew1^6YSDhFs&`iRI+9;9dU1P&y8!EJV5)-2@4!O1N{5h|ohVD5ok z+eE;G4%b6L?i7m_V6zW}kJmM@t%IXCrc1n|6pGOCnPhko>6XmD;27l;qyo$%!9|ua z9i|%zu&Jk8+-?Ue(k^#4Gr5@k^(n2K$v3}N==xd_xBI~m1T|y_3E-K*G)Mpg`~cYG z#7@6A=`Ig3 Date: Sun, 9 Feb 2025 11:05:20 +0100 Subject: [PATCH 38/38] Set font color to g.theme.fg --- apps/txtreader/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/txtreader/app.js b/apps/txtreader/app.js index df61a2783..1e4fd30e9 100644 --- a/apps/txtreader/app.js +++ b/apps/txtreader/app.js @@ -27,7 +27,7 @@ function onFileSelected(file) { function displayText(offset, pageNumber) { g.clear(); g.setFont("6x8", 1); - g.setColor(1); + g.setColor(g.theme.fg); g.drawString("Page " + pageNumber, 10, 2); //g.drawString("Offset " + offset, 60, 2); g.drawString(file, g.getWidth() - file.length * 6, 2);