Merge pull request #7 from tr1xem/macos

Adding OSD
This commit is contained in:
sankalp authored and GitHub committed 2025-07-30 17:36:41 +05:45
commit 51b1bef8d4
17 files changed
+351 -182

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -.00047914)" fill="#dedede">
<rect y="6" width="5" height="4" ry="1" fill-rule="evenodd"/>
<path d="m6 3-3 3v4l3 3z"/>
<g fill-rule="evenodd">
<path d="M 13.139,1.428 C 12.594,1 12,1.652 12.455,2.16 A 8,8 0 0 1 15,8 8,8 0 0 1 12.446,13.852 C 12,14.323 12.626,15 13.123,14.58 A 9,9 0 0 0 16,8 9,9 0 0 0 13.139,1.428 Z"/>
<path d="m10.775 2.889c-0.587-0.535-1.199 0.225-0.684 0.732a6 6 0 0 1 1.909 4.379 6 6 0 0 1-1.916 4.389c-0.469 0.446 0.173 1.146 0.68 0.728a7 7 0 0 0 2.236-5.117 7 7 0 0 0-2.225-5.111z"/>
<path d="M 8.41,4.35 C 7.89,3.856 7.255,4.57 7.727,5.08 A 4,4 0 0 1 9,8 4,4 0 0 1 7.723,10.926 c -0.473,0.43 0.14,1.152 0.68,0.73 A 5,5 0 0 0 10,8 5,5 0 0 0 8.41,4.35 Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 820 B

+141
View File
@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg2"
width="16"
height="16"
viewBox="0 0 16 16"
sodipodi:docname="brightness-display-symbolic.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata
id="metadata8">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="941"
id="namedview4"
showgrid="true"
inkscape:zoom="14.75"
inkscape:cx="8.2021559"
inkscape:cy="9.6684194"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
inkscape:document-rotation="0">
<inkscape:grid
type="xygrid"
id="grid817"
spacingx="1"
spacingy="1" />
</sodipodi:namedview>
<ellipse
style="opacity:1;fill:#f5f5f5;stroke-width:0.747454;fill-opacity:1"
id="path831"
cx="8.0105047"
cy="8.0086908"
rx="4.0077391"
ry="4.0165114" />
<rect
style="opacity:1;fill:#f5f5f5;fill-opacity:1"
id="rect833"
width="2"
height="3"
x="7"
y="0"
rx="1"
ry="1" />
<rect
style="opacity:1;fill:#f5f5f5;fill-opacity:1"
id="rect837"
width="3"
height="2"
x="13"
y="7"
rx="1"
ry="1" />
<rect
style="opacity:1;fill:#f5f5f5;fill-opacity:1"
id="rect841"
width="2"
height="3"
x="7"
y="13"
rx="1"
ry="1" />
<rect
style="opacity:1;fill:#f5f5f5;fill-opacity:1"
id="rect845"
width="3"
height="2"
x="0"
y="7"
rx="1"
ry="1" />
<rect
style="opacity:1;fill:#f5f5f5;fill-opacity:1"
id="rect853"
width="2"
height="3"
x="-1"
y="3.3137085"
rx="1"
ry="1"
transform="rotate(-45)" />
<rect
style="opacity:1;fill:#f5f5f5;fill-opacity:1"
id="rect855"
width="3"
height="2"
x="5"
y="10.313708"
rx="1"
ry="1"
transform="rotate(-45)" />
<rect
style="opacity:1;fill:#f5f5f5;fill-opacity:1"
id="rect857"
width="2"
height="3"
x="-1"
y="16.313709"
rx="1"
ry="1"
transform="rotate(-45)" />
<rect
style="opacity:1;fill:#f5f5f5;fill-opacity:1"
id="rect859"
width="3"
height="2"
x="-8"
y="10.313708"
rx="1"
ry="1"
transform="rotate(-45)" />
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

+9
View File
@@ -0,0 +1,9 @@
<svg width="22" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text { color:#202020; } .ColorScheme-Highlight { color:#4285f4; }</style>
</defs>
<g transform="translate(3,-5)" class="ColorScheme-Text" fill="currentColor">
<rect x="5" y="9" width="6" height="10" ry="3"/>
<path d="m3.5 14c-0.277 0-0.5 0.223-0.5 0.5v1.5c0 2.6 1.967 4.725 4.5 4.975v1.025h-2a0.5 0.5 0 1 0 0 1h5a0.5 0.5 0 1 0 0-1h-2v-1.025a4.988 4.988 0 0 0 4.5-4.975v-1.5a0.5 0.5 0 1 0-1 0v1.5c0 2.216-1.784 4-4 4s-4-1.784-4-4v-1.5c0-0.277-0.223-0.5-0.5-0.5z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 633 B

+9
View File
@@ -0,0 +1,9 @@
<svg width="16" height="16" version="1.1">
<defs>
<style id="current-color-scheme" type="text/css">
.ColorScheme-Text { color:#ffffff; } .ColorScheme-Highlight { color:#5294e2; }
</style>
</defs>
<path d="m8 1.002c-1.662 0-3 1.338-3 3v4c0 1.662 1.338 3 3 3s3-1.338 3-3v-4c0-1.662-1.338-3-3-3zm0 1c1.108 0 2 0.892 2 2v4c0 1.108-0.892 2-2 2s-2-0.892-2-2v-4c0-1.108 0.892-2 2-2z" style="fill:currentColor" class="ColorScheme-Text"/>
<path d="m3.5 6.001c-0.277 0-0.5 0.223-0.5 0.5v1.5c0 2.6008 1.967 4.7248 4.5 4.9746v1.0254h-2c-0.277 0-0.5 0.223-0.5 0.5s0.223 0.5 0.5 0.5h5c0.277 0 0.5-0.223 0.5-0.5s-0.223-0.5-0.5-0.5h-2v-1.0254c2.533-0.24983 4.5-2.3738 4.5-4.9746v-1.5c0-0.277-0.223-0.5-0.5-0.5s-0.5 0.223-0.5 0.5v1.5c0 2.216-1.784 4-4 4s-4-1.784-4-4v-1.5c0-0.277-0.223-0.5-0.5-0.5z" style="fill:currentColor" class="ColorScheme-Text"/>
</svg>

After

Width:  |  Height:  |  Size: 854 B

+12
View File
@@ -0,0 +1,12 @@
<svg width="16" height="16" version="1.1">
<defs>
<style id="current-color-scheme" type="text/css">
.ColorScheme-Text { color:#ffffff; } .ColorScheme-Highlight { color:#5294e2; }
</style>
</defs>
<g style="fill:currentColor" class="ColorScheme-Text">
<path d="m8 1.002c-1.662 0-3 1.338-3 3v4c0 1.662 1.338 3 3 3s3-1.338 3-3v-4c0-1.662-1.338-3-3-3zm0 1c1.108 0 2 0.892 2 2v4c0 1.108-0.892 2-2 2s-2-0.892-2-2v-4c0-1.108 0.892-2 2-2z" style="fill:currentColor" class="ColorScheme-Text"/>
<path d="m3.5 6.001c-0.277 0-0.5 0.223-0.5 0.5v1.5c0 2.6008 1.967 4.7248 4.5 4.9746v1.0254h-2c-0.277 0-0.5 0.223-0.5 0.5s0.223 0.5 0.5 0.5h5c0.277 0 0.5-0.223 0.5-0.5s-0.223-0.5-0.5-0.5h-2v-1.0254c2.533-0.24983 4.5-2.3738 4.5-4.9746v-1.5c0-0.277-0.223-0.5-0.5-0.5s-0.5 0.223-0.5 0.5v1.5c0 2.216-1.784 4-4 4s-4-1.784-4-4v-1.5c0-0.277-0.223-0.5-0.5-0.5z" style="fill:currentColor" class="ColorScheme-Text"/>
<path d="m5 6.002v2c0 1.662 1.338 3 3 3s3-1.338 3-3v-2h-6z" style="fill:currentColor" class="ColorScheme-Text"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

+9
View File
@@ -0,0 +1,9 @@
<svg width="16" height="16" version="1.1">
<defs>
<style id="current-color-scheme" type="text/css">
.ColorScheme-Text { color:#ffffff; } .ColorScheme-Highlight { color:#5294e2; }
</style>
</defs>
<rect x="5" y="1.001" width="6" height="10" ry="3" style="fill:currentColor" class="ColorScheme-Text"/>
<path d="m3.5 6.001c-0.277 0-0.5 0.223-0.5 0.5v1.5c0 2.6008 1.967 4.7248 4.5 4.9746v1.0254h-2c-0.277 0-0.5 0.223-0.5 0.5s0.223 0.5 0.5 0.5h5c0.277 0 0.5-0.223 0.5-0.5s-0.223-0.5-0.5-0.5h-2v-1.0254c2.533-0.24983 4.5-2.3738 4.5-4.9746v-1.5c0-0.277-0.223-0.5-0.5-0.5s-0.5 0.223-0.5 0.5v1.5c0 2.216-1.784 4-4 4s-4-1.784-4-4v-1.5c0-0.277-0.223-0.5-0.5-0.5z" style="fill:currentColor" class="ColorScheme-Text"/>
</svg>

After

Width:  |  Height:  |  Size: 724 B

+9
View File
@@ -0,0 +1,9 @@
<svg width="16" height="16" version="1.1">
<defs>
<style id="current-color-scheme" type="text/css">
.ColorScheme-Text { color:#ffffff; } .ColorScheme-Highlight { color:#5294e2; }
</style>
</defs>
<path d="m8 1.002c-1.662 0-3 1.338-3 3v4c0 1.662 1.338 3 3 3s3-1.338 3-3v-4c0-1.662-1.338-3-3-3zm0 1c1.108 0 2 0.892 2 2v4c0 1.108-0.892 2-2 2s-2-0.892-2-2v-4c0-1.108 0.892-2 2-2z" style="fill:currentColor" class="ColorScheme-Text"/>
<path d="m3.5 6.001c-0.277 0-0.5 0.223-0.5 0.5v1.5c0 2.6008 1.967 4.7248 4.5 4.9746v1.0254h-2c-0.277 0-0.5 0.223-0.5 0.5s0.223 0.5 0.5 0.5h5c0.277 0 0.5-0.223 0.5-0.5s-0.223-0.5-0.5-0.5h-2v-1.0254c2.533-0.24983 4.5-2.3738 4.5-4.9746v-1.5c0-0.277-0.223-0.5-0.5-0.5s-0.5 0.223-0.5 0.5v1.5c0 2.216-1.784 4-4 4s-4-1.784-4-4v-1.5c0-0.277-0.223-0.5-0.5-0.5z" style="fill:currentColor" class="ColorScheme-Text"/>
</svg>

After

Width:  |  Height:  |  Size: 854 B

@@ -0,0 +1,4 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path d="m12.738 1.291c-0.37563 0.026826-0.62454 0.48828-0.2832 0.86914 1.6202 1.5104 2.5416 3.6249 2.5449 5.8398-0.0026 2.2205-0.92792 4.3401-2.5547 5.8516-0.44531 0.47165 0.18064 1.1484 0.67774 0.72852 1.8304-1.6992 2.8725-4.0825 2.877-6.5801-0.0026-2.4925-1.0386-4.8722-2.8613-6.5723-0.13636-0.10693-0.27518-0.14566-0.40039-0.13672zm-2.3906 1.416c-0.39562 0.011891-0.64227 0.53363-0.25586 0.91406 1.2147 1.1326 1.9056 2.7181 1.9082 4.3789-0.0019 1.6654-0.69596 3.2551-1.916 4.3887-0.46835 0.44623 0.17346 1.1467 0.67969 0.72852 1.423-1.3216 2.233-3.1751 2.2363-5.1172-0.0019-1.9383-0.8074-3.789-2.2246-5.1113-0.14685-0.13372-0.29586-0.1856-0.42774-0.18164zm-4.3477 0.29297-3 3h-2c-0.554 0-1 0.446-1 1v2c0 0.554 0.446 1 1 1h2l3 3v-10zm2.0176 1.1836c-0.37603 0.016385-0.64465 0.51365-0.29102 0.89648 0.81045 0.75501 1.2715 1.8123 1.2734 2.9199-0.00128 1.1103-0.464 2.1701-1.2773 2.9258-0.47259 0.42993 0.13957 1.1522 0.67969 0.73047 1.0168-0.94425 1.5955-2.2686 1.5977-3.6562-0.00172-1.3844-0.57742-2.7062-1.5898-3.6504-0.13024-0.12342-0.26724-0.17148-0.39258-0.16602z" fill="#dedede" opacity=".35"/>
<rect transform="rotate(45)" x="1.3137" y="-.5" width="20" height="1" rx=".5" ry=".5" fill="#dedede"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,11 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -.00047914)" fill="#dedede">
<rect y="6" width="5" height="4" ry="1" fill-rule="evenodd"/>
<path d="m6 3-3 3v4l3 3z"/>
<g fill-rule="evenodd">
<path d="M 13.139,1.428 C 12.594,1 12,1.652 12.455,2.16 A 8,8 0 0 1 15,8 8,8 0 0 1 12.446,13.852 C 12,14.323 12.626,15 13.123,14.58 A 9,9 0 0 0 16,8 9,9 0 0 0 13.139,1.428 Z" opacity=".35"/>
<path d="m10.775 2.889c-0.587-0.535-1.199 0.225-0.684 0.732a6 6 0 0 1 1.909 4.379 6 6 0 0 1-1.916 4.389c-0.469 0.446 0.173 1.146 0.68 0.728a7 7 0 0 0 2.236-5.117 7 7 0 0 0-2.225-5.111z" opacity=".35"/>
<path d="M 8.41,4.35 C 7.89,3.856 7.255,4.57 7.727,5.08 A 4,4 0 0 1 9,8 4,4 0 0 1 7.723,10.926 c -0.473,0.43 0.14,1.152 0.68,0.73 A 5,5 0 0 0 10,8 5,5 0 0 0 8.41,4.35 Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 848 B

@@ -0,0 +1,11 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -.00047914)" fill="#dedede">
<rect y="6" width="5" height="4" ry="1" fill-rule="evenodd"/>
<path d="m6 3-3 3v4l3 3z"/>
<g fill-rule="evenodd">
<path d="M 13.139,1.428 C 12.594,1 12,1.652 12.455,2.16 A 8,8 0 0 1 15,8 8,8 0 0 1 12.446,13.852 C 12,14.323 12.626,15 13.123,14.58 A 9,9 0 0 0 16,8 9,9 0 0 0 13.139,1.428 Z" opacity=".35"/>
<path d="m10.775 2.889c-0.587-0.535-1.199 0.225-0.684 0.732a6 6 0 0 1 1.909 4.379 6 6 0 0 1-1.916 4.389c-0.469 0.446 0.173 1.146 0.68 0.728a7 7 0 0 0 2.236-5.117 7 7 0 0 0-2.225-5.111z"/>
<path d="M 8.41,4.35 C 7.89,3.856 7.255,4.57 7.727,5.08 A 4,4 0 0 1 9,8 4,4 0 0 1 7.723,10.926 c -0.473,0.43 0.14,1.152 0.68,0.73 A 5,5 0 0 0 10,8 5,5 0 0 0 8.41,4.35 Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 834 B

@@ -0,0 +1,11 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -.00047914)" fill="#dedede">
<rect y="6" width="5" height="4" ry="1" fill-rule="evenodd"/>
<path d="m6 3-3 3v4l3 3z"/>
<g fill-rule="evenodd">
<path d="M 13.139,1.428 C 12.594,1 12,1.652 12.455,2.16 A 8,8 0 0 1 15,8 8,8 0 0 1 12.446,13.852 C 12,14.323 12.626,15 13.123,14.58 A 9,9 0 0 0 16,8 9,9 0 0 0 13.139,1.428 Z"/>
<path d="m10.775 2.889c-0.587-0.535-1.199 0.225-0.684 0.732a6 6 0 0 1 1.909 4.379 6 6 0 0 1-1.916 4.389c-0.469 0.446 0.173 1.146 0.68 0.728a7 7 0 0 0 2.236-5.117 7 7 0 0 0-2.225-5.111z"/>
<path d="M 8.41,4.35 C 7.89,3.856 7.255,4.57 7.727,5.08 A 4,4 0 0 1 9,8 4,4 0 0 1 7.723,10.926 c -0.473,0.43 0.14,1.152 0.68,0.73 A 5,5 0 0 0 10,8 5,5 0 0 0 8.41,4.35 Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 820 B

@@ -1,11 +0,0 @@
<svg version="1.1" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text { color:#f2f2f2; }</style>
</defs>
<g id="audio" class="ColorScheme-Text" fill="currentColor">
<path d="m12.858 24c0.6591 0 1.1425-0.61168 1.1425-1.2621v-13.421c0-0.65918-0.4834-1.317-1.1601-1.317-0.4483 0-0.7734 0.18457-1.2481 0.65039l-3.8984 3.2705c-0.05274 0.05273-0.12305 0.0791-0.20215 0.0791h-2.4873c-1.3008 0-2.0039 0.72073-2.0039 2.083v3.834c0 1.3623 0.70312 2.083 2.0039 2.083h2.4873c0.0791 0 0.14062 0.0264 0.20215 0.0791l3.8984 3.3144c0.4395 0.4219 0.8086 0.6065 1.2657 0.6065z"/>
<path d="m25.01 7.1387a0.75 0.75 0 0 0-0.56445 0.10156 0.75 0.75 0 0 0-0.22461 1.0371c1.4861 2.3017 2.2779 4.9829 2.2793 7.7227-4.55e-4 2.7402-0.79156 5.4222-2.2773 7.7246a0.75 0.75 0 0 0 0.22461 1.0371 0.75 0.75 0 0 0 1.0371-0.22461c1.6421-2.5446 2.5151-5.5086 2.5156-8.5371-0.001509-3.028-0.87512-5.9913-2.5176-8.5352a0.75 0.75 0 0 0-0.47266-0.32617z"/>
<path d="m20.664 9.6777a0.75 0.75 0 0 0-0.22461 1.0371c1.0173 1.5751 1.5596 3.4102 1.5605 5.2852-4e-4 1.8748-0.54196 3.7099-1.5586 5.2852a0.75 0.75 0 0 0 0.22461 1.0371 0.75 0.75 0 0 0 1.0371-0.22461c1.173-1.8175 1.7964-3.9345 1.7969-6.0977-0.001071-2.1633-0.62513-4.2804-1.7988-6.0977a0.75 0.75 0 0 0-1.0371-0.22461z"/>
<path d="m17.305 11.846a0.75 0.75 0 0 0-0.22461 1.0371c0.59974 0.92902 0.9196 2.0114 0.91992 3.1172-3.26e-4 1.1058-0.32018 2.1882-0.91992 3.1172a0.75 0.75 0 0 0 0.22461 1.0371 0.75 0.75 0 0 0 1.0371-0.22461c0.75612-1.1713 1.1578-2.5356 1.1582-3.9297-4.12e-4 -1.3941-0.40208-2.7584-1.1582-3.9297a0.75 0.75 0 0 0-1.0371-0.22461z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

@@ -1,11 +0,0 @@
<svg version="1.1" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text { color:#f2f2f2; }</style>
</defs>
<g id="audio" class="ColorScheme-Text" fill="currentColor">
<path d="m12.858 24c0.6591 0 1.1425-0.61168 1.1425-1.2621v-13.421c0-0.65918-0.4834-1.317-1.1601-1.317-0.4483 0-0.7734 0.18457-1.2481 0.65039l-3.8984 3.2705c-0.05274 0.05273-0.12305 0.0791-0.20215 0.0791h-2.4873c-1.3008 0-2.0039 0.72073-2.0039 2.083v3.834c0 1.3623 0.70312 2.083 2.0039 2.083h2.4873c0.0791 0 0.14062 0.0264 0.20215 0.0791l3.8984 3.3144c0.4395 0.4219 0.8086 0.6065 1.2657 0.6065z"/>
<path d="m25.01 7.1387a0.75 0.75 0 0 0-0.56445 0.10156 0.75 0.75 0 0 0-0.22461 1.0371c1.4861 2.3017 2.2779 4.9829 2.2793 7.7227-4.55e-4 2.7402-0.79156 5.4222-2.2773 7.7246a0.75 0.75 0 0 0 0.22461 1.0371 0.75 0.75 0 0 0 1.0371-0.22461c1.6421-2.5446 2.5151-5.5086 2.5156-8.5371-0.001509-3.028-0.87512-5.9913-2.5176-8.5352a0.75 0.75 0 0 0-0.47266-0.32617z" opacity=".35"/>
<path d="m20.664 9.6777a0.75 0.75 0 0 0-0.22461 1.0371c1.0173 1.5751 1.5596 3.4102 1.5605 5.2852-4e-4 1.8748-0.54196 3.7099-1.5586 5.2852a0.75 0.75 0 0 0 0.22461 1.0371 0.75 0.75 0 0 0 1.0371-0.22461c1.173-1.8175 1.7964-3.9345 1.7969-6.0977-0.001071-2.1633-0.62513-4.2804-1.7988-6.0977a0.75 0.75 0 0 0-1.0371-0.22461z" opacity=".35"/>
<path d="m17.305 11.846a0.75 0.75 0 0 0-0.22461 1.0371c0.59974 0.92902 0.9196 2.0114 0.91992 3.1172-3.26e-4 1.1058-0.32018 2.1882-0.91992 3.1172a0.75 0.75 0 0 0 0.22461 1.0371 0.75 0.75 0 0 0 1.0371-0.22461c0.75612-1.1713 1.1578-2.5356 1.1582-3.9297-4.12e-4 -1.3941-0.40208-2.7584-1.1582-3.9297a0.75 0.75 0 0 0-1.0371-0.22461z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

@@ -1,11 +0,0 @@
<svg version="1.1" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text { color:#f2f2f2; }</style>
</defs>
<g id="audio" class="ColorScheme-Text" fill="currentColor">
<path d="m12.858 24c0.6591 0 1.1425-0.61168 1.1425-1.2621v-13.421c0-0.65918-0.4834-1.317-1.1601-1.317-0.4483 0-0.7734 0.18457-1.2481 0.65039l-3.8984 3.2705c-0.05274 0.05273-0.12305 0.0791-0.20215 0.0791h-2.4873c-1.3008 0-2.0039 0.72073-2.0039 2.083v3.834c0 1.3623 0.70312 2.083 2.0039 2.083h2.4873c0.0791 0 0.14062 0.0264 0.20215 0.0791l3.8984 3.3144c0.4395 0.4219 0.8086 0.6065 1.2657 0.6065z"/>
<path d="m25.01 7.1387a0.75 0.75 0 0 0-0.56445 0.10156 0.75 0.75 0 0 0-0.22461 1.0371c1.4861 2.3017 2.2779 4.9829 2.2793 7.7227-4.55e-4 2.7402-0.79156 5.4222-2.2773 7.7246a0.75 0.75 0 0 0 0.22461 1.0371 0.75 0.75 0 0 0 1.0371-0.22461c1.6421-2.5446 2.5151-5.5086 2.5156-8.5371-0.001509-3.028-0.87512-5.9913-2.5176-8.5352a0.75 0.75 0 0 0-0.47266-0.32617z" opacity=".35"/>
<path d="m20.664 9.6777a0.75 0.75 0 0 0-0.22461 1.0371c1.0173 1.5751 1.5596 3.4102 1.5605 5.2852-4e-4 1.8748-0.54196 3.7099-1.5586 5.2852a0.75 0.75 0 0 0 0.22461 1.0371 0.75 0.75 0 0 0 1.0371-0.22461c1.173-1.8175 1.7964-3.9345 1.7969-6.0977-0.001071-2.1633-0.62513-4.2804-1.7988-6.0977a0.75 0.75 0 0 0-1.0371-0.22461z"/>
<path d="m17.305 11.846a0.75 0.75 0 0 0-0.22461 1.0371c0.59974 0.92902 0.9196 2.0114 0.91992 3.1172-3.26e-4 1.1058-0.32018 2.1882-0.91992 3.1172a0.75 0.75 0 0 0 0.22461 1.0371 0.75 0.75 0 0 0 1.0371-0.22461c0.75612-1.1713 1.1578-2.5356 1.1582-3.9297-4.12e-4 -1.3941-0.40208-2.7584-1.1582-3.9297a0.75 0.75 0 0 0-1.0371-0.22461z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

@@ -1,12 +0,0 @@
<svg version="1.1" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text { color:#f2f2f2; }</style>
</defs>
<g id="audio" class="ColorScheme-Text" fill="currentColor">
<rect transform="rotate(45)" x="6.6274" y="-.75" width="32" height="1.5" rx=".75" ry=".75"/>
<path d="m12.858 24c0.6591 0 1.1425-0.61168 1.1425-1.2621v-13.421c0-0.65918-0.4834-1.317-1.1601-1.317-0.4483 0-0.7734 0.18457-1.2481 0.65039l-3.8984 3.2705c-0.05274 0.05273-0.12305 0.0791-0.20215 0.0791h-2.4873c-1.3008 0-2.0039 0.72073-2.0039 2.083v3.834c0 1.3623 0.70312 2.083 2.0039 2.083h2.4873c0.0791 0 0.14062 0.0264 0.20215 0.0791l3.8984 3.3144c0.4395 0.4219 0.8086 0.6065 1.2657 0.6065z" opacity=".35"/>
<path d="m25.01 7.1387a0.75 0.75 0 0 0-0.56445 0.10156 0.75 0.75 0 0 0-0.22461 1.0371c1.4861 2.3017 2.2779 4.9829 2.2793 7.7227-4.55e-4 2.7402-0.79156 5.4222-2.2773 7.7246a0.75 0.75 0 0 0 0.22461 1.0371 0.75 0.75 0 0 0 1.0371-0.22461c1.6421-2.5446 2.5151-5.5086 2.5156-8.5371-0.001509-3.028-0.87512-5.9913-2.5176-8.5352a0.75 0.75 0 0 0-0.47266-0.32617z" opacity=".35"/>
<path d="m20.664 9.6777a0.75 0.75 0 0 0-0.22461 1.0371c1.0173 1.5751 1.5596 3.4102 1.5605 5.2852-4e-4 1.8748-0.54196 3.7099-1.5586 5.2852a0.75 0.75 0 0 0 0.22461 1.0371 0.75 0.75 0 0 0 1.0371-0.22461c1.173-1.8175 1.7964-3.9345 1.7969-6.0977-0.001071-2.1633-0.62513-4.2804-1.7988-6.0977a0.75 0.75 0 0 0-1.0371-0.22461z" opacity=".35"/>
<path d="m17.305 11.846a0.75 0.75 0 0 0-0.22461 1.0371c0.59974 0.92902 0.9196 2.0114 0.91992 3.1172-3.26e-4 1.1058-0.32018 2.1882-0.91992 3.1172a0.75 0.75 0 0 0 0.22461 1.0371 0.75 0.75 0 0 0 1.0371-0.22461c0.75612-1.1713 1.1578-2.5356 1.1582-3.9297-4.12e-4 -1.3941-0.40208-2.7584-1.1582-3.9297a0.75 0.75 0 0 0-1.0371-0.22461z" opacity=".35"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

+110 -120
View File
@@ -7,7 +7,10 @@ from fabric.widgets.box import Box
from fabric.widgets.label import Label
from fabric.widgets.revealer import Revealer
from fabric.widgets.scale import Scale, ScaleMark
from fabric.widgets.svg import Svg
from fabric.utils.helpers import get_relative_path
from gi.repository import GLib, GObject
import math
from services.brightness import Brightness
from utils.animator import Animator
from utils.wayland import WaylandWindow as Window
@@ -36,9 +39,8 @@ class AnimatedScale(Scale):
class BrightnessOSDContainer(Box):
def __init__(self, **kwargs):
super().__init__(**kwargs, orientation="h", spacing=12, name="osd")
super().__init__(**kwargs, orientation="v", spacing=12, name="osd")
self.brightness_service = Brightness.get_initial()
self.icon = Label(markup=icons.brightness, name="brighntess-icons")
self.scale = AnimatedScale(
marks=(ScaleMark(value=i) for i in range(0, 101, 10)),
value=70,
@@ -47,8 +49,17 @@ class BrightnessOSDContainer(Box):
increments=(1, 1),
orientation="h",
)
self.osd_window_image = Svg(
get_relative_path("../config/assets/icons/brightness.svg"),
size=(64, 150),
name="osd-image",
h_align="center",
v_align="center",
h_expand=True,
v_expand=True,
)
self.add(self.icon)
self.add(self.osd_window_image)
self.add(self.scale)
self.update_brightness()
@@ -60,28 +71,14 @@ class BrightnessOSDContainer(Box):
normalized_brightness = self._normalize_brightness(current_brightness)
if current_brightness != 0:
self.scale.animate_value(normalized_brightness)
self.update_icon(normalized_brightness)
def update_icon(self, brightness_percentage: float) -> None:
icon_name = self.get_brightness_icon(brightness_percentage)
self.icon.set_label(icon_name)
def on_brightness_changed(self, _sender: any, value: float, *_args) -> None:
normalized_brightness = self._normalize_brightness(value)
self.scale.animate_value(normalized_brightness)
self.update_icon(normalized_brightness)
def _normalize_brightness(self, brightness: float) -> float:
return (brightness / self.brightness_service.max_screen) * 100
def get_brightness_icon(self, brightness_percentage: float) -> str:
if brightness_percentage >= 67:
return icons.brightness_high
elif brightness_percentage >= 34:
return icons.brightness_medium
else:
return icons.brightness_low
class AudioOSDContainer(Box):
__gsignals__: ClassVar[dict] = {
@@ -89,22 +86,34 @@ class AudioOSDContainer(Box):
}
def __init__(self, **kwargs):
super().__init__(**kwargs, orientation="h", spacing=13, name="osd")
super().__init__(
**kwargs,
orientation="v",
name="osd",
)
self.audio = Audio()
self.icon = Label(markup=icons.vol_high, name="vol-icon")
self.scale = AnimatedScale(
marks=(ScaleMark(value=i) for i in range(1, 100, 10)),
value=70,
marks=(ScaleMark(value=i) for i in range(1, 100, 10)),
min_value=0,
max_value=100,
increments=(1, 1),
orientation="h",
)
self.osd_window_image = Svg(
get_relative_path("../config/assets/icons/audio-volume.svg"),
size=(64, 150),
name="osd-image",
h_align="center",
v_align="center",
h_expand=True,
v_expand=True,
)
self.previous_volume = None
self.previous_muted = None
self.add(self.icon)
self.add(self.osd_window_image)
self.add(self.scale)
self.sync_with_audio()
@@ -121,11 +130,15 @@ class AudioOSDContainer(Box):
)
self.audio.speaker.connect("notify::muted", self.on_mute_changed)
def get_svg(self, value):
audio_level = 0 if value == 0 else min(int(math.ceil(value / 33)), 3)
return audio_level
def sync_with_audio(self):
if self.audio.speaker:
volume = round(self.audio.speaker.volume)
self.scale.set_value(volume)
self.update_icon(volume)
# self.update_icon(volume)
self.previous_volume = volume
self.previous_muted = self.audio.speaker.muted
@@ -134,14 +147,25 @@ class AudioOSDContainer(Box):
volume = self.scale.value
if 0 <= volume <= 100:
self.audio.speaker.set_volume(volume)
self.update_icon(volume)
if volume == 0 or (self.audio.speaker and self.audio.speaker.muted):
self.scale.add_style_class("muted")
self.icon.add_style_class("muted")
volume = 0
self.osd_window_image.set_from_file(
get_relative_path(
f"../config/assets/icons/volume/audio-volume-{self.get_svg(volume)}.svg"
)
)
else:
self.on_volume_property_changed()
self.scale.remove_style_class("muted")
self.icon.remove_style_class("muted")
self.osd_window_image.set_from_file(
get_relative_path(
f"../config/assets/icons/volume/audio-volume-{self.get_svg(volume)}.svg"
)
)
# self.icon.remove_style_class("muted")
self.emit("volume-changed")
@@ -155,7 +179,6 @@ class AudioOSDContainer(Box):
def on_speaker_changed(self, *_):
self.update_volume()
self.update_icon(round(self.audio.speaker.volume))
def on_volume_property_changed(self, *_):
if self.audio.speaker:
@@ -163,76 +186,34 @@ class AudioOSDContainer(Box):
if self.previous_volume is None or current_volume != self.previous_volume:
self.previous_volume = current_volume
self.update_volume()
self.update_icon(current_volume)
self.emit("volume-changed")
def update_volume(self, *_):
if self.audio.speaker and not self.is_hovered():
volume = round(self.audio.speaker.volume)
self.scale.set_value(volume)
self.update_icon(volume)
if volume == 0 or (self.audio.speaker and self.audio.speaker.muted):
self.scale.add_style_class("muted")
self.icon.add_style_class("muted")
volume = 0
self.osd_window_image.set_from_file(
get_relative_path(
f"../config/assets/icons/volume/audio-volume-{self.get_svg(volume)}.svg"
)
)
else:
self.scale.remove_style_class("muted")
self.icon.remove_style_class("muted")
def update_icon(self, volume):
if not self.audio.speaker:
return
vol_high_icon = icons.vol_high
vol_medium_icon = icons.vol_medium
vol_mute_icon = icons.vol_off
vol_off_icon = icons.vol_mute
if self.audio.speaker and "bluetooth" in self.audio.speaker.icon_name:
vol_high_icon = icons.bluetooth_connected
vol_medium_icon = icons.bluetooth
vol_mute_icon = icons.bluetooth_off
vol_off_icon = icons.bluetooth_disconnected
if self.audio.speaker.muted:
self.icon.set_label(vol_mute_icon)
self.scale.add_style_class("muted")
self.icon.add_style_class("muted")
else:
if volume == 0:
self.scale.add_style_class("muted")
self.icon.add_style_class("muted")
else:
self.scale.remove_style_class("muted")
self.icon.remove_style_class("muted")
if volume >= 67:
self.icon.set_label(vol_high_icon)
elif volume >= 34:
self.icon.set_label(vol_medium_icon)
elif volume >= 1:
# Use medium for low volumes too
self.icon.set_label(vol_medium_icon)
else:
self.icon.set_label(vol_off_icon)
def _get_audio_icon_name(self, volume: int) -> str:
if volume >= 67:
return icons.vol_high
elif volume >= 34:
return icons.vol_medium
elif volume >= 1:
return icons.vol_mute
else:
return icons.vol_off
self.osd_window_image.set_from_file(
get_relative_path(
f"../config/assets/icons/volume/audio-volume-{self.get_svg(volume)}.svg"
)
)
def on_mute_changed(self, *_):
if self.audio.speaker:
current_muted = self.audio.speaker.muted
if self.previous_muted is None or current_muted != self.previous_muted:
self.previous_muted = current_muted
self.update_icon(round(self.audio.speaker.volume))
GLib.idle_add(lambda: self.emit("volume-changed"))
self.emit("volume-changed")
class MicrophoneOSDContainer(Box):
@@ -241,9 +222,8 @@ class MicrophoneOSDContainer(Box):
}
def __init__(self, **kwargs):
super().__init__(**kwargs, orientation="h", spacing=13, name="osd")
super().__init__(**kwargs, orientation="v", spacing=13, name="osd")
self.audio = Audio()
self.icon = Label(markup=icons.mic, name="mic-icon")
self.scale = AnimatedScale(
marks=(ScaleMark(value=i) for i in range(1, 100, 10)),
value=70,
@@ -253,10 +233,19 @@ class MicrophoneOSDContainer(Box):
orientation="h",
)
self.osd_window_image = Svg(
get_relative_path("../config/assets/icons/microphone.svg"),
size=(64, 150),
name="osd-image",
h_align="center",
v_align="center",
h_expand=True,
v_expand=True,
)
self.previous_volume = None
self.previous_muted = None
self.add(self.icon)
self.add(self.osd_window_image)
self.add(self.scale)
self.sync_with_audio()
@@ -272,11 +261,14 @@ class MicrophoneOSDContainer(Box):
)
self.audio.microphone.connect("notify::muted", self.on_mute_changed)
def get_svg(self, value):
audio_level = 0 if value == 0 else min(int(math.ceil(value / 33)), 3)
return audio_level
def sync_with_audio(self):
if self.audio.microphone:
volume = round(self.audio.microphone.volume)
self.scale.set_value(volume)
self.update_icon(volume)
self.previous_volume = volume
self.previous_muted = self.audio.microphone.muted
@@ -285,16 +277,29 @@ class MicrophoneOSDContainer(Box):
volume = self.scale.value
if 0 <= volume <= 100:
self.audio.microphone.set_volume(volume)
self.update_icon(volume)
self.osd_window_image.set_from_file(
get_relative_path(
f"../config/assets/icons/mic/microphone-{self.get_svg(volume)}.svg"
)
)
if volume == 0 or (
self.audio.microphone and self.audio.microphone.muted
):
self.scale.add_style_class("muted")
self.icon.add_style_class("muted")
volume = 0
self.osd_window_image.set_from_file(
get_relative_path(
f"../config/assets/icons/mic/microphone-{self.get_svg(volume)}.svg"
)
)
else:
self.osd_window_image.set_from_file(
get_relative_path(
f"../config/assets/icons/mic/microphone-{self.get_svg(volume)}.svg"
)
)
self.scale.remove_style_class("muted")
self.icon.remove_style_class("muted")
self.emit("mic-changed")
@@ -308,61 +313,46 @@ class MicrophoneOSDContainer(Box):
def on_microphone_changed(self, *_):
self.update_volume()
self.update_icon(round(self.audio.microphone.volume))
def on_volume_property_changed(self, *_):
if self.audio.microphone:
current_volume = round(self.audio.microphone.volume)
if self.previous_volume is None or current_volume != self.previous_volume:
self.previous_volume = current_volume
self.osd_window_image.set_from_file(
get_relative_path(
f"../config/assets/icons/mic/microphone-{self.get_svg(current_volume)}.svg"
)
)
self.update_volume()
self.update_icon(current_volume)
self.emit("mic-changed")
def update_volume(self, *_):
if self.audio.microphone and not self.is_hovered():
volume = round(self.audio.microphone.volume)
self.scale.set_value(volume)
self.update_icon(volume)
if volume == 0 or (self.audio.microphone and self.audio.microphone.muted):
self.scale.add_style_class("muted")
self.icon.add_style_class("muted")
volume = 0
self.osd_window_image.set_from_file(
get_relative_path(
f"../config/assets/icons/mic/microphone-{self.get_svg(volume)}.svg"
)
)
else:
self.osd_window_image.set_from_file(
get_relative_path(
f"../config/assets/icons/mic/microphone-{self.get_svg(volume)}.svg"
)
)
self.scale.remove_style_class("muted")
self.icon.remove_style_class("muted")
def update_icon(self, volume):
if not self.audio.microphone:
return
if self.audio.microphone.muted:
self.icon.set_label(icons.mic_mute)
self.scale.add_style_class("muted")
self.icon.add_style_class("muted")
else:
if volume == 0:
self.scale.add_style_class("muted")
self.icon.add_style_class("muted")
else:
self.scale.remove_style_class("muted")
self.icon.remove_style_class("muted")
if volume >= 67:
self.icon.set_label(icons.mic)
elif volume >= 34:
self.icon.set_label(icons.mic)
elif volume >= 1:
self.icon.set_label(icons.mic)
else:
self.icon.set_label(icons.mic_mute)
def on_mute_changed(self, *_):
if self.audio.microphone:
current_muted = self.audio.microphone.muted
if self.previous_muted is None or current_muted != self.previous_muted:
self.previous_muted = current_muted
self.update_icon(round(self.audio.microphone.volume))
GLib.idle_add(lambda: self.emit("mic-changed"))
@@ -382,7 +372,7 @@ class OSD(Window):
self.main_box = Box(
orientation="v",
spacing=13,
h_expand=True,
children=[self.revealer],
)
+4 -17
View File
@@ -1,17 +1,18 @@
#osd {
background: var(--shadow);
background-color: alpha(var(--surface), 0.6);
padding: 12px 20px;
margin: 70px;
min-height: 200px;
border-radius: 16px;
}
#osd scale {
min-width: 150px;
min-width: 180px;
}
#osd trough {
background: var(--surface);
min-height: 10px;
min-height: 30px;
margin-right: 4px;
transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
border-radius: 16px;
@@ -30,20 +31,6 @@
background-color: var(--surface-bright);
}
#osd slider {
background-color: var(--primary);
background-size: 20px 20px;
min-width: 4px;
min-height: 8px;
border-radius: 2px;
padding: 0px;
margin: -14px 0;
box-shadow:
-4px 0 0px 2px var(--shadow),
4px 0 0px 2px var(--shadow);
transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#brighntess-icons.muted,
#vol-icon.muted,
#mic-icon.muted {