Initial commit

This commit is contained in:
Mark van Renswoude 2024-11-15 14:02:03 +01:00
commit 4df963cedf
32 changed files with 1089 additions and 0 deletions

9
.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
# Resources required for the build
KittieCats/resources/drawables/background.jpg
KittieCats/resources/drawables/background_xmas.jpg
# Krita source files for the drawables which are not used in the app and you do not need to supply
*.kra
# Build artifacts
bin

View File

@ -0,0 +1,10 @@
{
"folders": [
{
"path": "."
},
{
"path": "KittieCats"
}
]
}

31
KittieCats/.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,31 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "monkeyc",
"request": "launch",
"name": "Run App",
"stopAtLaunch": false,
"device": "${command:GetTargetDevice}"
},
{
"type": "monkeyc",
"request": "launch",
"name": "Run Tests",
"runTests": true,
"device": "${command:GetTargetDevice}"
},
{
"type": "monkeyc",
"request": "launch",
"name": "Run Complication Apps",
"stopAtLaunch": false,
"complicationSubscriberFolder": "${command:GetComplicationSubscriberFolder}",
"complicationPublisherFolder": "${command:GetComplicationPublisherFolder}",
"device": "${command:GetTargetDevice}"
}
]
}

41
KittieCats/manifest.xml Normal file
View File

@ -0,0 +1,41 @@
<?xml version="1.0"?>
<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. -->
<iq:manifest version="3" xmlns:iq="http://www.garmin.com/xml/connectiq">
<!--
Use "Monkey C: Edit Application" from the Visual Studio Code command palette
to update the application attributes.
-->
<iq:application id="cc44f372-fd4e-4716-8f84-90a10714eeb0" type="watchface" name="@Strings.AppName" entry="KittieCatsApp" launcherIcon="@Drawables.LauncherIcon" minApiLevel="5.0.0">
<!--
Use the following from the Visual Studio Code comand palette to edit
the build targets:
"Monkey C: Set Products by Product Category" - Lets you add all products
that belong to the same product category
"Monkey C: Edit Products" - Lets you add or remove any product
-->
<iq:products>
<iq:product id="vivoactive5"/>
</iq:products>
<!--
Use "Monkey C: Edit Permissions" from the Visual Studio Code command
palette to update permissions.
-->
<iq:permissions>
<iq:uses-permission id="ComplicationSubscriber"/>
<iq:uses-permission id="UserProfile"/>
</iq:permissions>
<!--
Use "Monkey C: Edit Languages" from the Visual Studio Code command
palette to edit your compatible language list.
-->
<iq:languages>
<iq:language>dut</iq:language>
<iq:language>eng</iq:language>
</iq:languages>
<!--
Use "Monkey C: Configure Monkey Barrel" from the Visual Studio Code
command palette to edit the included barrels.
-->
<iq:barrels/>
</iq:application>
</iq:manifest>

1
KittieCats/monkey.jungle Executable file
View File

@ -0,0 +1 @@
project.manifest = manifest.xml

View File

@ -0,0 +1,6 @@
<strings>
<string id="AppName">KittieCats</string>
<string id="SettingsTitle">Instellingen</string>
<string id="SettingsTheme">Thema</string>
</strings>

View File

@ -0,0 +1,10 @@
[
{
"id": "default",
"name": "Standaard"
},
{
"id": "xmas",
"name": "Kerst"
}
]

View File

@ -0,0 +1,3 @@
<resources>
<jsonData id="ThemeInfo" filename="themes.json" />
</resources>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="390" height="390" viewBox="0 0 390 390" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path
id="Hours"
d="m 197.7085,195.97218 v -13.54247 c 0.90283,0 1.80566,-0.90283 1.80566,-1.80567 v -70.42085 a 4.514158,4.514158 0 0 0 -9.02832,0 v 70.42085 c 0,0.90284 0.90283,1.80567 1.80567,1.80567 v 13.54247 z"
style="fill:#ffffff;fill-opacity:1;stroke-width:0.902833" />
</svg>

After

Width:  |  Height:  |  Size: 446 B

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="390" height="390" viewBox="0 0 390 390" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path
id="Minutes"
d="m 197.7085,195.97218 v -13.54247 c 0.90283,0 1.80566,-0.90283 1.80566,-1.80567 V 26.244971 c 0,-6.018875 -9.02832,-6.018875 -9.02832,0 V 180.62404 c 0,0.90284 0.90283,1.80567 1.80567,1.80567 v 13.54247 z"
style="fill:none;stroke:#ffffff;stroke-width:3.02839;stroke-dasharray:none;stroke-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 491 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="390" height="390" viewBox="0 0 390 390" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path
id="SecondsShadow"
d="m 190.58749,86.976886 c 2.02769,-0.06684 3.97909,0.925005 5.3172,2.409994 1.90372,-2.144888 5.23527,-3.133216 7.89266,-1.809342 2.52051,1.170679 3.91015,3.996942 3.91897,6.69623 3.40938,-0.16756 6.23883,3.091216 6.09772,6.404202 0.0693,3.38999 -2.06308,6.87354 -5.26051,8.10494 0.76688,2.96527 0.94193,6.65112 -1.3959,8.98247 -1.90655,1.93296 -4.93353,1.60821 -7.27125,0.75847 -2.4847,-0.99457 -5.27721,-0.96489 -7.77774,-0.0439 -2.35161,0.80511 -5.33575,1.25171 -7.31259,-0.62986 -2.35998,-2.3436 -2.2342,-6.06153 -1.4726,-9.06731 -4.36788,-1.67729 -6.77077,-7.59564 -4.27716,-11.69914 1.06599,-1.737809 3.07422,-2.851693 5.11404,-2.812337 -0.0413,-3.591749 2.61044,-7.293038 6.42716,-7.294408 z m -1.7574,4.757111 c -1.81191,2.461002 -0.69753,6.53635 2.10233,7.74 1.83209,0.754723 3.6239,-1.046341 3.67148,-2.833606 0.27419,-2.451542 -1.11313,-5.59367 -3.83477,-5.842967 -0.74928,-0.0043 -1.45448,0.379707 -1.93904,0.936573 z m 10.35556,-0.159374 c -2.08352,1.748987 -2.73576,5.371102 -0.77164,7.438222 1.55853,1.421385 3.90042,0.146312 4.71545,-1.489157 1.13569,-1.953775 1.2561,-5.057703 -0.84008,-6.416976 -1.00328,-0.592007 -2.26821,-0.261696 -3.10373,0.467911 z m -16.73181,7.304882 c -1.56954,2.408565 0.28195,5.985475 2.95477,6.615655 1.96366,0.49207 3.26261,-1.78145 2.75109,-3.4832 -0.42569,-2.104647 -2.46097,-4.499985 -4.8119,-3.776243 -0.34917,0.12866 -0.65856,0.356552 -0.89396,0.643788 z m 24.31451,-0.633577 c -2.35708,0.879767 -3.94907,4.016492 -2.65012,6.313882 1.02886,1.61396 3.37794,0.97766 4.42757,-0.28266 1.44246,-1.41706 2.18595,-4.20365 0.53257,-5.729753 -0.64676,-0.478385 -1.56847,-0.586192 -2.31002,-0.301487 z m -15.45702,5.213092 c -3.16888,2.49136 -5.41735,6.72605 -4.39866,10.80009 0.78648,2.05737 3.27714,0.72905 4.74722,0.35071 2.34808,-0.80131 4.91393,-1.09759 7.31867,-0.35434 1.7404,0.36092 3.39777,1.43912 5.22653,0.96777 1.36569,-1.08041 1.07795,-3.12191 0.86589,-4.65793 -0.80209,-3.86387 -3.67062,-7.23932 -7.29214,-8.76146 -2.27512,-0.82849 -4.71598,0.16902 -6.46751,1.65517 z"
style="fill:#000000;fill-opacity:0.501873;stroke-width:0.75242" />
<path
id="Seconds"
d="m 189.51747,85.781852 c 2.02769,-0.06687 3.97909,0.925006 5.3172,2.409994 1.90371,-2.144888 5.23526,-3.133216 7.89266,-1.809341 2.52051,1.170679 3.91015,3.996942 3.91896,6.696229 3.40939,-0.16756 6.23884,3.091216 6.09773,6.404199 0.0693,3.389997 -2.06309,6.873547 -5.26051,8.104947 0.76688,2.96527 0.94193,6.65112 -1.3959,8.98247 -1.90655,1.93295 -4.93353,1.60821 -7.27125,0.75847 -2.4847,-0.99458 -5.27721,-0.9649 -7.77775,-0.0439 -2.35161,0.8051 -5.33574,1.2517 -7.31259,-0.62986 -2.35997,-2.3436 -2.2342,-6.06154 -1.47259,-9.06731 -4.36788,-1.67729 -6.77078,-7.595648 -4.27717,-11.699145 1.06599,-1.737808 3.07423,-2.851692 5.11405,-2.812336 -0.0413,-3.591749 2.61044,-7.293038 6.42716,-7.294408 z m -1.7574,4.757111 c -1.81192,2.461002 -0.69753,6.53635 2.10233,7.74 1.83209,0.754727 3.6239,-1.04634 3.67148,-2.833605 0.27418,-2.451543 -1.11313,-5.593671 -3.83477,-5.842967 -0.74928,-0.0043 -1.45448,0.379707 -1.93904,0.936572 z m 10.35556,-0.159374 c -2.08352,1.748988 -2.73576,5.371102 -0.77164,7.438222 1.55853,1.421381 3.90041,0.146312 4.71545,-1.489156 1.13569,-1.953775 1.2561,-5.057704 -0.84008,-6.416977 -1.00328,-0.592007 -2.26821,-0.261696 -3.10373,0.467911 z m -16.73181,7.304883 c -1.56955,2.408558 0.28195,5.985468 2.95476,6.615648 1.96367,0.49207 3.26261,-1.78144 2.7511,-3.48319 -0.42569,-2.10465 -2.46097,-4.499988 -4.8119,-3.776246 -0.34918,0.128659 -0.65856,0.356552 -0.89396,0.643788 z m 24.31451,-0.633577 c -2.35708,0.879766 -3.94907,4.016485 -2.65012,6.313885 1.02886,1.61395 3.37794,0.97765 4.42757,-0.28263 1.44246,-1.41706 2.18595,-4.203652 0.53257,-5.729751 -0.64677,-0.478385 -1.56847,-0.586192 -2.31002,-0.301487 z m -15.45702,5.213095 c -3.16888,2.49136 -5.41735,6.72604 -4.39866,10.80009 0.78648,2.05737 3.27714,0.72905 4.74722,0.35071 2.34807,-0.80132 4.91393,-1.0976 7.31867,-0.35434 1.7404,0.36092 3.39777,1.43912 5.22653,0.96777 1.36569,-1.08041 1.07795,-3.12191 0.86589,-4.65793 -0.8021,-3.86388 -3.67062,-7.23933 -7.29214,-8.76147 -2.27512,-0.828479 -4.71598,0.16902 -6.46751,1.65518 z"
style="fill:#c7ae54;fill-opacity:1;stroke-width:0.75242" />
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,14 @@
<drawables>
<bitmap id="LauncherIcon" filename="launcher_icon.png" />
<bitmap id="Background" filename="background.jpg" />
<bitmap id="BackgroundXmas" filename="background_xmas.jpg" />
<bitmap id="Ticks" filename="ticks.svg" packingFormat="png" />
<bitmap id="ArmHour" filename="arm_hour.svg" packingFormat="png" />
<bitmap id="ArmMinute" filename="arm_minute.svg" packingFormat="png" />
<bitmap id="ArmSecond" filename="arm_second.svg" packingFormat="png" />
<bitmap id="Icons" filename="icons.png" packingFormat="png" automaticPalette="true" />
</drawables>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg
width="390"
height="390"
version="1.0"
viewBox="0 0 390 390.00001"
xmlns="http://www.w3.org/2000/svg">
<path
style="stroke-width:0.304925;fill:#c7ae54;fill-opacity:1"
d="m 194.73276,380.13572 c -0.27189,0.009 -0.54131,0.0379 -0.80524,0.088 -1.52903,0.29119 -3.20384,1.82031 -3.64071,3.31263 -0.12402,0.47528 -0.22048,2.87093 -0.28423,6.44339 3.3666,0.0365 6.77929,0.0233 10.27202,-0.0368 -0.048,-6.06701 -0.19765,-6.85583 -0.6682,-7.53535 -0.95563,-1.43317 -2.97032,-2.33653 -4.87364,-2.27185 z" />
<path
d="m 100.83936,354.8542 c -0.54607,0 -1.601931,0.29129 -2.293629,0.65527 -0.765612,0.35721 -1.755779,1.6156 -4.722723,6.27651 2.878265,1.73025 5.881158,3.41689 8.946292,5.04971 3.87895,-6.4048 3.9489,-7.26456 2.69359,-9.32415 -0.80091,-1.34672 -3.13091,-2.65734 -4.62353,-2.65734 z"
style="stroke-width:0.364016;fill:#c7ae54;fill-opacity:1" />
<path
d="m 290.6425,354.11309 c -1.06941,-0.0226 -2.17067,0.21348 -2.93518,0.70485 -1.49261,0.98275 -2.43907,2.65706 -2.47548,4.36777 0,0.87585 0.60867,2.33442 3.27487,7.22449 3.00686,-1.6369 5.94609,-3.3603 8.84337,-5.1371 -2.07761,-3.53002 -3.641,-6.05136 -3.96387,-6.3096 -0.63708,-0.54597 -1.67432,-0.82765 -2.74371,-0.85041 z"
style="stroke-width:0.364016;fill:#c7ae54;fill-opacity:1" />
<path
d="m 359.97787,285.36026 c -0.85152,-0.0551 -1.40361,0.24668 -2.15446,0.70165 -1.85667,1.16474 -2.69377,2.7665 -2.51174,4.98678 0.0728,1.20114 0.40053,2.18364 0.80099,2.65681 0.22222,0.24237 2.36873,1.56739 5.41811,3.37446 1.76961,-2.90568 3.44519,-5.87311 5.06293,-8.87628 -3.66891,-1.99834 -5.43423,-2.76697 -6.61583,-2.84342 z"
style="stroke-width:0.364016;fill:#c7ae54;fill-opacity:1" />
<path
d="m 30.549966,284.42293 c -0.671844,-0.001 -1.367329,0.16955 -2.084056,0.51079 -0.808712,0.38778 -2.715267,1.47311 -5.063486,2.84822 1.622488,3.01567 3.318446,5.98867 5.099218,8.9168 3.292279,-2.0462 5.67715,-3.58793 5.971126,-3.90284 1.201372,-1.27393 1.274146,-4.3314 0.145584,-5.86011 -1.226396,-1.67659 -2.590331,-2.51041 -4.068386,-2.51286 z"
style="stroke-width:0.364016;fill:#c7ae54;fill-opacity:1" />
<path
d="m 389.95346,189.99776 c -5.81333,0.0521 -6.56349,0.2113 -7.3379,0.70166 -3.16726,1.89269 -2.98515,7.35248 0.25491,8.99038 0.45037,0.237 2.43318,0.36433 7.10327,0.42548 0.0418,-3.28229 0.0328,-6.64915 -0.0204,-10.11752 z"
style="stroke-width:0.364016;fill:#c7ae54;fill-opacity:1" />
<path
d="M 0.15891962,190.10866 C 0.12133489,191.77265 0.00268306,193.35135 0,195.05865 c 0,2.14638 0.08369556,3.37328 0.11092301,5.07688 5.81069949,-0.0525 6.45184969,-0.21131 7.27606339,-0.70059 1.5290147,-0.94634 2.5119552,-3.38519 2.1843083,-5.27788 -0.1456208,-0.72796 -0.8009471,-1.92886 -1.4926459,-2.65682 l -1.2009457,-1.34679 z"
style="stroke-width:0.364016;fill:#c7ae54;fill-opacity:1" />
<path
d="m 361.75474,93.488409 c -0.85087,0.50666 -3.31193,1.969629 -3.53084,2.102842 -0.87372,0.473171 -1.9658,1.383301 -2.47548,2.002067 -1.89307,2.256678 -0.69185,6.588012 2.22058,7.789142 1.56542,0.65517 2.4758,0.65492 3.8956,-0.0731 0.86918,-0.44691 2.78535,-1.54901 5.12268,-2.92233 -1.63725,-3.008377 -3.42037,-5.959533 -5.23254,-8.898683 z"
style="stroke-width:0.364016;fill:#c7ae54;fill-opacity:1" />
<path
d="m 28.914932,92.797948 c -1.805254,2.911473 -3.540355,5.87214 -5.19254,8.884822 4.944053,2.66725 6.15387,3.11694 7.219003,3.11694 3.5313,0 6.079344,-4.11277 4.586734,-7.424992 -0.419485,-0.891227 -0.867987,-1.336426 -6.613197,-4.57677 z"
style="stroke-width:0.364016;fill:#c7ae54;fill-opacity:1" />
<path
d="m 288.73389,24.338899 c -2.1429,4.147772 -2.70159,5.564747 -2.70159,6.427417 0,2.766247 2.58501,5.241103 5.53383,5.241103 1.76996,0 2.74738,-0.756271 6.02126,-6.512723 -2.90969,-1.788549 -5.85124,-3.515516 -8.8535,-5.155797 z"
style="stroke-width:0.364016;fill:#c7ae54;fill-opacity:1" />
<path
d="m 101.90592,23.981139 c -2.986679,1.636448 -5.917989,3.372006 -8.8183,5.160594 2.852653,4.917875 3.185531,5.099249 4.22037,5.591933 3.31287,1.565116 7.93616,-1.892843 7.28086,-5.42345 -0.058,-0.347762 -1.11582,-2.415254 -2.68293,-5.329077 z"
style="stroke-width:0.364016;fill:#c7ae54;fill-opacity:1" />
<path
d="m 191.6936,0.00108999 c -0.62774,0.00218389 -1.10981,0.04131542 -1.71715,0.04958506 0.0287,5.04747295 0.16972,6.03601465 0.56528,6.80224075 1.82025,3.5306062 6.62581,3.8582942 8.99215,0.6552703 0.52953,-0.7412097 0.69137,-1.2276186 0.74126,-7.36313821 -2.93993,-0.09664772 -5.85728,-0.15377081 -8.58154,-0.1439579 z"
style="stroke-width:0.364016;fill:#c7ae54;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -0,0 +1,11 @@
<resources>
<properties>
<property id="theme" type="string">default</property>
</properties>
<settings>
<setting propertyKey="@Properties.theme" title="@Strings.SettingsTheme">
<settingConfig type="alphaNumeric" />
</setting>
</settings>
</resources>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="390"
height="390"
viewBox="0 0 390 390"
version="1.1"
id="svg1"
sodipodi:docname="Layout.svg"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
xml:space="preserve"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"><sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="false"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showguides="true"
showgrid="false"
inkscape:zoom="4"
inkscape:cx="206.75"
inkscape:cy="335.75"
inkscape:window-width="2560"
inkscape:window-height="1368"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="Hands"><sodipodi:guide
position="51.59375,103.1875"
orientation="-1,0"
id="guide1"
inkscape:locked="false"
inkscape:label=""
inkscape:color="rgb(0,134,229)" /><sodipodi:guide
position="0,51.59375"
orientation="0,1"
id="guide2"
inkscape:locked="false"
inkscape:label=""
inkscape:color="rgb(0,134,229)" /></sodipodi:namedview><defs
id="defs1" /><g
id="Background"><rect
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:3.216;stroke-dasharray:none;stroke-opacity:1"
id="Void"
width="390"
height="390"
x="0"
y="0" /><circle
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.216;stroke-dasharray:none;stroke-opacity:1"
id="Display"
cx="195"
cy="195"
r="195" /></g><g
inkscape:groupmode="layer"
id="Hands"><path
id="Minutes"
d="m 197.7085,195.97218 v -13.54247 c 0.90283,0 1.80566,-0.90283 1.80566,-1.80567 V 26.244971 c 0,-6.018875 -9.02832,-6.018875 -9.02832,0 V 180.62404 c 0,0.90284 0.90283,1.80567 1.80567,1.80567 v 13.54247 z"
style="fill:none;stroke:#942525;stroke-width:3.02839;stroke-dasharray:none;stroke-opacity:1"
sodipodi:nodetypes="ccssssccc" /><path
id="Hours"
d="m 197.7085,195.97218 v -13.54247 c 0.90283,0 1.80566,-0.90283 1.80566,-1.80567 v -70.42085 a 4.514158,4.514158 0 0 0 -9.02832,0 v 70.42085 c 0,0.90284 0.90283,1.80567 1.80567,1.80567 v 13.54247 z"
style="fill:#dc2c2c;fill-opacity:1;stroke-width:0.902833" /><path
id="SecondsShadow"
d="m 190.58749,86.976886 c 2.02769,-0.06684 3.97909,0.925005 5.3172,2.409994 1.90372,-2.144888 5.23527,-3.133216 7.89266,-1.809342 2.52051,1.170679 3.91015,3.996942 3.91897,6.69623 3.40938,-0.16756 6.23883,3.091216 6.09772,6.404202 0.0693,3.38999 -2.06308,6.87354 -5.26051,8.10494 0.76688,2.96527 0.94193,6.65112 -1.3959,8.98247 -1.90655,1.93296 -4.93353,1.60821 -7.27125,0.75847 -2.4847,-0.99457 -5.27721,-0.96489 -7.77774,-0.0439 -2.35161,0.80511 -5.33575,1.25171 -7.31259,-0.62986 -2.35998,-2.3436 -2.2342,-6.06153 -1.4726,-9.06731 -4.36788,-1.67729 -6.77077,-7.59564 -4.27716,-11.69914 1.06599,-1.737809 3.07422,-2.851693 5.11404,-2.812337 -0.0413,-3.591749 2.61044,-7.293038 6.42716,-7.294408 z m -1.7574,4.757111 c -1.81191,2.461002 -0.69753,6.53635 2.10233,7.74 1.83209,0.754723 3.6239,-1.046341 3.67148,-2.833606 0.27419,-2.451542 -1.11313,-5.59367 -3.83477,-5.842967 -0.74928,-0.0043 -1.45448,0.379707 -1.93904,0.936573 z m 10.35556,-0.159374 c -2.08352,1.748987 -2.73576,5.371102 -0.77164,7.438222 1.55853,1.421385 3.90042,0.146312 4.71545,-1.489157 1.13569,-1.953775 1.2561,-5.057703 -0.84008,-6.416976 -1.00328,-0.592007 -2.26821,-0.261696 -3.10373,0.467911 z m -16.73181,7.304882 c -1.56954,2.408565 0.28195,5.985475 2.95477,6.615655 1.96366,0.49207 3.26261,-1.78145 2.75109,-3.4832 -0.42569,-2.104647 -2.46097,-4.499985 -4.8119,-3.776243 -0.34917,0.12866 -0.65856,0.356552 -0.89396,0.643788 z m 24.31451,-0.633577 c -2.35708,0.879767 -3.94907,4.016492 -2.65012,6.313882 1.02886,1.61396 3.37794,0.97766 4.42757,-0.28266 1.44246,-1.41706 2.18595,-4.20365 0.53257,-5.729753 -0.64676,-0.478385 -1.56847,-0.586192 -2.31002,-0.301487 z m -15.45702,5.213092 c -3.16888,2.49136 -5.41735,6.72605 -4.39866,10.80009 0.78648,2.05737 3.27714,0.72905 4.74722,0.35071 2.34808,-0.80131 4.91393,-1.09759 7.31867,-0.35434 1.7404,0.36092 3.39777,1.43912 5.22653,0.96777 1.36569,-1.08041 1.07795,-3.12191 0.86589,-4.65793 -0.80209,-3.86387 -3.67062,-7.23932 -7.29214,-8.76146 -2.27512,-0.82849 -4.71598,0.16902 -6.46751,1.65517 z"
style="fill:#000000;fill-opacity:0.501873;stroke-width:0.75242" /><path
id="Seconds"
d="m 189.51747,85.781852 c 2.02769,-0.06687 3.97909,0.925006 5.3172,2.409994 1.90371,-2.144888 5.23526,-3.133216 7.89266,-1.809341 2.52051,1.170679 3.91015,3.996942 3.91896,6.696229 3.40939,-0.16756 6.23884,3.091216 6.09773,6.404199 0.0693,3.389997 -2.06309,6.873547 -5.26051,8.104947 0.76688,2.96527 0.94193,6.65112 -1.3959,8.98247 -1.90655,1.93295 -4.93353,1.60821 -7.27125,0.75847 -2.4847,-0.99458 -5.27721,-0.9649 -7.77775,-0.0439 -2.35161,0.8051 -5.33574,1.2517 -7.31259,-0.62986 -2.35997,-2.3436 -2.2342,-6.06154 -1.47259,-9.06731 -4.36788,-1.67729 -6.77078,-7.595648 -4.27717,-11.699145 1.06599,-1.737808 3.07423,-2.851692 5.11405,-2.812336 -0.0413,-3.591749 2.61044,-7.293038 6.42716,-7.294408 z m -1.7574,4.757111 c -1.81192,2.461002 -0.69753,6.53635 2.10233,7.74 1.83209,0.754727 3.6239,-1.04634 3.67148,-2.833605 0.27418,-2.451543 -1.11313,-5.593671 -3.83477,-5.842967 -0.74928,-0.0043 -1.45448,0.379707 -1.93904,0.936572 z m 10.35556,-0.159374 c -2.08352,1.748988 -2.73576,5.371102 -0.77164,7.438222 1.55853,1.421381 3.90041,0.146312 4.71545,-1.489156 1.13569,-1.953775 1.2561,-5.057704 -0.84008,-6.416977 -1.00328,-0.592007 -2.26821,-0.261696 -3.10373,0.467911 z m -16.73181,7.304883 c -1.56955,2.408558 0.28195,5.985468 2.95476,6.615648 1.96367,0.49207 3.26261,-1.78144 2.7511,-3.48319 -0.42569,-2.10465 -2.46097,-4.499988 -4.8119,-3.776246 -0.34918,0.128659 -0.65856,0.356552 -0.89396,0.643788 z m 24.31451,-0.633577 c -2.35708,0.879766 -3.94907,4.016485 -2.65012,6.313885 1.02886,1.61395 3.37794,0.97765 4.42757,-0.28263 1.44246,-1.41706 2.18595,-4.203652 0.53257,-5.729751 -0.64677,-0.478385 -1.56847,-0.586192 -2.31002,-0.301487 z m -15.45702,5.213095 c -3.16888,2.49136 -5.41735,6.72604 -4.39866,10.80009 0.78648,2.05737 3.27714,0.72905 4.74722,0.35071 2.34807,-0.80132 4.91393,-1.0976 7.31867,-0.35434 1.7404,0.36092 3.39777,1.43912 5.22653,0.96777 1.36569,-1.08041 1.07795,-3.12191 0.86589,-4.65793 -0.8021,-3.86388 -3.67062,-7.23933 -7.29214,-8.76147 -2.27512,-0.828479 -4.71598,0.16902 -6.46751,1.65518 z"
style="fill:#c7ae54;fill-opacity:1;stroke-width:0.75242" /><path
d="m 177.33166,338.41792 q 0,0.90563 0.64687,1.5525 0.64688,0.64688 1.55249,0.64688 0.90563,0 1.5525,-0.64688 0.64688,-0.64687 0.64688,-1.5525 0,-0.90562 -0.64688,-1.55249 -0.64687,-0.64688 -1.5525,-0.64688 -0.90561,0 -1.55249,0.64688 -0.64687,0.64687 -0.64687,1.55249 z m 6.64124,2.67375 2.88937,-3.70875 -0.56062,-0.60375 -5.43375,4.91625 q -0.0431,0.0431 -0.0862,0.0431 h -2.45813 q -0.0431,0 -0.0862,-0.0431 l -5.30437,-4.87312 -0.60375,0.56062 4.05375,5.30437 q 0.1725,0.25875 0.345,0.64687 v 0.0432 q 0.5175,1.25062 0.5175,3.32062 0,1.38001 -0.77625,6.64124 l -0.77625,4.95938 h 1.07812 l 2.19938,-8.84062 0.12937,-0.25875 q 0.1725,-0.30187 0.43125,-0.30187 l 0.12938,0.0431 q -0.345,-1.63875 0.1078,-3.23437 0.45282,-1.59562 1.5525,-2.82468 1.09969,-1.22907 2.65219,-1.7897 z m -3.49313,9.96187 1.81125,7.24499 h 1.12125 l -0.77625,-5.00249 q -1.33687,-0.8625 -2.15625,-2.2425 z m 5.99438,-9.31499 h -0.0431 q -1.59562,0 -2.9325,0.77624 -1.33687,0.77625 -2.11312,2.11312 -0.77624,1.33688 -0.77624,2.91095 0,1.57405 0.77624,2.91093 0.77625,1.33687 2.11312,2.11312 1.33688,0.77625 2.91094,0.77625 1.57406,0 2.91094,-0.77625 1.33687,-0.77625 2.11312,-2.11312 0.77625,-1.33688 0.77625,-2.91093 0,-1.57407 -0.77625,-2.91095 -0.77625,-1.33687 -2.09157,-2.11312 -1.3153,-0.77624 -2.8678,-0.77624 z m -1.94063,9.91874 1.42313,-3.70875 h -2.32875 l 1.98375,-4.57125 h 1.81125 l -0.99188,2.80313 h 2.76 z"
id="path1"
style="fill:#a5e08a;fill-opacity:1;stroke:#000000;stroke-width:0.919999;stroke-dasharray:none;stroke-opacity:1" /><path
d="m 115.79853,167.31802 -1.66212,-1.52733 q -3.72851,-3.36915 -5.21093,-4.85158 -2.33595,-2.38085 -3.41407,-4.22265 -1.21289,-2.11132 -1.21289,-4.17773 0,-1.75196 0.83106,-3.18945 0.83105,-1.43751 2.29101,-2.29103 1.45996,-0.85351 3.21192,-0.85351 1.48243,0 2.85254,0.65137 1.37012,0.65136 2.31348,1.77441 0.94335,-1.12305 2.31347,-1.77441 1.37011,-0.65137 2.85254,-0.65137 1.75195,0 3.21191,0.85351 1.45996,0.85352 2.29102,2.29103 0.83105,1.43749 0.83105,3.18945 0,2.06641 -1.21289,4.17773 -1.07812,1.8418 -3.41407,4.22265 -1.48242,1.48243 -5.16601,4.85158 z"
fill="#942525"
id="path1-6"
style="stroke-width:0.0449217" /><path
d="m 187.86038,315.16728 -0.38883,0.51843 -0.25922,0.38882 q -1.51209,2.03053 -2.72177,2.89459 -0.1296,0.0864 -0.41042,0.21601 -0.28082,0.12961 -0.41043,0.25922 h -0.17281 l -2.41935,-2.16014 h -0.0864 l 0.0864,-0.21602 q 0.30241,-0.56162 0.47523,-0.77764 0.34562,-0.90726 0.34562,-1.51209 0,-1.25288 0.95046,-2.50577 0.82085,-1.12326 1.81451,-2.03052 0.82085,-0.64804 1.85771,-0.90726 0.82087,-0.12961 1.64172,0.45362 0.82084,0.58324 0.86405,1.57691 0,1.08006 -0.34562,1.94412 -0.12961,0.21602 -0.25922,0.69125 l -0.21601,0.51843 q -0.12961,0.12961 -0.25922,0.47523 z m -9.4614,7.69009 q -0.69124,-0.56164 -0.64805,-1.4689 0.0432,-0.69124 0.47524,-1.38249 0.56163,-0.95046 1.85772,-1.59849 h 0.17281 l 1.12326,1.12326 q 0.73445,0.73446 1.20968,1.12328 l -0.64803,0.90725 q -0.64805,0.82085 -1.38249,1.20968 -0.99366,0.47523 -1.77132,0.25922 -0.0431,-0.0432 -0.216,-0.0864 z m 5.83237,-21.38536 q 0.56163,0.56164 0.69125,1.38249 0.0431,0.56164 -0.12962,1.59851 -0.43202,1.6849 -1.38249,3.2402 -0.38882,0.69124 -1.12327,1.12327 -0.56164,0.30242 -1.08007,0.82085 -0.34562,0.34562 -0.86405,1.03687 l -0.0864,0.12961 q -0.0431,0.0864 -0.0864,0.1296 -0.56163,-0.21601 -1.20967,-0.56164 -0.25921,-0.0864 -0.82085,-0.32401 -0.56163,-0.23761 -0.82085,-0.32402 -0.0864,0 -0.15121,-0.0648 -0.0648,-0.0648 -0.0648,-0.10801 -0.12962,-0.64804 0.216,-1.38248 0.56164,-1.85772 1.38249,-3.54262 0.12961,-0.38884 0.43203,-0.73445 0.17281,-0.12961 0.34562,-0.43203 l 0.12961,-0.21602 0.30242,-0.34561 q 0.47523,-0.51844 0.73444,-0.77766 0.38883,-0.38882 0.82086,-0.64804 0.73444,-0.56164 1.6417,-0.43202 0.17281,0 0.47523,0.108 0.30242,0.10801 0.47523,0.15121 -0.0864,0 -0.0216,0.0648 0.0648,0.0648 0.19441,0.108 z m -7.8629,9.4614 q 0.60484,0.12961 0.90726,0.34562 l 2.16014,0.77766 q 0.0431,0 0.108,0.0431 0.0648,0.0432 0.0648,0.12961 -0.0864,0.90726 -0.25922,1.51209 -0.25921,0.77766 -0.77764,1.33928 -0.60484,0.64805 -1.25289,0.77766 -0.64804,0.12961 -1.18807,-0.23762 -0.54004,-0.36723 -0.71285,-1.10166 -0.216,-0.86406 0.30243,-2.20334 0.0864,-0.34563 0.38882,-0.82086 0.17281,-0.38882 0.25921,-0.56163 z"
id="path1-2"
style="fill:#7dbaea;fill-opacity:1;stroke:#000000;stroke-width:0.920083;stroke-dasharray:none;stroke-opacity:1" /><path
d="m 248.39578,337.03868 q -1.33949,0 -2.50614,0.66974 -1.16666,0.66975 -1.85801,1.8364 -0.69135,1.16665 -0.69135,2.52774 0,1.36111 0.69135,2.52776 0.69135,1.16665 1.85801,1.83639 1.16665,0.66975 2.52774,0.66975 1.3611,0 2.52775,-0.66975 1.16665,-0.66974 1.83639,-1.83639 0.66975,-1.16665 0.66975,-2.52776 0,-1.36109 -0.66975,-2.52774 -0.66974,-1.16665 -1.83639,-1.8364 -1.16665,-0.66974 -2.54935,-0.66974 z m 2.16047,4.10489 -4.01848,4.58019 1.46912,-3.2407 h -1.72837 l 1.29628,-4.06168 h 2.98145 l -1.72838,2.7654 z m 3.37032,16.28992 v -1.42591 q 0,-0.0864 0.0864,-0.10802 0.0864,-0.0216 0.12963,0.0648 l 0.4753,1.46911 h 4.88265 q 0,-0.25925 -0.9506,-2.85181 l -0.99382,-2.63578 q -0.82098,-1.9012 -2.57095,-3.02465 -1.74998,-1.12344 -3.82403,-1.12344 h -5.74684 q -2.11726,0 -3.84563,1.12344 -1.72838,1.12345 -2.59257,3.02465 l -0.0432,0.12963 -0.73455,2.50615 q -0.77777,2.59256 -0.77777,2.89503 h 4.6234 l 0.38888,-1.38271 q 0.0432,-0.12962 0.15124,-0.10802 0.10802,0.0216 0.10802,0.10802 v 1.38271 z"
id="path1-3"
style="fill:#f7f2b8;fill-opacity:1;stroke:#000000;stroke-width:0.919999;stroke-dasharray:none;stroke-opacity:1" /></g><metadata
id="metadata1"><rdf:RDF><cc:License
rdf:about="http://creativecommons.org/publicdomain/zero/1.0/"><cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" /><cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" /><cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /></cc:License><cc:Work
rdf:about=""><cc:license
rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" /></cc:Work></rdf:RDF></metadata></svg>

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="390" height="390" viewBox="0 0 390 390" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path
id="Minutes"
d="m 197.7085,195.97218 v -13.54247 c 0.90283,0 1.80566,-0.90283 1.80566,-1.80567 V 26.244971 c 0,-6.018875 -9.02832,-6.018875 -9.02832,0 V 180.62404 c 0,0.90284 0.90283,1.80567 1.80567,1.80567 v 13.54247 z"
style="fill:none;stroke:#942525;stroke-width:3.02839;stroke-dasharray:none;stroke-opacity:1" />
<path
id="Hours"
d="m 197.7085,195.97218 v -13.54247 c 0.90283,0 1.80566,-0.90283 1.80566,-1.80567 v -70.42085 a 4.514158,4.514158 0 0 0 -9.02832,0 v 70.42085 c 0,0.90284 0.90283,1.80567 1.80567,1.80567 v 13.54247 z"
style="fill:#dc2c2c;fill-opacity:1;stroke-width:0.902833" />
<path
id="SecondsShadow"
d="m 190.58749,86.976886 c 2.02769,-0.06684 3.97909,0.925005 5.3172,2.409994 1.90372,-2.144888 5.23527,-3.133216 7.89266,-1.809342 2.52051,1.170679 3.91015,3.996942 3.91897,6.69623 3.40938,-0.16756 6.23883,3.091216 6.09772,6.404202 0.0693,3.38999 -2.06308,6.87354 -5.26051,8.10494 0.76688,2.96527 0.94193,6.65112 -1.3959,8.98247 -1.90655,1.93296 -4.93353,1.60821 -7.27125,0.75847 -2.4847,-0.99457 -5.27721,-0.96489 -7.77774,-0.0439 -2.35161,0.80511 -5.33575,1.25171 -7.31259,-0.62986 -2.35998,-2.3436 -2.2342,-6.06153 -1.4726,-9.06731 -4.36788,-1.67729 -6.77077,-7.59564 -4.27716,-11.69914 1.06599,-1.737809 3.07422,-2.851693 5.11404,-2.812337 -0.0413,-3.591749 2.61044,-7.293038 6.42716,-7.294408 z m -1.7574,4.757111 c -1.81191,2.461002 -0.69753,6.53635 2.10233,7.74 1.83209,0.754723 3.6239,-1.046341 3.67148,-2.833606 0.27419,-2.451542 -1.11313,-5.59367 -3.83477,-5.842967 -0.74928,-0.0043 -1.45448,0.379707 -1.93904,0.936573 z m 10.35556,-0.159374 c -2.08352,1.748987 -2.73576,5.371102 -0.77164,7.438222 1.55853,1.421385 3.90042,0.146312 4.71545,-1.489157 1.13569,-1.953775 1.2561,-5.057703 -0.84008,-6.416976 -1.00328,-0.592007 -2.26821,-0.261696 -3.10373,0.467911 z m -16.73181,7.304882 c -1.56954,2.408565 0.28195,5.985475 2.95477,6.615655 1.96366,0.49207 3.26261,-1.78145 2.75109,-3.4832 -0.42569,-2.104647 -2.46097,-4.499985 -4.8119,-3.776243 -0.34917,0.12866 -0.65856,0.356552 -0.89396,0.643788 z m 24.31451,-0.633577 c -2.35708,0.879767 -3.94907,4.016492 -2.65012,6.313882 1.02886,1.61396 3.37794,0.97766 4.42757,-0.28266 1.44246,-1.41706 2.18595,-4.20365 0.53257,-5.729753 -0.64676,-0.478385 -1.56847,-0.586192 -2.31002,-0.301487 z m -15.45702,5.213092 c -3.16888,2.49136 -5.41735,6.72605 -4.39866,10.80009 0.78648,2.05737 3.27714,0.72905 4.74722,0.35071 2.34808,-0.80131 4.91393,-1.09759 7.31867,-0.35434 1.7404,0.36092 3.39777,1.43912 5.22653,0.96777 1.36569,-1.08041 1.07795,-3.12191 0.86589,-4.65793 -0.80209,-3.86387 -3.67062,-7.23932 -7.29214,-8.76146 -2.27512,-0.82849 -4.71598,0.16902 -6.46751,1.65517 z"
style="fill:#000000;fill-opacity:0.501873;stroke-width:0.75242" />
<path
id="Seconds"
d="m 189.51747,85.781852 c 2.02769,-0.06687 3.97909,0.925006 5.3172,2.409994 1.90371,-2.144888 5.23526,-3.133216 7.89266,-1.809341 2.52051,1.170679 3.91015,3.996942 3.91896,6.696229 3.40939,-0.16756 6.23884,3.091216 6.09773,6.404199 0.0693,3.389997 -2.06309,6.873547 -5.26051,8.104947 0.76688,2.96527 0.94193,6.65112 -1.3959,8.98247 -1.90655,1.93295 -4.93353,1.60821 -7.27125,0.75847 -2.4847,-0.99458 -5.27721,-0.9649 -7.77775,-0.0439 -2.35161,0.8051 -5.33574,1.2517 -7.31259,-0.62986 -2.35997,-2.3436 -2.2342,-6.06154 -1.47259,-9.06731 -4.36788,-1.67729 -6.77078,-7.595648 -4.27717,-11.699145 1.06599,-1.737808 3.07423,-2.851692 5.11405,-2.812336 -0.0413,-3.591749 2.61044,-7.293038 6.42716,-7.294408 z m -1.7574,4.757111 c -1.81192,2.461002 -0.69753,6.53635 2.10233,7.74 1.83209,0.754727 3.6239,-1.04634 3.67148,-2.833605 0.27418,-2.451543 -1.11313,-5.593671 -3.83477,-5.842967 -0.74928,-0.0043 -1.45448,0.379707 -1.93904,0.936572 z m 10.35556,-0.159374 c -2.08352,1.748988 -2.73576,5.371102 -0.77164,7.438222 1.55853,1.421381 3.90041,0.146312 4.71545,-1.489156 1.13569,-1.953775 1.2561,-5.057704 -0.84008,-6.416977 -1.00328,-0.592007 -2.26821,-0.261696 -3.10373,0.467911 z m -16.73181,7.304883 c -1.56955,2.408558 0.28195,5.985468 2.95476,6.615648 1.96367,0.49207 3.26261,-1.78144 2.7511,-3.48319 -0.42569,-2.10465 -2.46097,-4.499988 -4.8119,-3.776246 -0.34918,0.128659 -0.65856,0.356552 -0.89396,0.643788 z m 24.31451,-0.633577 c -2.35708,0.879766 -3.94907,4.016485 -2.65012,6.313885 1.02886,1.61395 3.37794,0.97765 4.42757,-0.28263 1.44246,-1.41706 2.18595,-4.203652 0.53257,-5.729751 -0.64677,-0.478385 -1.56847,-0.586192 -2.31002,-0.301487 z m -15.45702,5.213095 c -3.16888,2.49136 -5.41735,6.72604 -4.39866,10.80009 0.78648,2.05737 3.27714,0.72905 4.74722,0.35071 2.34807,-0.80132 4.91393,-1.0976 7.31867,-0.35434 1.7404,0.36092 3.39777,1.43912 5.22653,0.96777 1.36569,-1.08041 1.07795,-3.12191 0.86589,-4.65793 -0.8021,-3.86388 -3.67062,-7.23933 -7.29214,-8.76147 -2.27512,-0.828479 -4.71598,0.16902 -6.46751,1.65518 z"
style="fill:#c7ae54;fill-opacity:1;stroke-width:0.75242" />
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -0,0 +1,6 @@
<strings>
<string id="AppName">KittieCats</string>
<string id="SettingsTitle">Settings</string>
<string id="SettingsTheme">Theme</string>
</strings>

View File

@ -0,0 +1,10 @@
[
{
"id": "default",
"name": "Default"
},
{
"id": "xmas",
"name": "Christmas"
}
]

View File

@ -0,0 +1,5 @@
<resources>
<jsonData id="ThemeDefault" filename="themes/default.json" />
<jsonData id="ThemeXMas" filename="themes/xmas.json" />
<jsonData id="ThemeInfo" filename="themes.json" />
</resources>

View File

@ -0,0 +1,6 @@
{
"ArmHourTintHi": 9708837,
"ArmHourTintLo": 14429228,
"ArmMinuteTintHi": 9708837,
"ArmMinuteTintLo": 14429228
}

View File

@ -0,0 +1,6 @@
{
"ArmHourTintHi": 9708837,
"ArmHourTintLo": 14429228,
"ArmMinuteTintHi": 9708837,
"ArmMinuteTintLo": 14429228
}

View File

@ -0,0 +1,119 @@
import Toybox.Complications;
import Toybox.Lang;
class ComplicationSnapshot
{
public var HeartRate as Lang.Numeric;
public var Steps as Lang.Numeric;
public var Stress as Lang.Numeric;
public var BodyBattery as Lang.Numeric;
function initialize(heartRate, steps, stress, bodyBattery)
{
self.HeartRate = heartRate;
self.Steps = steps;
self.Stress = stress;
self.BodyBattery = bodyBattery;
}
}
class ComplicationSubscriber
{
private static var instance = null;
private var heartRateComplicationId;
private var stepsComplicationId;
private var stressComplicationId;
private var bodyBatteryComplicationId;
private var heartRate = null;
private var steps = null;
private var stress = null;
private var bodyBattery = null;
public static function subscribe() as Void
{
ComplicationSubscriber.getInstance().internalSubscribe();
}
public static function getSnapshot() as ComplicationSnapshot
{
return ComplicationSubscriber.getInstance().internalGetSnapshot();
}
function internalSubscribe() as Void
{
self.heartRateComplicationId = new Id(Complications.COMPLICATION_TYPE_HEART_RATE);
self.stepsComplicationId = new Id(Complications.COMPLICATION_TYPE_STEPS);
self.stressComplicationId = new Id(Complications.COMPLICATION_TYPE_STRESS);
self.bodyBatteryComplicationId = new Id(Complications.COMPLICATION_TYPE_BODY_BATTERY);
Complications.registerComplicationChangeCallback(self.method(:onComplicationChanged));
Complications.subscribeToUpdates(self.heartRateComplicationId);
Complications.subscribeToUpdates(self.stepsComplicationId);
Complications.subscribeToUpdates(self.stressComplicationId);
Complications.subscribeToUpdates(self.bodyBatteryComplicationId);
}
function internalGetSnapshot() as ComplicationSnapshot
{
return new ComplicationSnapshot(
self.heartRate,
self.steps,
self.stress,
self.bodyBattery
);
}
function onComplicationChanged(complicationId as Complications.Id) as Void
{
var complicationValue = Complications.getComplication(complicationId).value;
switch (complicationId)
{
case self.heartRateComplicationId:
{
self.heartRate = complicationValue;
break;
}
case self.stepsComplicationId:
{
self.steps = complicationValue;
break;
}
case self.stressComplicationId:
{
self.stress = complicationValue;
break;
}
case self.bodyBatteryComplicationId:
{
self.bodyBattery = complicationValue;
break;
}
}
}
private static function getInstance()
{
if (instance == null)
{
instance = new ComplicationSubscriber();
}
return instance;
}
}

View File

@ -0,0 +1,41 @@
import Toybox.Application;
import Toybox.Lang;
import Toybox.WatchUi;
class KittieCatsApp extends Application.AppBase
{
function initialize()
{
AppBase.initialize();
}
function onStart(state as Dictionary?) as Void
{
ComplicationSubscriber.subscribe();
}
function onStop(state as Dictionary?) as Void
{
}
function getInitialView() as [Views] or [Views, InputDelegates]
{
return [ new KittieCatsView() ];
}
function getSettingsView() as [ Views ] or [ Views, InputDelegates ] or Null
{
return [ new KittieCatsSettingsView(), new KittieCatsSettingsMenuDelegate() ];
}
}
function getApp() as KittieCatsApp
{
return Application.getApp() as KittieCatsApp;
}

View File

@ -0,0 +1,128 @@
import Toybox.Lang;
import Toybox.WatchUi;
class KittieCatsSettingsView extends WatchUi.Menu2
{
private var themeMenuItem;
function initialize()
{
Menu2.initialize(null);
Menu2.setTitle(Rez.Strings.SettingsTitle);
self.themeMenuItem = new WatchUi.MenuItem(Rez.Strings.SettingsTheme, "", "theme", null);
Menu2.addItem(self.themeMenuItem);
// TODO add settings for low power mode
}
function onShow()
{
var currentTheme = ThemeManager.getInstance().getLocalizedCurrentTheme();
self.themeMenuItem.setSubLabel(currentTheme.Name);
}
}
class KittieCatsSettingsMenuDelegate extends WatchUi.Menu2InputDelegate
{
function initialize()
{
Menu2InputDelegate.initialize();
}
function onSelect(item)
{
var id = item.getId();
switch (id)
{
case "theme":
{
var themes = ThemeManager.getInstance().getLocalizedThemes();
var currentTheme = ThemeManager.getInstance().getLocalizedCurrentTheme();
// Not sure if I like the picker UI, but it'll do for now
WatchUi.pushView(new Picker({
:title => new WatchUi.Text({ :text => Rez.Strings.SettingsTheme }),
:pattern => [new ThemePickerFactory(themes)],
:defaults => [themes.indexOf(currentTheme)]
}), new ThemePickerDelegate(), WatchUi.SLIDE_LEFT);
break;
}
}
}
function onBack()
{
WatchUi.popView(WatchUi.SLIDE_IMMEDIATE);
}
}
class ThemePickerFactory extends WatchUi.PickerFactory
{
private var themes as Array<ThemeInfo>;
function initialize(themes)
{
PickerFactory.initialize();
self.themes = themes;
}
function getDrawable(item, isSelected)
{
return new WatchUi.Text({
:text => self.themes[item].Name,
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_SMALL,
:justification => Graphics.TEXT_JUSTIFY_LEFT
});
}
function getSize()
{
return self.themes.size();
}
function getValue(item)
{
return self.themes[item].Id;
}
}
class ThemePickerDelegate extends WatchUi.PickerDelegate
{
function initialize()
{
PickerDelegate.initialize();
}
function onAccept(values)
{
ThemeManager.getInstance().setCurrentThemeId(values[0]);
WatchUi.popView(WatchUi.SLIDE_DOWN);
return true;
}
function onCancel()
{
return true;
}
}

View File

@ -0,0 +1,203 @@
import Toybox.Graphics;
import Toybox.Lang;
import Toybox.Math;
import Toybox.System;
import Toybox.WatchUi;
class KittieCatsView extends WatchUi.WatchFace
{
private var theme;
private var backgroundHi;
private var backgroundLo;
private var armHour;
private var armMinute;
private var armSecond;
private var icons;
private var iconSize;
private var sleepTime;
private var wakeTime;
private var sleeping = false;
function initialize()
{
WatchFace.initialize();
}
function onLayout(dc as Dc) as Void
{
}
function onShow() as Void
{
self.theme = ThemeManager.getInstance().getCurrentTheme();
self.backgroundHi = Application.loadResource(self.theme.BackgroundHi);
self.backgroundLo = Application.loadResource(self.theme.BackgroundLo);
self.armHour = Application.loadResource(self.theme.ArmHour);
self.armMinute = Application.loadResource(self.theme.ArmMinute);
self.armSecond = Application.loadResource(self.theme.ArmSecond);
self.icons = Application.loadResource(Rez.Drawables.Icons);
self.iconSize = self.icons.getHeight();
var profile = UserProfile.getProfile();
self.sleepTime = profile.sleepTime;
self.wakeTime = profile.wakeTime;
}
function onHide() as Void
{
self.backgroundHi = null;
self.backgroundLo = null;
self.armHour = null;
self.armMinute = null;
self.armSecond = null;
self.icons = null;
}
function onUpdate(dc as Dc) as Void
{
var highPowerMode = self.isHighPowerMode();
var clockTime = System.getClockTime();
var complications = ComplicationSubscriber.getSnapshot();
dc.setColor(Graphics.COLOR_BLACK, Graphics.COLOR_BLACK);
dc.clear();
dc.setAntiAlias(true);
dc.drawBitmap(0, 0, highPowerMode ? self.backgroundHi : self.backgroundLo);
if (highPowerMode)
{
// --- Icons ---
self.drawIcon(dc, 0, 104, 145);
self.drawIcon(dc, 1, 170, 300);
self.drawIcon(dc, 2, 170, 335);
self.drawIcon(dc, 3, 237, 335);
}
// --- Arms ---
// Base the hour arm on minutes as well, to prevent the arm from staying on the
// current hour tick mark right up until the 59th minute
self.drawArm(dc, self.armHour, (clockTime.hour * 60) + clockTime.min, 720, highPowerMode ? self.theme.ArmHourTintHi : self.theme.ArmHourTintLo);
self.drawArm(dc, self.armMinute, clockTime.min, 60, highPowerMode ? self.theme.ArmMinuteTintHi : self.theme.ArmMinuteTintLo);
if (highPowerMode)
{
self.drawArm(dc, self.armSecond, clockTime.sec, 60, null);
// --- Complications ---
self.drawShadowedText(dc, 116, 186, Graphics.FONT_XTINY, complications.HeartRate, Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER,
Graphics.COLOR_BLACK, Graphics.COLOR_WHITE, 2);
self.drawShadowedText(dc, 195, 313, Graphics.FONT_XTINY, complications.Steps, Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
Graphics.COLOR_BLACK, Graphics.COLOR_WHITE, 2);
self.drawShadowedText(dc, 195, 346, Graphics.FONT_XTINY, complications.BodyBattery, Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
Graphics.COLOR_BLACK, Graphics.COLOR_WHITE, 2);
self.drawShadowedText(dc, 261, 346, Graphics.FONT_XTINY, complications.Stress, Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
Graphics.COLOR_BLACK, Graphics.COLOR_WHITE, 2);
}
}
function onExitSleep() as Void
{
self.sleeping = false;
}
function onEnterSleep() as Void
{
self.sleeping = true;
}
private function isHighPowerMode() as Boolean
{
if (self.sleeping)
{
return false;
}
// Since isSleepMode is deprecated, base it on the wake and sleep times. Unfortunately this means
// the display will never be in high power mode between those times even if desired.
// Can't figure out how to check for the locked state either.
// Might want to check for DND mode instead if this is annoying.
var now = Time.now();
var today = Time.today();
if (now.greaterThan(today.add(self.sleepTime)) && now.lessThan(today.add(self.wakeTime)))
{
return false;
}
return true;
}
private function drawArm(dc as Dc, bitmap as BitmapType, value as Lang.Numeric, max as Lang.Numeric, tintColor as Lang.Numeric or Null) as Void
{
var offsetX = Math.floor(bitmap.getWidth() / 2);
var offsetY = Math.floor(bitmap.getWidth() / 2);
var rotation = new Graphics.AffineTransform();
rotation.translate(offsetX, offsetY);
rotation.rotate(((Math.PI * 2) / max) * value);
rotation.translate(-offsetX, -offsetY);
// NOTE: drawBitmap2 fails on the Forerunner 165 with an error "Source must be native color format"
dc.drawBitmap2(0, 0, bitmap, {
:tintColor => tintColor,
:filterMode => Graphics.FILTER_MODE_BILINEAR,
:transform => rotation
});
}
private function drawShadowedText(dc as Dc, x as Lang.Numeric, y as Lang.Numeric, font as Graphics.FontType,
text as Lang.Object or Null, justification as Graphics.TextJustification or Lang.Number,
textColor as Graphics.ColorType, shadowColor as Graphics.ColorType, shadowOffset as Lang.Numeric) as Void
{
dc.setColor(shadowColor, Graphics.COLOR_TRANSPARENT);
dc.drawText(x + shadowOffset, y + shadowOffset, font, text, justification);
dc.setColor(textColor, Graphics.COLOR_TRANSPARENT);
dc.drawText(x, y, font, text, justification);
}
private function drawIcon(dc as Dc, iconIndex as Lang.Numeric, x as Lang.Numeric, y as Lang.Numeric)
{
dc.drawBitmap2(x - (iconIndex * self.iconSize), y, self.icons, {
:bitmapX => iconIndex * self.iconSize,
:bitmapWidth => self.iconSize,
:bitmapHeight => self.iconSize
});
}
}

View File

@ -0,0 +1,158 @@
import Toybox.Lang;
class Theme
{
public var BackgroundHi;
public var BackgroundLo;
public var ArmHour;
public var ArmMinute;
public var ArmSecond;
public var ArmHourTintHi;
public var ArmHourTintLo;
public var ArmMinuteTintHi;
public var ArmMinuteTintLo;
function initialize(backgroundHi, backgroundLo, armHour, armMinute, armSecond, variablesJsonResource)
{
self.BackgroundHi = backgroundHi;
self.BackgroundLo = backgroundLo;
self.ArmHour = armHour;
self.ArmMinute = armMinute;
self.ArmSecond = armSecond;
var variables = Application.loadResource(variablesJsonResource) as Dictionary<String, Object>;
self.ArmHourTintHi = variables["ArmHourTintHi"];
self.ArmHourTintLo = variables["ArmHourTintLo"];
self.ArmMinuteTintHi = variables["ArmMinuteTintHi"];
self.ArmMinuteTintLo = variables["ArmMinuteTintLo"];
}
}
class ThemeInfo
{
public var Id;
public var Name;
function initialize(id, name)
{
self.Id = id;
self.Name = name;
}
}
class ThemeManager
{
private static var instance = null;
private var currentThemeId = "default";
private var themes as Dictionary<String, Theme> = {};
private var localizedThemes as Array<ThemeInfo> or Null = null;
public function initialize()
{
self.themes["default"] = new Theme(
Rez.Drawables.Background,
Rez.Drawables.Ticks,
Rez.Drawables.ArmHour,
Rez.Drawables.ArmMinute,
Rez.Drawables.ArmSecond,
Rez.JsonData.ThemeDefault
);
self.themes["xmas"] = new Theme(
Rez.Drawables.BackgroundXmas,
Rez.Drawables.Ticks,
Rez.Drawables.ArmHour,
Rez.Drawables.ArmMinute,
Rez.Drawables.ArmSecond,
Rez.JsonData.ThemeXMas
);
var settingsThemeId = Application.Storage.getValue("theme");
if (settingsThemeId != null && self.themes.hasKey(settingsThemeId))
{
self.currentThemeId = settingsThemeId;
}
}
public function getCurrentThemeId() as Lang.String
{
return self.currentThemeId;
}
public function setCurrentThemeId(id as Lang.String) as Void
{
if (self.themes.hasKey(id))
{
self.currentThemeId = id;
Application.Storage.setValue("theme", id);
}
}
public function getCurrentTheme() as Theme
{
return self.themes[self.getCurrentThemeId()];
}
public function getLocalizedThemes() as Array<ThemeInfo>
{
if (self.localizedThemes == null)
{
var themes = Application.loadResource(Rez.JsonData.ThemeInfo) as Array<Dictionary<String, String>>;
self.localizedThemes = [];
for (var i = 0; i < themes.size(); i++)
{
self.localizedThemes.add(new ThemeInfo(themes[i]["id"], themes[i]["name"]));
}
}
return self.localizedThemes;
}
public function getLocalizedCurrentTheme() as ThemeInfo
{
var themes = self.getLocalizedThemes();
var currentThemeId = self.getCurrentThemeId();
for (var i = 0; i < themes.size(); i++)
{
if (themes[i].Id.equals(currentThemeId))
{
return themes[i];
}
}
return themes[0];
}
public static function getInstance()
{
if (instance == null)
{
instance = new ThemeManager();
}
return instance;
}
}

21
README.md Normal file
View File

@ -0,0 +1,21 @@
# My Garmin Watchfaces
This repository contains a few Garmin watchface apps I made for personal use. They are very specific and not very customizable, so I highly recommend the excellent [Watchface Builder](https://garmin.watchfacebuilder.com/) app instead.
However, I wanted some customizations that the Watchface Builder could not provide, as well as some experience developing for the watch myself. I'm sharing the code as a starting point or reference for your own versions.
If you want to use this code, do note that I did not include some of the assets used (such as background images) for privacy reasons. They are listed in .gitignore.
## Notes for NixOS
I created the included shell.nix to be able to run the Garmin Connect SDK on NixOS. At the time of writing the most recent SDK is Connect IQ 7.3.1 (September 2024). Newer versions may require tweaks to the library dependencies.
You will need to have ```programs.nix-ld.enable = true;``` in your configuration.nix somewhere. Run ```nix-shell``` in this folder to get a shell to be able to run the ```sdkmanager``` which you can download from the [Garmin developer site](https://developer.garmin.com/connect-iq/sdk/).
Note: at least on my KDE Plasma 6 Wayland environment, the login form you need to fill when running for the first time does not size properly. With a bit of effort (I recommend just tabbing on the keyboard) you can get focus to the username and password fields. They were practically zero width for me so you can't see what you are entering and I recommend pasting the values, hoping for the best and pressing Enter.
For debugging I have not yet been able (nor really tried that hard) to get VS Code to start the simulator succesfully. An easy workaround is to open a separate nix-shell to run it beforehand, the VS Code debugger will connect to it just fine.
```nix-shell --run ~/.Garmin/ConnectIQ/Sdks/connectiq-sdk-lin-7.3.1-2024-09-23-df7b5816a/bin/simulator```

16
nix-run-simulator.sh Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
CURRENT_SDK="$HOME/.Garmin/ConnectIQ/current-sdk.cfg"
if [[ -f "$CURRENT_SDK" ]]; then
FOLDER_PATH=$(<"$CURRENT_SDK")
if [[ -d "$FOLDER_PATH" ]]; then
nix-shell --run "$FOLDER_PATH/bin/simulator"
else
echo "Error: The folder specified in $CURRENT_SDK does not exist."
exit 1
fi
else
echo "Error: no currect Garmin Connect IQ SDK in $CURRENT_SDK."
exit 1
fi

48
shell.nix Normal file
View File

@ -0,0 +1,48 @@
with import <nixpkgs> {};
let
zlib129 = stdenv.mkDerivation {
pname = "Zlib 1.2.9";
version = "1.2.9";
src = fetchurl {
url = "https://zlib.net/fossils/zlib-1.2.9.tar.gz";
sha256 = "sha256-c6swLvMe0edIldKvVvUvWFPyawNw8+8hlUNHrOxeqiE=";
};
};
in
mkShell {
buildInputs = [
zlib129
];
NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
# For SDK Manager
at-spi2-atk
cairo
curl
expat
freetype
gdk-pixbuf
glib
glib-networking
gtk3
libjpeg8
libpng
libsecret
libsoup
pango
stdenv.cc.cc.lib
webkitgtk_4_0
xorg.libSM
xorg.libX11
xorg.libXext
xorg.libXxf86vm
zlib129
# For Simulator
systemdLibs
libusb1
];
GIO_EXTRA_MODULES = [ "${pkgs.glib-networking.out}/lib/gio/modules" ];
}