diff --git a/docs/api.md b/docs/api.md
index 9556a83f..11666cba 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -376,7 +376,7 @@ You can adjust each property in the JSON object according to your preferences. I
| `TEFF` | number | Choose between app transition effects. | 0–10 | 1 |
| `TSPEED` | number | Time taken for the transition to the next app in milliseconds. | Positive integer | 500 |
| `TCOL` | string/array of ints | Global text color. | RGB array or hex color | N/A |
-| `TMODE` | integer | Changes the time app style. | 0–6 | 1 |
+| `TMODE` | integer | Changes the time app style. | 0–8 | 1 |
| `CHCOL` | string/array of ints | Calendar header color of the time app. | RGB array or hex color |`#FF0000`|
| `CBCOL` | string/array of ints | Calendar body color of the time app. | RGB array or hex color |`#FFFFFF`|
| `CTCOL` | string/array of ints | Calendar text color in the time app. | RGB array or hex color |`#000000` |
diff --git a/docs/apps.md b/docs/apps.md
index db4f650a..50dc5bd4 100644
--- a/docs/apps.md
+++ b/docs/apps.md
@@ -45,6 +45,18 @@ The top row shows the hour, the middle row shows the minutes, and the bottom row
Each row has six dots, where lit dots represent binary "1" and white dots represent binary "0".
To read the time, convert the lit dots in each row to a decimal number.
+**TMODE=7**
+
+Adds an icon to the left side of the time display.
+If a GIF named `time.gif` exists in the root directory, it will be used instead of the default clock icon.
+Both 8X8 and 32X8 GIFs are supported.
+If the weekday bar is enabled, it will be displayed at the bottom of the screen.
+
+**TMODE=8**
+
+Same as `TMODE=7`, but moves the weekday bar to the top of the screen.
+
+
#### **Available Time Formats:**
| Format | Example | Description |
|--------------|------------|--------------------------------------------|
diff --git a/docs/assets/TMODE7.png b/docs/assets/TMODE7.png
new file mode 100644
index 00000000..3159364d
Binary files /dev/null and b/docs/assets/TMODE7.png differ
diff --git a/docs/assets/TMODE8.png b/docs/assets/TMODE8.png
new file mode 100644
index 00000000..7e1786c8
Binary files /dev/null and b/docs/assets/TMODE8.png differ
diff --git a/src/Apps.cpp b/src/Apps.cpp
index 378915e7..6abaef9e 100644
--- a/src/Apps.cpp
+++ b/src/Apps.cpp
@@ -203,6 +203,33 @@ void TimeApp(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x,
return;
}
+ // draw clock icon
+ if (TIME_MODE == 7 || TIME_MODE == 8)
+ {
+ // use time.gif if available, otherwise use default clock icon
+ static File TIME_ICON_GIF;
+ static bool TIME_ICON_ISGIF = false;
+ static uint16_t TIME_ICON_CURRENTFRAME = 0;
+ if (!TIME_ICON_ISGIF)
+ {
+ if (LittleFS.exists("/time.gif"))
+ {
+ TIME_ICON_GIF = LittleFS.open("/time.gif");
+ TIME_ICON_ISGIF = true;
+ TIME_ICON_CURRENTFRAME = 0;
+ }
+ }
+ if (TIME_ICON_ISGIF)
+ {
+ gifPlayer->playGif(x, y, &TIME_ICON_GIF, TIME_ICON_CURRENTFRAME);
+ TIME_ICON_CURRENTFRAME = gifPlayer->getFrame();
+ }
+ else
+ {
+ matrix->drawRGBBitmap(x, y, icon_13, 8, 8); // default clock icon
+ }
+ }
+
if (TIME_COLOR > 0)
{
DisplayManager.setTextColor(TIME_COLOR);
@@ -235,7 +262,7 @@ void TimeApp(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x,
int16_t wdPosY;
int16_t timePosY;
- if (TIME_MODE == 2 || TIME_MODE == 4)
+ if (TIME_MODE == 2 || TIME_MODE == 4 || TIME_MODE == 8)
{
// week days on top line
wdPosY = 0;
@@ -252,7 +279,7 @@ void TimeApp(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x,
DisplayManager.printText(12 + x, timePosY + y, t, TIME_MODE == 0, 2);
// day of month in calendar box
- if (TIME_MODE > 0)
+ if (TIME_MODE > 0 && TIME_MODE < 7)
{
int offset;
char day_str[3];