2022-02-19 01:58:08 +00:00
|
|
|
# Imageclock
|
|
|
|
|
|
|
|
This app is a highly customizable watchface. To use it, you need to select
|
2022-03-13 19:27:08 +00:00
|
|
|
a watchface from another source. There is a native format as described here. You can also load decompiled watchfaces for Amazfit BIP fitness trackers.
|
2022-02-19 01:58:08 +00:00
|
|
|
|
2022-02-19 18:22:44 +00:00
|
|
|
# Usage
|
2022-02-19 01:58:08 +00:00
|
|
|
|
2022-03-13 19:27:08 +00:00
|
|
|
## Install a watchface
|
|
|
|
|
2022-02-19 01:58:08 +00:00
|
|
|
Choose the folder which contains the watchface, then clock "Upload to watch".
|
|
|
|
|
2022-03-13 19:27:08 +00:00
|
|
|
## Usage on the watch
|
|
|
|
|
|
|
|
Slide up/down to hide/show widgets.
|
|
|
|
Press button to start launcher.
|
|
|
|
|
2022-02-19 18:22:44 +00:00
|
|
|
# Design watch faces
|
2022-02-19 01:58:08 +00:00
|
|
|
|
2022-02-19 18:22:44 +00:00
|
|
|
## Folder structure
|
2022-02-19 01:58:08 +00:00
|
|
|
|
|
|
|
* watchfacename
|
|
|
|
* resources/
|
|
|
|
* face.json
|
|
|
|
* info.json
|
|
|
|
|
|
|
|
|
2022-02-19 18:22:44 +00:00
|
|
|
### resources
|
2022-02-19 01:58:08 +00:00
|
|
|
|
|
|
|
This folder contains image files. It can have subfolders. These files will
|
|
|
|
be read and converted into a resource bundle used by the clock
|
|
|
|
|
2022-02-19 18:22:44 +00:00
|
|
|
Folder types:
|
|
|
|
|
|
|
|
* Number
|
|
|
|
* Contains files named 0.ext to 9.ext and minus.ext
|
2022-02-20 18:14:19 +00:00
|
|
|
* CodedImage
|
|
|
|
* Contains files named with only digits for codes, i.e. 721.ext
|
|
|
|
* Contains a file named fallback.ext in case no code matches
|
|
|
|
* Codes are evaluated as follows: 721 -> if not found check 720 -> if not found check 700 -> if found use
|
|
|
|
* MultiState
|
2022-02-19 18:22:44 +00:00
|
|
|
* Notifications: sound.ext, silent.ext, vibrate.ext
|
|
|
|
* other status icons: on.ext, off.ext
|
|
|
|
* Scale
|
|
|
|
* Contains the components of the scale, named 0.ext to y.ext, y beeing the last element of the scale
|
|
|
|
|
|
|
|
### face.json
|
|
|
|
|
|
|
|
This file contains the description of the watch face elements.
|
|
|
|
|
|
|
|
#### Object types:
|
|
|
|
|
|
|
|
##### Properties
|
|
|
|
```
|
|
|
|
Properties: {
|
|
|
|
"Redraw": {
|
|
|
|
"Unlocked": 5000,
|
2022-02-20 18:14:19 +00:00
|
|
|
"Locked": 60000,
|
2022-03-13 19:27:08 +00:00
|
|
|
"Default": "Always",
|
|
|
|
"Events": ["HRM"],
|
|
|
|
"Clear": true
|
2022-02-22 20:41:36 +00:00
|
|
|
},
|
|
|
|
"Events": ["lock","HRM"]
|
2022-02-19 18:22:44 +00:00
|
|
|
}
|
|
|
|
```
|
2022-02-20 18:14:19 +00:00
|
|
|
|
2022-02-22 20:41:36 +00:00
|
|
|
Possible values for `Default` are `Always`, `Change`.
|
2022-02-20 18:14:19 +00:00
|
|
|
|
2022-02-19 18:22:44 +00:00
|
|
|
##### Images
|
2022-02-23 21:55:15 +00:00
|
|
|
|
2022-02-19 18:22:44 +00:00
|
|
|
```
|
2022-02-23 21:55:15 +00:00
|
|
|
"Image": {
|
2022-02-19 18:22:44 +00:00
|
|
|
"X": 0,
|
|
|
|
"Y": 0,
|
2022-02-20 18:14:19 +00:00
|
|
|
"Scale": 1,
|
|
|
|
"RotationValue": "Seconds",
|
|
|
|
"MinRotationValue": 0,
|
|
|
|
"MaxRotationValue": 60,
|
2022-02-23 21:55:15 +00:00
|
|
|
"ImagePath": [ "path", "in", "resources", "file" ]
|
2022-02-19 18:22:44 +00:00
|
|
|
}
|
|
|
|
```
|
2022-02-20 18:14:19 +00:00
|
|
|
|
2022-02-23 21:55:15 +00:00
|
|
|
`RotationValue` references one of the implemented numerical values.
|
2022-02-20 18:14:19 +00:00
|
|
|
Mandatory:
|
|
|
|
* `ImagePath`
|
2022-02-19 18:22:44 +00:00
|
|
|
|
2022-02-23 21:55:15 +00:00
|
|
|
```
|
|
|
|
"Image": {
|
|
|
|
"X": 0,
|
|
|
|
"Y": 0,
|
|
|
|
"Value": "BatteryPercentage",
|
|
|
|
"Steps": 7,
|
|
|
|
"ImagePath": [ "path", "in", "resources", "file" ]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
If `Value` and `Steps`are given, the value is scaled and `Steps` number of images starting at 0 are used to display the value.
|
|
|
|
|
2022-02-19 18:22:44 +00:00
|
|
|
##### Coded Images
|
|
|
|
```
|
2022-02-23 21:55:15 +00:00
|
|
|
"CodedImage": {
|
2022-02-19 18:22:44 +00:00
|
|
|
"X": 0,
|
|
|
|
"Y": 0,
|
|
|
|
"Value": "WeatherCode",
|
2022-02-23 21:55:15 +00:00
|
|
|
"ImagePath": [ "path", "in", "resources", "file" ]
|
2022-02-19 18:22:44 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
The `Value` field is one of the implemented numerical values.
|
|
|
|
|
|
|
|
##### Number
|
|
|
|
|
2022-03-01 21:20:20 +00:00
|
|
|
Can be aligned to bottom left, top left, bottom right, top right and center. Will currently force all numbers to
|
2022-02-19 18:22:44 +00:00
|
|
|
be integer.
|
|
|
|
|
|
|
|
```
|
|
|
|
"Number": {
|
|
|
|
"X": 123,
|
|
|
|
"Y": 123,
|
|
|
|
"Alignment": "BottomRight",
|
|
|
|
"Value": "Temperature",
|
|
|
|
"Spacing": 1,
|
|
|
|
"ImagePath": [ "path", "to", "numbers", "folder" ]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
The `Value` field is one of the implemented numerical values.
|
|
|
|
`Alignment` is either `BottomRight` or `TopLeft`
|
|
|
|
|
2022-02-20 18:14:19 +00:00
|
|
|
Mandatory:
|
|
|
|
* `ImagePath`
|
|
|
|
* `Value`
|
|
|
|
|
2022-02-19 18:22:44 +00:00
|
|
|
##### Scale
|
|
|
|
|
|
|
|
```
|
|
|
|
"Scale": {
|
|
|
|
"X": 123,
|
|
|
|
"Y": 123,
|
|
|
|
"Value": "Temperature",
|
|
|
|
"MinValue": "-20",
|
|
|
|
"MaxValue": "50",
|
2022-03-13 19:27:08 +00:00
|
|
|
"ImagePath": [ "path", "to", "scale", "folder" ],
|
|
|
|
"Segments": [
|
|
|
|
{ "X": 5, "Y": 5},
|
|
|
|
{ "X": 10, "Y": 10 }
|
|
|
|
]
|
2022-02-19 18:22:44 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
The `Value` field is one of the implemented numerical values.
|
|
|
|
`MaxValue` and `MinValue` set the start and endpoints of the scale.
|
|
|
|
|
2022-02-20 18:14:19 +00:00
|
|
|
Mandatory:
|
|
|
|
* `ImagePath`
|
|
|
|
* `Value`
|
|
|
|
|
2022-02-19 18:22:44 +00:00
|
|
|
##### MultiState
|
|
|
|
|
|
|
|
```
|
|
|
|
"MultiState": {
|
|
|
|
"X": 0,
|
|
|
|
"Y": 0,
|
|
|
|
"Value": "Lock",
|
|
|
|
"ImagePath": ["icons", "status", "lock"]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
The `Value` field is one of the implemented multi state values.
|
|
|
|
|
2022-02-20 18:14:19 +00:00
|
|
|
Mandatory:
|
|
|
|
* `ImagePath`
|
|
|
|
* `Value`
|
|
|
|
|
2022-02-22 20:41:36 +00:00
|
|
|
##### Poly
|
|
|
|
|
|
|
|
```
|
|
|
|
"Poly":{
|
|
|
|
"Filled": true,
|
|
|
|
"RotationValue": "Second",
|
|
|
|
"MinRotationValue": "0",
|
|
|
|
"MaxRotationValue": "60",
|
|
|
|
"ForegroundColor": "#00f",
|
|
|
|
"BackgroundColor": "#008",
|
|
|
|
"Vertices":[
|
|
|
|
{"X":-1, "Y":13},
|
|
|
|
{"X":0, "Y":15},
|
|
|
|
{"X":1, "Y":13},
|
|
|
|
{"X":2, "Y":0},
|
|
|
|
{"X":1, "Y":-75},
|
|
|
|
{"X":0, "Y":-80},
|
|
|
|
{"X":-1, "Y":-75},
|
|
|
|
{"X":-2, "Y":0}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
The `RotationValue` field is one of the implemented numeric values.
|
|
|
|
|
2022-03-13 19:27:08 +00:00
|
|
|
##### Rect
|
|
|
|
|
|
|
|
```
|
|
|
|
"Rect":{
|
|
|
|
"X": 10,
|
|
|
|
"Y": 20,
|
|
|
|
"Width": 30,
|
|
|
|
"Height": 40,
|
|
|
|
"Filled": true,
|
|
|
|
"ForegroundColor": "#00f",
|
|
|
|
"BackgroundColor": "#008"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
The `RotationValue` field is one of the implemented numeric values.
|
|
|
|
|
2022-02-19 18:22:44 +00:00
|
|
|
##### Nesting
|
|
|
|
```
|
2022-02-23 21:55:15 +00:00
|
|
|
"Container": {
|
2022-02-19 18:22:44 +00:00
|
|
|
"X": 10,
|
|
|
|
"Y": 10,
|
2022-02-23 21:55:15 +00:00
|
|
|
"OtherContainer": {
|
2022-02-19 18:22:44 +00:00
|
|
|
"X": 5,
|
|
|
|
"Y": 5,
|
2022-02-23 21:55:15 +00:00
|
|
|
"SomeElement": {
|
2022-02-19 18:22:44 +00:00
|
|
|
"X": 2,
|
|
|
|
"Y": 2,
|
|
|
|
<Content>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
`SomeElement` will be drawn at X- and Y-position 2+5+10=17, because positions are relative to parent element.
|
|
|
|
Container names can be everything but other object names.
|
|
|
|
|
|
|
|
#### Implemented data sources
|
|
|
|
|
2022-02-20 18:14:19 +00:00
|
|
|
##### Numerical
|
2022-02-19 18:22:44 +00:00
|
|
|
|
|
|
|
* Hour
|
2022-02-22 20:41:36 +00:00
|
|
|
* Hour12Analog
|
|
|
|
* Hour12
|
2022-02-19 18:22:44 +00:00
|
|
|
* HourTens
|
|
|
|
* HourOnes
|
|
|
|
* Minute
|
2022-02-22 20:41:36 +00:00
|
|
|
* MinuteAnalog
|
2022-02-19 18:22:44 +00:00
|
|
|
* MinuteTens
|
|
|
|
* MinuteOnes
|
2022-02-20 18:14:19 +00:00
|
|
|
* Second
|
2022-02-22 20:41:36 +00:00
|
|
|
* SecondAnalog
|
2022-02-20 18:14:19 +00:00
|
|
|
* SecondTens
|
|
|
|
* SecondOnes
|
2022-03-01 21:20:20 +00:00
|
|
|
* WeekDay
|
|
|
|
* WeekDayMondayFirst
|
2022-02-19 18:22:44 +00:00
|
|
|
* Day
|
|
|
|
* DayTens
|
|
|
|
* DayOnes
|
|
|
|
* Month
|
|
|
|
* MonthTens
|
|
|
|
* MonthOnes
|
|
|
|
* Pulse
|
|
|
|
* Steps
|
|
|
|
* Temperature
|
|
|
|
* Pressure
|
|
|
|
* Altitude
|
|
|
|
* BatteryPercentage
|
|
|
|
* BatteryVoltage
|
2022-03-01 21:20:20 +00:00
|
|
|
* StepsGoal
|
2022-02-19 18:22:44 +00:00
|
|
|
* WeatherCode
|
|
|
|
* WeatherTemperature
|
|
|
|
|
2022-02-20 18:14:19 +00:00
|
|
|
##### Multistate
|
2022-02-19 18:22:44 +00:00
|
|
|
|
|
|
|
* on/off
|
|
|
|
* Lock
|
|
|
|
* Charge
|
|
|
|
* Alarm
|
|
|
|
* Bluetooth
|
|
|
|
* BluetoothPeripheral
|
|
|
|
* HRM
|
|
|
|
* Barometer
|
|
|
|
* Compass
|
|
|
|
* GPS
|
2022-03-01 21:20:20 +00:00
|
|
|
* StepsGoal
|
|
|
|
* WeatherTemperatureNegative
|
2022-02-19 18:22:44 +00:00
|
|
|
* on/off/vibrate
|
|
|
|
* Notifications
|
2022-03-01 21:20:20 +00:00
|
|
|
* celsius/fahrenheit/unknown
|
|
|
|
* WeatherTemperatureUnit
|
2022-02-19 18:22:44 +00:00
|
|
|
|
|
|
|
### info.json
|
2022-02-19 01:58:08 +00:00
|
|
|
|
|
|
|
This file contains information for the conversion process, it will not be
|
|
|
|
stored on the watch
|
|
|
|
|
2022-02-19 18:22:44 +00:00
|
|
|
# TODO
|
2022-02-19 01:58:08 +00:00
|
|
|
|
2022-03-01 21:20:20 +00:00
|
|
|
* Handle events and redraws better
|
2022-02-19 01:58:08 +00:00
|
|
|
* Performance improvements
|
2022-03-01 21:20:20 +00:00
|
|
|
* Mark elements with how often they need to be redrawn
|
2022-02-19 01:58:08 +00:00
|
|
|
* Finalize the file format
|
2022-02-20 18:14:19 +00:00
|
|
|
* Localization
|
2022-02-19 01:58:08 +00:00
|
|
|
|
2022-02-19 18:22:44 +00:00
|
|
|
# Creator
|
2022-02-19 01:58:08 +00:00
|
|
|
|
|
|
|
[halemmerich](https://github.com/halemmerich)
|