Merge branch 'pr-178'

Merging the battery stuff into this
This commit is contained in:
Hariharan Mudaliar 2025-12-20 12:00:06 +05:30
commit 38665e4061
No known key found for this signature in database
GPG key ID: 025583EB0BE5640E
6 changed files with 173 additions and 18 deletions

View file

@ -0,0 +1,12 @@
{
"info" : {
"author" : "xcode",
"version" : 1
},
"symbols" : [
{
"filename" : "battery.100percent.slash.svg",
"idiom" : "universal"
}
]
}

View file

@ -0,0 +1,121 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Generator: Apple Native CoreSVG 341-->
<!DOCTYPE svg
PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 3300 2200">
<!--glyph: "", point size: 100.0, font version: "21.0d6e2", template writer version: "138.0.0"-->
<style>.defaults {-sfsymbols-variable-value-mode:color;-sfsymbols-draw-reverses-motion-groups:true}
.monochrome-0 {-sfsymbols-motion-group:1;-sfsymbols-layer-tags:-56cc6d92543e1e1a battery.100percent ca5e34c65425580}
.monochrome-1 {-sfsymbols-motion-group:1;-sfsymbols-layer-tags:-56cc6d92543e1e1a battery.100percent ca5e34c65425580}
.monochrome-2 {opacity:0.0;-sfsymbols-clear-behind:true;-sfsymbols-motion-group:0;-sfsymbols-layer-tags:_slash ca5e34c65425580}
.monochrome-3 {-sfsymbols-motion-group:0;-sfsymbols-layer-tags:_slash ca5e34c65425580}
.multicolor-0:tintColor {-sfsymbols-motion-group:1;-sfsymbols-layer-tags:-56cc6d92543e1e1a battery.100percent ca5e34c65425580}
.multicolor-1:tintColor {-sfsymbols-motion-group:1;-sfsymbols-layer-tags:-56cc6d92543e1e1a battery.100percent ca5e34c65425580}
.multicolor-2:tintColor {opacity:0.0;-sfsymbols-clear-behind:true;-sfsymbols-motion-group:0;-sfsymbols-layer-tags:_slash ca5e34c65425580}
.multicolor-3:tintColor {-sfsymbols-motion-group:0;-sfsymbols-layer-tags:_slash ca5e34c65425580}
.hierarchical-0:secondary {-sfsymbols-motion-group:1;-sfsymbols-layer-tags:-56cc6d92543e1e1a battery.100percent ca5e34c65425580}
.hierarchical-1:secondary {-sfsymbols-motion-group:1;-sfsymbols-layer-tags:-56cc6d92543e1e1a battery.100percent ca5e34c65425580}
.hierarchical-2:primary {opacity:0.0;-sfsymbols-clear-behind:true;-sfsymbols-motion-group:0;-sfsymbols-layer-tags:_slash ca5e34c65425580}
.hierarchical-3:primary {-sfsymbols-motion-group:0;-sfsymbols-layer-tags:_slash ca5e34c65425580}
.SFSymbolsPreviewWireframe {fill:none;opacity:1.0;stroke:black;stroke-width:0.5}
</style>
<g id="Notes">
<rect height="2200" id="artboard" style="fill:white;opacity:1" width="3300" x="0" y="0"/>
<line style="fill:none;stroke:black;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="292" y2="292"/>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 263 322)">Weight/Scale Variations</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 559.711 322)">Ultralight</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 856.422 322)">Thin</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1153.13 322)">Light</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1449.84 322)">Regular</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1746.56 322)">Medium</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2043.27 322)">Semibold</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2339.98 322)">Bold</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2636.69 322)">Heavy</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2933.4 322)">Black</text>
<line style="fill:none;stroke:black;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1903" y2="1903"/>
<g transform="matrix(0.2 0 0 0.2 263 1933)">
<path d="m46.2402 4.15039c21.7773 0 39.4531-17.627 39.4531-39.4043s-17.6758-39.4043-39.4531-39.4043c-21.7285 0-39.4043 17.627-39.4043 39.4043s17.6758 39.4043 39.4043 39.4043Zm0-7.42188c-17.6758 0-31.9336-14.3066-31.9336-31.9824s14.2578-31.9824 31.9336-31.9824 31.9824 14.3066 31.9824 31.9824-14.3066 31.9824-31.9824 31.9824Zm3.61328-17.7734v-28.4668c0-2.24609-1.46484-3.75977-3.71094-3.75977-2.14844 0-3.61328 1.51367-3.61328 3.75977v28.4668c0 2.19727 1.46484 3.71094 3.61328 3.71094 2.24609 0 3.71094-1.51367 3.71094-3.71094Zm-17.8223-10.5957h28.418c2.19727 0 3.71094-1.46484 3.71094-3.61328 0-2.19727-1.51367-3.71094-3.71094-3.71094h-28.418c-2.24609 0-3.75977 1.51367-3.75977 3.71094 0 2.14844 1.51367 3.61328 3.75977 3.61328Z"/>
</g>
<g transform="matrix(0.2 0 0 0.2 281.506 1933)">
<path d="m58.5449 14.5508c27.4902 0 49.8047-22.3145 49.8047-49.8047s-22.3145-49.8047-49.8047-49.8047-49.8047 22.3145-49.8047 49.8047 22.3145 49.8047 49.8047 49.8047Zm0-8.30078c-22.9492 0-41.5039-18.5547-41.5039-41.5039s18.5547-41.5039 41.5039-41.5039 41.5039 18.5547 41.5039 41.5039-18.5547 41.5039-41.5039 41.5039Zm4.05273-23.0957v-36.9141c0-2.49023-1.70898-4.19922-4.15039-4.19922-2.39258 0-4.05273 1.70898-4.05273 4.19922v36.9141c0 2.44141 1.66016 4.15039 4.05273 4.15039 2.44141 0 4.15039-1.66016 4.15039-4.15039Zm-22.5586-14.4043h36.9629c2.44141 0 4.15039-1.61133 4.15039-4.00391 0-2.44141-1.70898-4.15039-4.15039-4.15039h-36.9629c-2.49023 0-4.15039 1.70898-4.15039 4.15039 0 2.39258 1.66016 4.00391 4.15039 4.00391Z"/>
</g>
<g transform="matrix(0.2 0 0 0.2 304.924 1933)">
<path d="m74.8535 28.3203c35.1074 0 63.623-28.4668 63.623-63.5742s-28.5156-63.623-63.623-63.623-63.5742 28.5156-63.5742 63.623 28.4668 63.5742 63.5742 63.5742Zm0-9.08203c-30.127 0-54.4922-24.3652-54.4922-54.4922s24.3652-54.4922 54.4922-54.4922 54.4922 24.3652 54.4922 54.4922-24.3652 54.4922-54.4922 54.4922Zm4.44336-30.3223v-48.4863c0-2.73438-1.85547-4.63867-4.54102-4.63867-2.58789 0-4.44336 1.9043-4.44336 4.63867v48.4863c0 2.68555 1.85547 4.58984 4.44336 4.58984 2.68555 0 4.54102-1.85547 4.54102-4.58984Zm-28.7109-19.7754h48.4863c2.68555 0 4.58984-1.80664 4.58984-4.39453 0-2.73438-1.85547-4.58984-4.58984-4.58984h-48.4863c-2.73438 0-4.58984 1.85547-4.58984 4.58984 0 2.58789 1.85547 4.39453 4.58984 4.39453Z"/>
</g>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 263 1953)">Design Variations</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1971)">Symbols are supported in up to nine weights and three scales.</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1989)">For optimal layout with text and other symbols, vertically align</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 2007)">symbols with the adjacent text.</text>
<line style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="776" x2="776" y1="1919" y2="1933"/>
<g transform="matrix(0.2 0 0 0.2 776 1933)">
<path d="m16.5527 0.78125c2.58789 0 3.85742-0.976562 4.78516-3.71094l20.5566-57.5195h0.244141l20.6055 57.5195c0.927734 2.73438 2.19727 3.71094 4.73633 3.71094 2.58789 0 4.24805-1.5625 4.24805-4.00391 0-0.830078-0.146484-1.61133-0.537109-2.63672l-22.9004-60.9863c-1.12305-2.97852-3.125-4.49219-6.25-4.49219-3.02734 0-5.07812 1.46484-6.15234 4.44336l-22.9004 61.084c-0.390625 1.02539-0.537109 1.80664-0.537109 2.63672 0 2.44141 1.5625 3.95508 4.10156 3.95508Zm10.2051-20.9473h30.6641c2.00195 0 3.66211-1.66016 3.66211-3.66211 0-2.05078-1.66016-3.66211-3.66211-3.66211h-30.6641c-2.00195 0-3.66211 1.61133-3.66211 3.66211 0 2.00195 1.66016 3.66211 3.66211 3.66211Z"/>
</g>
<line style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="792.836" x2="792.836" y1="1919" y2="1933"/>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 776 1953)">Margins</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 1971)">Leading and trailing margins on the left and right side of each symbol</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 1989)">can be adjusted by modifying the x-location of the margin guidelines.</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 2007)">Modifications are automatically applied proportionally to all</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 2025)">scales and weights.</text>
<g transform="matrix(0.2 0 0 0.2 1289 1933)">
<path d="m14.209 13.1348 7.86133 7.86133c4.29688 4.39453 9.32617 4.10156 13.8672-1.02539l60.6934-68.2129-4.88281-4.88281-60.2539 67.6758c-1.80664 1.95312-3.4668 2.44141-5.81055 0.0976562l-5.17578-5.12695c-2.29492-2.29492-1.80664-3.95508 0.195312-5.81055l67.4805-62.1582-4.88281-4.83398-68.0664 62.5977c-4.98047 4.58984-5.32227 9.47266-1.02539 13.8184Zm44.873-97.4609c-2.05078 2.00195-2.24609 4.88281-1.07422 6.78711 1.12305 1.80664 3.4668 3.02734 6.5918 2.24609 5.85938-1.66016 12.5977-2.39258 18.8965 0.927734l-2.68555 7.12891c-1.61133 4.00391-0.732422 6.88477 1.70898 9.42383l10.2539 10.3027c2.34375 2.39258 4.54102 2.44141 7.08008 1.95312l4.44336-0.732422 2.58789 2.53906-0.195312 2.24609c-0.0976562 2.29492 0.537109 4.29688 2.7832 6.49414l3.36914 3.32031c2.29492 2.29492 5.51758 2.49023 7.8125 0.195312l12.9883-13.0371c2.29492-2.34375 2.14844-5.37109-0.195312-7.66602l-3.41797-3.41797c-2.19727-2.19727-4.05273-3.02734-6.34766-2.88086l-2.34375 0.244141-2.44141-2.44141 1.02539-4.6875c0.634766-2.73438-0.244141-4.98047-2.88086-7.61719l-11.2793-11.1816c-12.9395-12.8418-35.5957-11.0352-46.6797-0.146484Zm7.08008 2.05078c8.78906-6.39648 25.9766-5.66406 33.6914 1.95312l12.3047 12.207c1.02539 1.02539 1.2207 1.80664 0.927734 3.32031l-1.46484 6.64062 6.73828 6.68945 4.39453-0.244141c1.12305-0.0488281 1.51367 0.0488281 2.34375 0.878906l2.53906 2.49023-10.8398 10.8398-2.49023-2.49023c-0.830078-0.878906-0.976562-1.2207-0.927734-2.39258l0.292969-4.3457-6.68945-6.73828-6.83594 1.17188c-1.41602 0.292969-2.05078 0.195312-3.17383-0.878906l-8.93555-8.88672c-1.07422-1.02539-1.17188-1.70898-0.488281-3.36914l4.58984-11.4746c-6.10352-6.34766-17.041-7.51953-25.5859-4.58984-0.683594 0.244141-0.927734-0.390625-0.390625-0.78125Z"/>
</g>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 1289 1953)">Exporting</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 1289 1971)">Symbols should be outlined when exporting to ensure the</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 1289 1989)">design is preserved when submitting to Xcode.</text>
<text id="template-version" style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1933)">Template v.7.0</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1951)">Requires Xcode 17 or greater</text>
<text id="descriptive-name" style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1969)">Generated from </text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1987)">Typeset at 100.0 points</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 726)">Small</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1156)">Medium</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1586)">Large</text>
</g>
<g id="Guides">
<g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 696)">
<path d="M0.993654 0L3.63775 0L29.3281-67.1323L30.0303-67.1323L30.0303-70.459L28.1226-70.459ZM11.6885-24.4799L46.9815-24.4799L46.2315-26.7285L12.4385-26.7285ZM55.1196 0L57.7637 0L30.6382-70.459L29.4326-70.459L29.4326-67.1323Z"/>
</g>
<line id="Baseline-S" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="696" y2="696"/>
<line id="Capline-S" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="625.541" y2="625.541"/>
<g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 1126)">
<path d="M0.993654 0L3.63775 0L29.3281-67.1323L30.0303-67.1323L30.0303-70.459L28.1226-70.459ZM11.6885-24.4799L46.9815-24.4799L46.2315-26.7285L12.4385-26.7285ZM55.1196 0L57.7637 0L30.6382-70.459L29.4326-70.459L29.4326-67.1323Z"/>
</g>
<line id="Baseline-M" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1126" y2="1126"/>
<line id="Capline-M" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1055.54" y2="1055.54"/>
<g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 1556)">
<path d="M0.993654 0L3.63775 0L29.3281-67.1323L30.0303-67.1323L30.0303-70.459L28.1226-70.459ZM11.6885-24.4799L46.9815-24.4799L46.2315-26.7285L12.4385-26.7285ZM55.1196 0L57.7637 0L30.6382-70.459L29.4326-70.459L29.4326-67.1323Z"/>
</g>
<line id="Baseline-L" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1556" y2="1556"/>
<line id="Capline-L" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1485.54" y2="1485.54"/>
<line id="right-margin-Black-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="3004.98" x2="3004.98" y1="600.785" y2="720.121"/>
<line id="left-margin-Black-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="2861.82" x2="2861.82" y1="600.785" y2="720.121"/>
<line id="right-margin-Regular-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="1517.28" x2="1517.28" y1="600.785" y2="720.121"/>
<line id="left-margin-Regular-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="1382.41" x2="1382.41" y1="600.785" y2="720.121"/>
<line id="right-margin-Ultralight-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="621.421" x2="621.421" y1="600.785" y2="720.121"/>
<line id="left-margin-Ultralight-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="498.001" x2="498.001" y1="600.785" y2="720.121"/>
</g>
<g id="Symbols">
<g id="Black-S" transform="matrix(1 0 0 1 2861.82 696)">
<path class="monochrome-0 multicolor-0:tintColor hierarchical-0:secondary SFSymbolsPreviewWireframe" d="M33.6914-4.19922L92.9688-4.19922C102.1-4.19922 107.324-5.71289 111.377-9.76562C115.43-13.8184 116.895-18.8965 116.895-28.125L116.895-42.3828C116.895-51.6113 115.43-56.7383 111.377-60.7422C107.275-64.7949 102.1-66.3086 92.9688-66.3086L33.6914-66.3086C24.5605-66.3086 19.3359-64.7949 15.2832-60.7422C11.2305-56.6895 9.76562-51.6113 9.76562-42.3828L9.76562-28.125C9.76562-18.8965 11.2305-13.7695 15.2832-9.76562C19.3848-5.71289 24.5605-4.19922 33.6914-4.19922ZM32.6172-18.3594C28.4668-18.3594 26.9043-18.9941 25.6836-20.166C24.4629-21.3379 23.9258-22.8516 23.9258-27.0508L23.9258-43.457C23.9258-47.6562 24.5117-49.1211 25.6836-50.3418C26.8555-51.5625 28.4668-52.1484 32.6172-52.1484L94.043-52.1484C98.1934-52.1484 99.7559-51.5137 100.977-50.3418C102.197-49.1699 102.734-47.6562 102.734-43.457L102.734-27.0508C102.734-22.8516 102.148-21.3867 100.977-20.166C99.8047-18.9453 98.1934-18.3594 94.043-18.3594ZM124.219-22.4609C128.125-22.7051 133.398-27.7344 133.398-35.2539C133.398-42.7734 128.125-47.8027 124.219-48.0469Z"/>
<path class="monochrome-1 multicolor-1:tintColor hierarchical-1:secondary SFSymbolsPreviewWireframe" d="M33.8379-24.9512L92.8223-24.9512C93.9941-24.9512 94.7754-25.1465 95.3613-25.7324C95.9473-26.3184 96.1426-27.0996 96.1426-28.2715L96.1426-42.2363C96.1426-43.4082 95.9473-44.1895 95.3613-44.7754C94.7754-45.3613 93.9941-45.5566 92.8223-45.5566L33.8379-45.5566C32.666-45.5566 31.8848-45.3613 31.2988-44.7754C30.7129-44.1895 30.5176-43.4082 30.5176-42.2363L30.5176-28.2715C30.5176-27.0996 30.7129-26.3184 31.2988-25.7324C31.8848-25.1465 32.666-24.9512 33.8379-24.9512Z"/>
<path class="monochrome-2 multicolor-2:tintColor hierarchical-2:primary SFSymbolsPreviewWireframe" d="M115.552-4.48836C119.203-0.837264 119.203 5.09118 115.552 8.74227C111.901 12.3934 105.972 12.3934 102.321 8.74227L27.6082-65.9706C23.9571-69.6217 23.9571-75.5502 27.6082-79.2013C31.2593-82.8524 37.1878-82.8524 40.8389-79.2013Z" data-clipstroke-keyframes="0 0 0 0.49990463 0.6089134 0 1 0 0.10891342"/>
<path class="monochrome-3 multicolor-3:tintColor hierarchical-3:primary SFSymbolsPreviewWireframe" d="M111.402-0.338247C112.762 1.02234 112.762 3.23158 111.402 4.59217C110.041 5.95275 107.832 5.95275 106.471 4.59217L31.7583-70.1207C30.3978-71.4813 30.3978-73.6906 31.7583-75.0511C33.1189-76.4117 35.3282-76.4117 36.6888-75.0511Z" data-clipstroke-keyframes="0 0 0 0.49988937 0.54707384 0 1 0 0.04707384"/>
</g>
<g id="Regular-S" transform="matrix(1 0 0 1 1382.41 696)">
<path class="monochrome-0 multicolor-0:tintColor hierarchical-0:secondary SFSymbolsPreviewWireframe" d="M30.6152-8.69141L91.2109-8.69141C97.5098-8.69141 103.32-9.22852 107.471-13.3301C111.572-17.4805 112.061-23.291 112.061-29.541L112.061-40.9668C112.061-47.2168 111.572-53.0273 107.471-57.1289C103.32-61.2793 97.5098-61.8164 91.2109-61.8164L30.6152-61.8164C24.3652-61.8164 18.5059-61.2793 14.3555-57.1289C10.2539-53.0273 9.76562-47.2168 9.76562-40.9668L9.76562-29.541C9.76562-23.291 10.2539-17.4805 14.3555-13.3301C18.5059-9.22852 24.3164-8.69141 30.6152-8.69141ZM29.541-15.7227C25.9766-15.7227 21.7773-16.1621 19.4824-18.457C17.1875-20.752 16.7969-24.9023 16.7969-28.4668L16.7969-41.9922C16.7969-45.6055 17.1875-49.707 19.4824-52.0508C21.7773-54.3457 25.9766-54.7363 29.5898-54.7363L92.2852-54.7363C95.8496-54.7363 100.049-54.3457 102.344-52.0508C104.639-49.707 105.029-45.6055 105.029-41.9922L105.029-28.4668C105.029-24.9023 104.639-20.752 102.344-18.457C100.049-16.1621 95.8496-15.7227 92.2852-15.7227ZM117.773-25C120.898-25.1953 125.098-29.1992 125.098-35.2539C125.098-41.3086 120.898-45.3125 117.773-45.5078Z"/>
<path class="monochrome-1 multicolor-1:tintColor hierarchical-1:secondary SFSymbolsPreviewWireframe" d="M27.0996-20.5078L94.7266-20.5078C96.875-20.5078 98.0957-20.8008 98.9746-21.7285C99.9023-22.6562 100.244-23.877 100.244-25.9766L100.244-44.5312C100.244-46.6309 99.9023-47.8516 99.0234-48.7793C98.0957-49.707 96.8262-49.9512 94.7266-49.9512L27.0996-49.9512C25-49.9512 23.7305-49.707 22.8516-48.7793C21.9238-47.8516 21.582-46.6309 21.582-44.4824L21.582-25.9766C21.582-23.877 21.9238-22.6562 22.8516-21.7285C23.7793-20.8008 25-20.5078 27.0996-20.5078Z"/>
<path class="monochrome-2 multicolor-2:tintColor hierarchical-2:primary SFSymbolsPreviewWireframe" d="M108.488-6.06714C111.77-2.78573 111.77 2.54245 108.488 5.82386C105.207 9.10527 99.8788 9.10527 96.5974 5.82386L26.3817-64.3918C23.1002-67.6733 23.1002-73.0014 26.3817-76.2828C29.6631-79.5643 34.9912-79.5643 38.2726-76.2828Z" data-clipstroke-keyframes="0 0 0 0.50010824 0.6049547 0 1 0 0.10495472"/>
<path class="monochrome-3 multicolor-3:tintColor hierarchical-3:primary SFSymbolsPreviewWireframe" d="M105.022-2.60066C106.39-1.23245 106.39 0.98917 105.022 2.35738C103.654 3.72558 101.432 3.72558 100.064 2.35738L29.8481-67.8583C28.4799-69.2265 28.4799-71.4482 29.8481-72.8164C31.2163-74.1846 33.438-74.1846 34.8062-72.8164Z" data-clipstroke-keyframes="0 0 0 0.50020504 0.5497174 0 1 0 0.049717426"/>
</g>
<g id="Ultralight-S" transform="matrix(1 0 0 1 498.001 696)">
<path class="monochrome-0 multicolor-0:tintColor hierarchical-0:secondary SFSymbolsPreviewWireframe" d="M28.1631-12.2334L86.2613-12.2334C93.877-12.2334 97.8257-13.27 100.75-16.1455C103.626-19.0698 104.613-22.9277 104.613-30.6309L104.613-39.6953C104.613-47.3984 103.626-51.3018 100.75-54.1773C97.7803-57.0562 93.877-58.0928 86.2613-58.0928L27.709-58.0928C20.5962-58.0928 16.5986-57.0108 13.7197-54.1319C10.7988-51.211 9.76562-47.3076 9.76562-40.1948L9.76562-30.6309C9.76562-22.9277 10.7534-19.0244 13.6743-16.1455C16.5986-13.27 20.502-12.2334 28.1631-12.2334ZM27.1797-14.4058C21.6626-14.4058 17.7359-15.481 15.3501-17.8667C12.9644-20.2524 11.9834-24.085 11.9834-29.6475L11.9834-40.2212C11.9834-46.1504 12.9644-50.1157 15.3047-52.5049C17.6905-54.936 21.7535-55.917 27.6372-55.917L87.2447-55.917C92.7617-55.917 96.6431-54.8452 99.0288-52.4595C101.415-50.0703 102.441-46.2412 102.441-40.6753L102.441-29.6475C102.441-24.085 101.369-20.2524 99.0288-17.8667C96.6431-15.4356 92.7617-14.4058 87.2447-14.4058ZM107.692-26.8618C110.227-27.0117 113.654-30.2891 113.654-35.1631C113.654-40.0371 110.227-43.3145 107.692-43.4644Z"/>
<path class="monochrome-1 multicolor-1:tintColor hierarchical-1:secondary SFSymbolsPreviewWireframe" d="M27.0542-17.4654L87.3248-17.4654C92.2886-17.4654 95.2349-18.2578 96.8858-19.9575C98.5855-21.7026 99.4268-24.6489 99.4268-29.5185L99.4268-40.8076C99.4268-45.7681 98.5855-48.6235 96.9346-50.3686C95.2349-52.0229 92.1944-52.8574 87.3248-52.8574L27.5083-52.8574C22.1846-52.8574 19.0987-52.0683 17.4478-50.414C15.7935-48.6689 14.9976-45.6318 14.9976-40.3501L14.9976-29.5185C14.9976-24.5581 15.7935-21.7026 17.4478-19.9575C19.1929-18.3032 22.23-17.4654 27.0542-17.4654Z"/>
<path class="monochrome-2 multicolor-2:tintColor hierarchical-2:primary SFSymbolsPreviewWireframe" d="M99.3962-3.06064C100.919-1.53808 100.919 0.934172 99.3962 2.45673C97.8737 3.97929 95.4014 3.97929 93.8789 2.45673L24.0238-67.3983C22.5012-68.9209 22.5012-71.3932 24.0238-72.9157C25.5463-74.4383 28.0186-74.4383 29.5411-72.9157Z" data-clipstroke-keyframes="0 0 0 0.5001135 0.5550747 0 1 0 0.05507469"/>
<path class="monochrome-3 multicolor-3:tintColor hierarchical-3:primary SFSymbolsPreviewWireframe" d="M97.3453-1.00975C97.736-0.619106 97.736 0.0152006 97.3453 0.405845C96.9547 0.796489 96.3204 0.796489 95.9297 0.405845L26.0747-69.4492C25.684-69.8399 25.684-70.4742 26.0747-70.8648C26.4653-71.2555 27.0996-71.2555 27.4903-70.8648Z" data-clipstroke-keyframes="0 0 0 0.50012684 0.51529884 0 1 0 0.015298843"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -3870,6 +3870,9 @@
}
}
}
},
"Battery settings and informations are only available on MacBooks" : {
},
"Battery Status" : {
"localizations" : {

View file

@ -1064,6 +1064,7 @@ struct Charge: View {
var body: some View {
Form {
if BatteryActivityManager.shared.hasBattery() {
Section {
Defaults.Toggle("Show battery indicator", key: .showBatteryIndicator)
.settingsHighlight(id: highlightID("Show battery indicator"))
@ -1082,6 +1083,16 @@ struct Charge: View {
} header: {
Text("Battery Information")
}
} else {
ContentUnavailableView {
VStack(spacing: 16) {
Image("battery.100percent.slash")
.font(.title)
Text("Battery settings and informations are only available on MacBooks")
.font(.title3)
}
}
}
}
.navigationTitle("Battery")
}

View file

@ -304,6 +304,14 @@ class BatteryActivityManager {
}
}
/// Determines if the device has a battery
/// - Returns: True if the computer has a battery, false otherwhise
func hasBattery() -> Bool {
guard let snapshot = IOPSCopyPowerSourcesInfo()?.takeRetainedValue() else { return false }
guard let sources = IOPSCopyPowerSourcesList(snapshot)?.takeRetainedValue() as? [CFTypeRef] else { return false }
return !sources.isEmpty
}
deinit {
stopMonitoring()
NotificationCenter.default.removeObserver(self)

View file

@ -483,7 +483,7 @@ extension Defaults.Keys {
// MARK: Battery
static let showPowerStatusNotifications = Key<Bool>("showPowerStatusNotifications", default: true)
static let showBatteryIndicator = Key<Bool>("showBatteryIndicator", default: true)
static let showBatteryIndicator = Key<Bool>("showBatteryIndicator", default: BatteryActivityManager.shared.hasBattery())
static let showBatteryPercentage = Key<Bool>("showBatteryPercentage", default: true)
static let showPowerStatusIcons = Key<Bool>("showPowerStatusIcons", default: true)
static let playLowBatteryAlertSound = Key<Bool>("playLowBatteryAlertSound", default: true)