updates
15
.config/ags/old/README.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
|
||||
# Starter Config
|
||||
|
||||
if suggestions don't work, first make sure
|
||||
you have TypeScript LSP working in your editor
|
||||
|
||||
if you do not want typechecking only suggestions
|
||||
|
||||
```json
|
||||
// tsconfig.json
|
||||
"checkJs": false
|
||||
```
|
||||
|
||||
types are symlinked to:
|
||||
/usr/share/com.github.Aylur.ags/types
|
4
.config/ags/old/assets/battery-flash-symbolic.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 8.96875 0 c -0.332031 0.0117188 -0.640625 0.1875 -0.816406 0.46875 l -5 8 c -0.105469 0.171875 -0.152344 0.355469 -0.152344 0.53125 v 1 h 3 v 5 c 0 1.003906 1.316406 1.378906 1.847656 0.53125 l 5 -8 c 0.105469 -0.171875 0.152344 -0.355469 0.152344 -0.53125 v -1 h -3 v -5 c 0 -0.5625 -0.464844 -1.015625 -1.03125 -1 z m 0 0"/>
|
||||
</svg>
|
After Width: | Height: | Size: 476 B |
5
.config/ags/old/assets/chat-bubbles-symbolic.svg
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 14 3.175781 v 3.824219 c 0 2.179688 -1.820312 4 -4 4 h -3.585938 l -2 2 h 5.585938 l 3 3 v -3 c 1.644531 0 3 -1.355469 3 -3 v -4 c 0 -1.292969 -0.839844 -2.40625 -2 -2.824219 z m 0 0" fill-opacity="0.34902"/>
|
||||
<path d="m 3 0 c -1.644531 0 -3 1.355469 -3 3 v 4 c 0 1.644531 1.355469 3 3 3 v 3 l 3 -3 h 4 c 1.644531 0 3 -1.355469 3 -3 v -4 c 0 -1.644531 -1.355469 -3 -3 -3 z m 0 0"/>
|
||||
</svg>
|
After Width: | Height: | Size: 534 B |
4
.config/ags/old/assets/controller-symbolic.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 3.785156 2.03125 c -0.242187 0 -0.523437 0.066406 -0.804687 0.21875 c -1.039063 0.546875 -1.992188 2.335938 -2.511719 4.65625 c -0.4414062 1.972656 -0.605469 4.664062 -0.339844 5.75 c 0.226563 0.933594 0.625 1.34375 1.332032 1.34375 c 1.042968 -0.019531 2.359374 -1.183594 3.191406 -2.75 c 0.601562 -0.867188 2 -1.261719 3.347656 -1.21875 c 1.347656 -0.046875 2.746094 0.351562 3.347656 1.21875 c 0.832032 1.566406 2.148438 2.730469 3.191406 2.75 c 0.707032 0 1.105469 -0.410156 1.332032 -1.34375 c 0.265625 -1.085938 0.101562 -3.777344 -0.339844 -5.75 c -0.519531 -2.320312 -1.472656 -4.109375 -2.511719 -4.65625 c -0.566406 -0.304688 -1.039062 -0.296875 -1.453125 0 c -0.527344 0.375 -1.628906 0.78125 -3.566406 0.78125 c -1.9375 0.003906 -3.039062 -0.40625 -3.566406 -0.78125 c -0.207032 -0.148438 -0.40625 -0.21875 -0.648438 -0.21875 z m 0.246094 3 h 0.992188 v 1 h 0.992187 v 1 h -0.992187 v 1 h -0.992188 v -1 h -0.992188 v -1 h 0.992188 z m 7.441406 0 c 0.273438 0 0.496094 0.222656 0.496094 0.5 s -0.222656 0.5 -0.496094 0.5 c -0.273437 0 -0.496094 -0.222656 -0.496094 -0.5 s 0.222657 -0.5 0.496094 -0.5 z m -0.992187 1 c 0.273437 0 0.496093 0.222656 0.496093 0.5 s -0.222656 0.5 -0.496093 0.5 c -0.273438 0 -0.496094 -0.222656 -0.496094 -0.5 s 0.222656 -0.5 0.496094 -0.5 z m 1.984375 0 c 0.273437 0 0.496094 0.222656 0.496094 0.5 s -0.222657 0.5 -0.496094 0.5 c -0.273438 0 -0.496094 -0.222656 -0.496094 -0.5 s 0.222656 -0.5 0.496094 -0.5 z m -0.992188 1 c 0.273438 0 0.496094 0.222656 0.496094 0.5 s -0.222656 0.5 -0.496094 0.5 c -0.273437 0 -0.496094 -0.222656 -0.496094 -0.5 s 0.222657 -0.5 0.496094 -0.5 z m 0 0"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
5
.config/ags/old/assets/controls-symbolic.svg
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 4.550781 1 c -1.9375 0 -3.5 1.5625 -3.5 3.5 s 1.5625 3.5 3.5 3.5 h 7 c 1.941407 0 3.5 -1.5625 3.5 -3.5 s -1.558593 -3.5 -3.5 -3.5 z m 7 1 c 1.386719 0 2.5 1.113281 2.5 2.5 c 0 1.382812 -1.113281 2.5 -2.5 2.5 c -1.382812 0 -2.5 -1.117188 -2.5 -2.5 c 0 -1.386719 1.117188 -2.5 2.5 -2.5 z m 0 0"/>
|
||||
<path d="m 4.550781 9 c -1.9375 0 -3.5 1.5625 -3.5 3.5 s 1.5625 3.5 3.5 3.5 h 7 c 1.941407 0 3.5 -1.5625 3.5 -3.5 s -1.558593 -3.5 -3.5 -3.5 z m 0 1 c 1.386719 0 2.5 1.113281 2.5 2.5 c 0 1.382812 -1.113281 2.5 -2.5 2.5 c -1.382812 0 -2.5 -1.117188 -2.5 -2.5 c 0 -1.386719 1.117188 -2.5 2.5 -2.5 z m 0 0" fill-opacity="0.34902"/>
|
||||
</svg>
|
After Width: | Height: | Size: 777 B |
4
.config/ags/old/assets/dark-mode-symbolic.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 0.917969 8.003906 c 0 3.914063 3.164062 7.078125 7.078125 7.078125 c 3.605468 -0.007812 6.617187 -2.703125 7.023437 -6.285156 c 0.042969 -0.378906 -0.136719 -0.75 -0.457031 -0.957031 c -0.324219 -0.203125 -0.738281 -0.207032 -1.0625 -0.003906 c -0.609375 0.375 -1.316406 0.578124 -2.03125 0.578124 c -2.140625 0 -3.882812 -1.742187 -3.882812 -3.882812 c 0 -0.714844 0.203124 -1.421875 0.578124 -2.03125 c 0.203126 -0.324219 0.199219 -0.738281 -0.003906 -1.0625 c -0.207031 -0.320312 -0.578125 -0.5 -0.957031 -0.457031 c -3.582031 0.40625 -6.277344 3.417969 -6.285156 7.023437 z m 4.667969 -3.472656 c 0 3.253906 2.628906 5.882812 5.886718 5.882812 c 1.085938 0 2.152344 -0.304687 3.078125 -0.878906 l -1.519531 -0.960937 c -0.289062 2.554687 -2.464844 4.503906 -5.035156 4.507812 c -2.796875 0 -5.078125 -2.28125 -5.078125 -5.078125 c 0.003906 -2.570312 1.953125 -4.746094 4.507812 -5.035156 l -0.960937 -1.519531 c -0.574219 0.925781 -0.875 1.992187 -0.878906 3.082031 z m 0 0"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
4
.config/ags/old/assets/hourglass-symbolic.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 5 0 c -0.96875 0 -2 1.050781 -2 2 v 2.988281 c 0 0.429688 0.222656 0.675781 0.554688 1.007813 l 2.023437 2.003906 l -2.007813 1.992188 c -0.367187 0.363281 -0.570312 0.6875 -0.570312 1 v 3.007812 c 0 1.011719 0.988281 2 2 2 h 6 c 1.007812 0 2 -1.011719 2 -2.003906 v -3.003906 c 0 -0.3125 -0.222656 -0.628907 -0.570312 -0.976563 l -2.015626 -2.015625 l 1.988282 -1.988281 c 0.261718 -0.261719 0.585937 -0.6875 0.597656 -1.015625 v -2.996094 c 0 -1.003906 -1.007812 -2 -2 -2 z m 6 4 h -6 v -2 h 6 m -3.589844 7 h 1.175782 l 2.414062 2.414062 v 1.585938 h -6 v -1.613281 z m 0 0"/>
|
||||
</svg>
|
After Width: | Height: | Size: 729 B |
4
.config/ags/old/assets/light-mode-symbolic.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 8 0 c -0.554688 0 -1 0.445312 -1 1 v 1 c 0 0.554688 0.445312 1 1 1 s 1 -0.445312 1 -1 v -1 c 0 -0.554688 -0.445312 -1 -1 -1 z m -4.996094 2.003906 c -0.253906 0 -0.507812 0.097656 -0.707031 0.296875 c -0.390625 0.390625 -0.390625 1.019531 0 1.414063 l 0.707031 0.707031 c 0.394532 0.390625 1.023438 0.390625 1.414063 0 c 0.394531 -0.394531 0.394531 -1.023437 0 -1.414063 l -0.707031 -0.707031 c -0.195313 -0.199219 -0.449219 -0.296875 -0.707032 -0.296875 z m 9.988282 0 c -0.253907 0 -0.507813 0.097656 -0.707032 0.296875 l -0.707031 0.707031 c -0.390625 0.390626 -0.390625 1.019532 0 1.414063 c 0.394531 0.390625 1.023437 0.390625 1.414063 0 l 0.707031 -0.707031 c 0.394531 -0.394532 0.394531 -1.023438 0 -1.414063 c -0.195313 -0.199219 -0.449219 -0.296875 -0.707031 -0.296875 z m -4.992188 1.996094 c -2.210938 0 -4 1.789062 -4 4 s 1.789062 4 4 4 s 4 -1.789062 4 -4 s -1.789062 -4 -4 -4 z m 0 2 c 1.105469 0 2 0.894531 2 2 s -0.894531 2 -2 2 s -2 -0.894531 -2 -2 s 0.894531 -2 2 -2 z m -7 1 c -0.554688 0 -1 0.445312 -1 1 s 0.445312 1 1 1 h 1 c 0.554688 0 1 -0.445312 1 -1 s -0.445312 -1 -1 -1 z m 13 0 c -0.554688 0 -1 0.445312 -1 1 s 0.445312 1 1 1 h 1 c 0.554688 0 1 -0.445312 1 -1 s -0.445312 -1 -1 -1 z m -10.335938 4.289062 c -0.238281 0.007813 -0.472656 0.105469 -0.660156 0.292969 l -0.707031 0.707031 c -0.390625 0.390626 -0.390625 1.019532 0 1.414063 c 0.394531 0.390625 1.023437 0.390625 1.414063 0 l 0.707031 -0.707031 c 0.394531 -0.394532 0.394531 -1.023438 0 -1.414063 c -0.207031 -0.210937 -0.484375 -0.308593 -0.753907 -0.292969 z m 8.574219 0 c -0.238281 0.007813 -0.472656 0.105469 -0.660156 0.292969 c -0.390625 0.390625 -0.390625 1.019531 0 1.414063 l 0.707031 0.707031 c 0.394532 0.390625 1.023438 0.390625 1.414063 0 c 0.394531 -0.394531 0.394531 -1.023437 0 -1.414063 l -0.707031 -0.707031 c -0.207032 -0.210937 -0.484376 -0.308593 -0.753907 -0.292969 z m -4.292969 1.710938 c -0.527343 0.027344 -0.945312 0.464844 -0.945312 1 v 1 c 0 0.554688 0.445312 1 1 1 s 1 -0.445312 1 -1 v -1 c 0 -0.554688 -0.445312 -1 -1 -1 c -0.015625 0 -0.035156 0 -0.050781 0 z m 0 0"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
6
.config/ags/old/assets/mixer-symbolic.svg
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 11.5 1 c -1.921875 0 -3.5 1.578125 -3.5 3.5 s 1.578125 3.5 3.5 3.5 s 3.5 -1.578125 3.5 -3.5 s -1.578125 -3.5 -3.5 -3.5 z m 0 2 c 0.839844 0 1.5 0.660156 1.5 1.5 s -0.660156 1.5 -1.5 1.5 s -1.5 -0.660156 -1.5 -1.5 s 0.660156 -1.5 1.5 -1.5 z m 0 0"/>
|
||||
<path d="m 4.5 8 c -1.921875 0 -3.5 1.578125 -3.5 3.5 s 1.578125 3.5 3.5 3.5 c 1.386719 0 2.59375 -0.820312 3.15625 -2 h 5.84375 c 0.832031 0 1.5 -0.667969 1.5 -1.5 s -0.667969 -1.5 -1.5 -1.5 h -5.84375 c -0.5625 -1.179688 -1.769531 -2 -3.15625 -2 z m 0 2 c 0.839844 0 1.5 0.660156 1.5 1.5 s -0.660156 1.5 -1.5 1.5 s -1.5 -0.660156 -1.5 -1.5 s 0.660156 -1.5 1.5 -1.5 z m 0 0"/>
|
||||
<path d="m 2.5 3 c -0.832031 0 -1.5 0.667969 -1.5 1.5 s 0.667969 1.5 1.5 1.5 h 4.769531 c -0.175781 -0.480469 -0.265625 -0.988281 -0.269531 -1.5 c 0 -0.511719 0.09375 -1.019531 0.269531 -1.5 z m 0 0" fill-opacity="0.34902"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1,009 B |
155
.config/ags/old/assets/nixos-symbolic.svg
Normal file
|
@ -0,0 +1,155 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="496"
|
||||
height="496"
|
||||
version="1"
|
||||
id="svg6"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
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#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<metadata
|
||||
id="metadata12">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs10" />
|
||||
<g
|
||||
id="g946"
|
||||
transform="matrix(0.97173996,0,0,0.97173996,4.043873,36.112138)">
|
||||
<g
|
||||
id="layer7"
|
||||
style="display:none"
|
||||
transform="translate(-23.75651,-24.84972)">
|
||||
<rect
|
||||
transform="translate(-132.5822,958.04022)"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect5389"
|
||||
width="1543.4283"
|
||||
height="483.7439"
|
||||
x="132.5822"
|
||||
y="-957.77832" />
|
||||
</g>
|
||||
<g
|
||||
id="layer6"
|
||||
style="display:none"
|
||||
transform="translate(-156.33871,933.1905)">
|
||||
<rect
|
||||
y="-958.02759"
|
||||
x="132.65129"
|
||||
height="484.30399"
|
||||
width="550.41602"
|
||||
id="rect5379"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5c201e;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#c24a46;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect5372"
|
||||
width="501.94415"
|
||||
height="434.30405"
|
||||
x="156.12303"
|
||||
y="-933.02759" />
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#d98d8a;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect5381"
|
||||
width="24.939611"
|
||||
height="24.939611"
|
||||
x="658.02826"
|
||||
y="-958.04022" />
|
||||
</g>
|
||||
<g
|
||||
id="layer3"
|
||||
style="display:inline;opacity:1"
|
||||
transform="translate(37.235605,912.8581)">
|
||||
<g
|
||||
id="g2072"
|
||||
transform="matrix(0.99894325,0,0,0.99894325,-36.551621,-913.90743)"
|
||||
style="fill:#cccccc;fill-opacity:1">
|
||||
<g
|
||||
style="display:none;fill:#cccccc;fill-opacity:1"
|
||||
transform="matrix(0.09048806,0,0,0.09048806,-14.15991,84.454917)"
|
||||
id="layer1-3">
|
||||
<rect
|
||||
y="-2102.4253"
|
||||
x="-1045.6049"
|
||||
height="7145.4614"
|
||||
width="7947.0356"
|
||||
id="rect995"
|
||||
style="opacity:1;fill:#cccccc;fill-opacity:1;stroke-width:10.3605" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(-156.48372,537.56136)"
|
||||
style="display:inline;opacity:1;fill:#cccccc;fill-opacity:1"
|
||||
id="layer3-6">
|
||||
<g
|
||||
style="fill:#cccccc;stroke-width:11.0512;fill-opacity:1"
|
||||
transform="matrix(0.09048806,0,0,0.09048806,142.32381,-453.10644)"
|
||||
id="g955">
|
||||
<g
|
||||
transform="matrix(11.047619,0,0,11.047619,-1572.2888,9377.7107)"
|
||||
id="g869"
|
||||
style="fill:#cccccc;fill-opacity:1">
|
||||
<g
|
||||
transform="rotate(-60,226.35754,-449.37199)"
|
||||
id="g932"
|
||||
style="fill:#cccccc;stroke-width:11.0512;fill-opacity:1">
|
||||
<path
|
||||
id="path3336-6-7"
|
||||
d="m 449.71876,-420.51322 c 40.73228,70.55837 81.46455,141.11675 122.19683,211.67512 -18.71902,0.1756 -37.43804,0.3512 -56.15706,0.5268 -10.87453,-18.9564 -21.74907,-37.9128 -32.6236,-56.8692 -10.95215,18.8551 -21.9043,37.7102 -32.85645,56.5653 -9.30079,-0.004 -18.60158,-0.007 -27.90237,-0.011 -4.76362,-8.22987 -9.52724,-16.45973 -14.29086,-24.6896 15.60349,-26.83003 31.20698,-53.66007 46.81047,-80.4901 -11.07649,-19.27523 -22.15297,-38.55047 -33.22946,-57.8257 9.35083,-16.29387 18.70167,-32.58775 28.0525,-48.88162 z"
|
||||
style="opacity:1;fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:33.1535;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
<path
|
||||
id="path4260-0-5"
|
||||
d="m 309.54892,-710.38827 c 40.73228,70.55837 81.46455,141.11675 122.19683,211.67512 -18.71902,0.1756 -37.43804,0.3512 -56.15706,0.5268 -10.87453,-18.9564 -21.74907,-37.9128 -32.6236,-56.8692 -10.95215,18.8551 -21.9043,37.7102 -32.85645,56.5653 -9.30079,-0.004 -18.60158,-0.007 -27.90237,-0.011 -4.76362,-8.22987 -9.52724,-16.45973 -14.29086,-24.6896 15.60349,-26.83003 31.20698,-53.66007 46.81047,-80.4901 -11.07649,-19.2752 -22.15297,-38.5504 -33.22946,-57.8256 9.35083,-16.29391 18.70167,-32.58781 28.0525,-48.88172 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:33.1535;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#path3336-6-7"
|
||||
id="use3439-6-3"
|
||||
transform="rotate(60,728.23563,-692.24036)"
|
||||
width="100%"
|
||||
height="100%"
|
||||
style="fill:#cccccc;fill-opacity:1;stroke-width:11.0512" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#path3336-6-7"
|
||||
id="use3449-5-5"
|
||||
transform="rotate(180,477.5036,-570.81898)"
|
||||
width="100%"
|
||||
height="100%"
|
||||
style="fill:#cccccc;fill-opacity:1;stroke-width:11.0512" />
|
||||
<use
|
||||
style="display:inline;fill:#cccccc;fill-opacity:1;stroke-width:11.0512"
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#path4260-0-5"
|
||||
id="use4354-5-6"
|
||||
transform="rotate(120,407.33916,-716.08356)"
|
||||
width="100%"
|
||||
height="100%" />
|
||||
<use
|
||||
style="display:inline;fill:#cccccc;fill-opacity:1;stroke-width:11.0512"
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#path4260-0-5"
|
||||
id="use4362-2-2"
|
||||
transform="rotate(-120,407.28823,-715.86995)"
|
||||
width="100%"
|
||||
height="100%" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 8.6 KiB |
277
.config/ags/old/assets/nixos.svg
Normal file
|
@ -0,0 +1,277 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="496"
|
||||
height="496"
|
||||
version="1"
|
||||
id="svg6"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
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#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<metadata
|
||||
id="metadata12">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs10">
|
||||
<linearGradient
|
||||
id="linearGradient5562">
|
||||
<stop
|
||||
style="stop-color:#699ad7;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop5564" />
|
||||
<stop
|
||||
id="stop5566"
|
||||
offset="0.24345198"
|
||||
style="stop-color:#7eb1dd;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#7ebae4;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop5568" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient5053">
|
||||
<stop
|
||||
style="stop-color:#415e9a;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop5055" />
|
||||
<stop
|
||||
id="stop5057"
|
||||
offset="0.23168644"
|
||||
style="stop-color:#4a6baf;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#5277c3;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop5059" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient5960">
|
||||
<stop
|
||||
id="stop5962"
|
||||
offset="0"
|
||||
style="stop-color:#637ddf;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#649afa;stop-opacity:1"
|
||||
offset="0.23168644"
|
||||
id="stop5964" />
|
||||
<stop
|
||||
id="stop5966"
|
||||
offset="1"
|
||||
style="stop-color:#719efa;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
y2="515.97058"
|
||||
x2="282.26105"
|
||||
y1="338.62445"
|
||||
x1="213.95642"
|
||||
gradientTransform="translate(983.36076,293.12113)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient5855"
|
||||
xlink:href="#linearGradient5960" />
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient5562"
|
||||
id="linearGradient4328"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(70.650339,-1055.1511)"
|
||||
x1="200.59668"
|
||||
y1="351.41116"
|
||||
x2="290.08701"
|
||||
y2="506.18814" />
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient5053"
|
||||
id="linearGradient4330"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(864.69589,-1491.3405)"
|
||||
x1="-584.19934"
|
||||
y1="782.33563"
|
||||
x2="-496.29703"
|
||||
y2="937.71399" />
|
||||
</defs>
|
||||
<g
|
||||
id="g946"
|
||||
transform="matrix(0.97173996,0,0,0.97173996,4.043873,36.112138)">
|
||||
<g
|
||||
id="layer7"
|
||||
style="display:none"
|
||||
transform="translate(-23.75651,-24.84972)">
|
||||
<rect
|
||||
transform="translate(-132.5822,958.04022)"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect5389"
|
||||
width="1543.4283"
|
||||
height="483.7439"
|
||||
x="132.5822"
|
||||
y="-957.77832" />
|
||||
</g>
|
||||
<g
|
||||
id="layer6"
|
||||
style="display:none"
|
||||
transform="translate(-156.33871,933.1905)">
|
||||
<rect
|
||||
y="-958.02759"
|
||||
x="132.65129"
|
||||
height="484.30399"
|
||||
width="550.41602"
|
||||
id="rect5379"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5c201e;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#c24a46;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect5372"
|
||||
width="501.94415"
|
||||
height="434.30405"
|
||||
x="156.12303"
|
||||
y="-933.02759" />
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#d98d8a;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect5381"
|
||||
width="24.939611"
|
||||
height="24.939611"
|
||||
x="658.02826"
|
||||
y="-958.04022" />
|
||||
</g>
|
||||
<g
|
||||
id="layer1"
|
||||
style="display:inline"
|
||||
transform="translate(-156.33871,933.1905)">
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 309.40365,-710.2521 c 40.73228,70.55837 81.46455,141.11673 122.19683,211.6751 -18.71902,0.1756 -37.43804,0.3512 -56.15706,0.5268 -10.87453,-18.9564 -21.74907,-37.9128 -32.6236,-56.8692 -10.95215,18.8551 -21.9043,37.7102 -32.85645,56.5653 -9.30079,-0.004 -18.60158,-0.007 -27.90237,-0.011 -4.76362,-8.22987 -9.52724,-16.45973 -14.29086,-24.6896 15.60349,-26.83007 31.20698,-53.66013 46.81047,-80.4902 -11.07649,-19.2752 -22.15297,-38.5504 -33.22946,-57.8256 9.35083,-16.29387 18.70167,-32.58773 28.0525,-48.8816 z"
|
||||
id="path4861" />
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 353.50926,-797.4433 c -40.73919,70.55437 -81.47837,141.10873 -122.21756,211.6631 -9.51159,-16.12333 -19.02318,-32.24667 -28.53477,-48.37 10.97946,-18.89583 21.95893,-37.79167 32.93839,-56.6875 -21.80507,-0.0573 -43.61014,-0.1146 -65.41521,-0.1719 -4.64713,-8.0566 -9.29427,-16.1132 -13.9414,-24.1698 4.74546,-8.24033 9.49091,-16.48067 14.23637,-24.721 31.03726,0.098 62.07451,0.19593 93.11177,0.2939 11.15457,-19.2301 22.30914,-38.4602 33.46371,-57.6903 18.78623,-0.0488 37.57247,-0.0977 56.3587,-0.1465 z"
|
||||
id="use4863" />
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 362.88537,-628.243 c 81.47146,0.004 162.94293,0.008 244.41439,0.012 -9.20743,16.29893 -18.41486,32.59787 -27.62229,48.8968 -21.854,-0.0606 -43.70799,-0.12113 -65.56199,-0.1817 10.85292,18.91237 21.70584,37.82473 32.55876,56.7371 -4.65366,8.05283 -9.30732,16.10567 -13.96098,24.1585 -9.50907,0.0107 -19.01815,0.0213 -28.52722,0.032 -15.43377,-26.92803 -30.86753,-53.85607 -46.3013,-80.7841 -22.23106,-0.0451 -44.46211,-0.0902 -66.69317,-0.1353 -9.4354,-16.2451 -18.8708,-32.4902 -28.3062,-48.7353 z"
|
||||
id="use4865" />
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 505.14318,-720.9886 c -40.73228,-70.55837 -81.46455,-141.11673 -122.19683,-211.6751 18.71902,-0.1756 37.43804,-0.3512 56.15706,-0.5268 10.87453,18.9564 21.74907,37.9128 32.6236,56.8692 10.95215,-18.8551 21.9043,-37.7102 32.85645,-56.5653 9.30079,0.004 18.60158,0.007 27.90237,0.011 4.76362,8.22987 9.52724,16.45973 14.29086,24.6896 -15.60349,26.83007 -31.20698,53.66013 -46.81047,80.4902 11.07649,19.2752 22.15297,38.5504 33.22946,57.8256 -9.35083,16.29387 -18.70167,32.58773 -28.0525,48.8816 z"
|
||||
id="use4867" />
|
||||
<path
|
||||
id="path4873"
|
||||
d="m 309.40365,-710.2521 c 40.73228,70.55837 81.46455,141.11673 122.19683,211.6751 -18.71902,0.1756 -37.43804,0.3512 -56.15706,0.5268 -10.87453,-18.9564 -21.74907,-37.9128 -32.6236,-56.8692 -10.95215,18.8551 -21.9043,37.7102 -32.85645,56.5653 -9.30079,-0.004 -18.60158,-0.007 -27.90237,-0.011 -4.76362,-8.22987 -9.52724,-16.45973 -14.29086,-24.6896 15.60349,-26.83007 31.20698,-53.66013 46.81047,-80.4902 -11.07649,-19.2752 -22.15297,-38.5504 -33.22946,-57.8256 9.35083,-16.29387 18.70167,-32.58773 28.0525,-48.8816 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
id="use4875"
|
||||
d="m 451.3364,-803.53264 c -81.47147,-0.004 -162.94293,-0.008 -244.4144,-0.012 9.20743,-16.29895 18.41486,-32.5979 27.62229,-48.89685 21.854,0.0606 43.70799,0.12117 65.56199,0.18175 -10.85292,-18.91239 -21.70583,-37.82478 -32.55875,-56.73717 4.65366,-8.05284 9.30731,-16.10567 13.96097,-24.15851 9.50907,-0.0105 19.01815,-0.021 28.52722,-0.0315 15.43377,26.92805 30.86753,53.85609 46.3013,80.78414 22.23106,0.0451 44.46211,0.0902 66.69317,0.13524 9.4354,16.24497 18.87081,32.48993 28.30621,48.7349 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
id="use4877"
|
||||
d="m 460.87178,-633.8425 c 40.73919,-70.55435 81.47838,-141.10869 122.21757,-211.66304 9.51159,16.12334 19.02318,32.24669 28.53477,48.37003 -10.97946,18.89584 -21.95893,37.79167 -32.93839,56.68751 21.80507,0.0573 43.61013,0.11453 65.4152,0.1718 4.64713,8.0566 9.29427,16.1132 13.9414,24.1698 -4.74545,8.24037 -9.49091,16.48073 -14.23636,24.7211 -31.03726,-0.098 -62.07451,-0.196 -93.11177,-0.294 -11.15457,19.23013 -22.30914,38.46027 -33.46371,57.6904 -18.78624,0.0488 -37.57247,0.0976 -56.35871,0.1464 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<g
|
||||
id="layer2"
|
||||
style="display:none"
|
||||
transform="translate(72.039038,-1799.4476)">
|
||||
<path
|
||||
d="M 460.60629,594.72881 209.74183,594.7288 84.309616,377.4738 209.74185,160.21882 l 250.86446,1e-5 125.43222,217.255 z"
|
||||
id="path6032"
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.236;fill:#4e4d52;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
|
||||
<path
|
||||
transform="translate(0,-308.26772)"
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#4e4d52;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="path5875"
|
||||
d="m 385.59154,773.06721 -100.83495,0 -50.41747,-87.32564 50.41748,-87.32563 100.83495,10e-6 50.41748,87.32563 z" />
|
||||
<path
|
||||
id="path5851"
|
||||
d="m 1216.5591,630.26623 c 41.0182,76.04675 82.0363,152.09355 123.0545,228.14035 -14.2269,-0.4205 -28.4538,-0.8411 -42.6807,-1.2616 -14.4941,-26.5908 -28.9882,-53.1817 -43.4823,-79.7725 -13.2169,26.7756 -26.4337,53.5511 -39.6506,80.3267 -10.8958,-6.5995 -21.7917,-13.1989 -32.6875,-19.7984 17.8246,-33.4283 35.6491,-66.8565 53.4737,-100.2848 -12.3719,-24.6298 -24.7438,-49.2597 -37.1157,-73.88955 6.3629,-11.1534 12.7257,-22.3068 19.0886,-33.4602 z"
|
||||
style="fill:url(#linearGradient5855);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.415;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#c53a3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect5884"
|
||||
width="48.834862"
|
||||
height="226.22897"
|
||||
x="-34.74221"
|
||||
y="446.17056"
|
||||
transform="rotate(-30)" />
|
||||
<path
|
||||
transform="translate(0,-308.26772)"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.509;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="path3428"
|
||||
d="m 251.98568,878.63831 -14.02447,24.29109 h -28.04894 l -14.02447,-24.29109 14.02447,-24.2911 h 28.04894 z" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#rect5884"
|
||||
id="use4252"
|
||||
transform="rotate(60,268.29786,489.4515)"
|
||||
width="100%"
|
||||
height="100%" />
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.650794;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect4254"
|
||||
width="5.3947482"
|
||||
height="115.12564"
|
||||
x="545.71014"
|
||||
y="467.07007"
|
||||
transform="rotate(30,575.23539,-154.13386)" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="layer3"
|
||||
style="display:inline;opacity:1"
|
||||
transform="translate(-156.33871,933.1905)">
|
||||
<path
|
||||
id="path3336-6"
|
||||
d="m 309.54892,-710.38827 c 40.73228,70.55837 81.46455,141.11675 122.19683,211.67512 -18.71902,0.1756 -37.43804,0.3512 -56.15706,0.5268 -10.87453,-18.9564 -21.74907,-37.9128 -32.6236,-56.8692 -10.95215,18.8551 -21.9043,37.7102 -32.85645,56.5653 -9.30079,-0.004 -18.60158,-0.007 -27.90237,-0.011 -4.76362,-8.22987 -9.52724,-16.45973 -14.29086,-24.6896 15.60349,-26.83003 31.20698,-53.66007 46.81047,-80.4901 -11.07649,-19.27523 -22.15297,-38.55047 -33.22946,-57.8257 9.35083,-16.29387 18.70167,-32.58775 28.0525,-48.88162 z"
|
||||
style="opacity:1;fill:url(#linearGradient4328);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<use
|
||||
height="100%"
|
||||
width="100%"
|
||||
transform="rotate(60,407.11155,-715.78724)"
|
||||
id="use3439-6"
|
||||
xlink:href="#path3336-6"
|
||||
y="0"
|
||||
x="0" />
|
||||
<use
|
||||
height="100%"
|
||||
width="100%"
|
||||
transform="rotate(-60,407.31177,-715.70016)"
|
||||
id="use3445-0"
|
||||
xlink:href="#path3336-6"
|
||||
y="0"
|
||||
x="0" />
|
||||
<use
|
||||
height="100%"
|
||||
width="100%"
|
||||
transform="rotate(180,407.41868,-715.7565)"
|
||||
id="use3449-5"
|
||||
xlink:href="#path3336-6"
|
||||
y="0"
|
||||
x="0" />
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient4330);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 309.54892,-710.38827 c 40.73228,70.55837 81.46455,141.11675 122.19683,211.67512 -18.71902,0.1756 -37.43804,0.3512 -56.15706,0.5268 -10.87453,-18.9564 -21.74907,-37.9128 -32.6236,-56.8692 -10.95215,18.8551 -21.9043,37.7102 -32.85645,56.5653 -10.54113,-2.26829 -26.58606,6.01638 -31.9377,-7.5219 -4.39393,-6.91787 -12.57856,-15.53043 -6.85074,-23.97221 8.26178,-12.05394 14.90093,-25.28023 22.52611,-37.79439 6.95986,-11.9674 13.91971,-23.9348 20.87957,-35.9022 -11.07649,-19.2752 -22.15297,-38.5504 -33.22946,-57.8256 9.35083,-16.29391 18.70167,-32.58781 28.0525,-48.88172 z"
|
||||
id="path4260-0" />
|
||||
<use
|
||||
height="100%"
|
||||
width="100%"
|
||||
transform="rotate(120,407.33916,-716.08356)"
|
||||
id="use4354-5"
|
||||
xlink:href="#path4260-0"
|
||||
y="0"
|
||||
x="0"
|
||||
style="display:inline" />
|
||||
<use
|
||||
height="100%"
|
||||
width="100%"
|
||||
transform="rotate(-120,407.28823,-715.86995)"
|
||||
id="use4362-2"
|
||||
xlink:href="#path4260-0"
|
||||
y="0"
|
||||
x="0"
|
||||
style="display:inline" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 21 KiB |
46
.config/ags/old/assets/person-symbolic.svg
Normal file
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<filter id="a" height="100%" width="100%" x="0%" y="0%">
|
||||
<feColorMatrix color-interpolation-filters="sRGB" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
</filter>
|
||||
<mask id="b">
|
||||
<g filter="url(#a)">
|
||||
<path d="m -1.6 -1.6 h 19.2 v 19.2 h -19.2 z" fill-opacity="0.5"/>
|
||||
</g>
|
||||
</mask>
|
||||
<clipPath id="c">
|
||||
<path d="m 0 0 h 1600 v 1200 h -1600 z"/>
|
||||
</clipPath>
|
||||
<mask id="d">
|
||||
<g filter="url(#a)">
|
||||
<path d="m -1.6 -1.6 h 19.2 v 19.2 h -19.2 z" fill-opacity="0.7"/>
|
||||
</g>
|
||||
</mask>
|
||||
<clipPath id="e">
|
||||
<path d="m 0 0 h 1600 v 1200 h -1600 z"/>
|
||||
</clipPath>
|
||||
<mask id="f">
|
||||
<g filter="url(#a)">
|
||||
<path d="m -1.6 -1.6 h 19.2 v 19.2 h -19.2 z" fill-opacity="0.35"/>
|
||||
</g>
|
||||
</mask>
|
||||
<clipPath id="g">
|
||||
<path d="m 0 0 h 1600 v 1200 h -1600 z"/>
|
||||
</clipPath>
|
||||
<g mask="url(#b)">
|
||||
<g clip-path="url(#c)" transform="matrix(1 0 0 1 -180 -240)">
|
||||
<path d="m 550 182 c -0.351562 0.003906 -0.695312 0.101562 -1 0.28125 v 3.4375 c 0.304688 0.179688 0.648438 0.277344 1 0.28125 c 1.105469 0 2 -0.894531 2 -2 s -0.894531 -2 -2 -2 z m 0 5 c -0.339844 0 -0.679688 0.058594 -1 0.175781 v 6.824219 h 4 v -4 c 0 -1.65625 -1.34375 -3 -3 -3 z m 0 0"/>
|
||||
</g>
|
||||
</g>
|
||||
<g mask="url(#d)">
|
||||
<g clip-path="url(#e)" transform="matrix(1 0 0 1 -180 -240)">
|
||||
<path d="m 569 182 v 4 c 1.105469 0 2 -0.894531 2 -2 s -0.894531 -2 -2 -2 z m 0 5 v 7 h 3 v -4 c 0 -1.65625 -1.34375 -3 -3 -3 z m 0 0"/>
|
||||
</g>
|
||||
</g>
|
||||
<g mask="url(#f)">
|
||||
<g clip-path="url(#g)" transform="matrix(1 0 0 1 -180 -240)">
|
||||
<path d="m 573 182.269531 v 3.449219 c 0.613281 -0.355469 0.996094 -1.007812 1 -1.71875 c 0 -0.714844 -0.382812 -1.375 -1 -1.730469 z m 0 4.90625 v 6.824219 h 2 v -4 c 0 -1.269531 -0.800781 -2.402344 -2 -2.824219 z m 0 0"/>
|
||||
</g>
|
||||
</g>
|
||||
<path d="m 8 1 c -1.65625 0 -3 1.34375 -3 3 s 1.34375 3 3 3 s 3 -1.34375 3 -3 s -1.34375 -3 -3 -3 z m -1.5 7 c -2.492188 0 -4.5 2.007812 -4.5 4.5 v 1.5 c 0 1 1 1 1 1 h 10 s 1 0 1 -1 v -1.5 c 0 -2.492188 -2.007812 -4.5 -4.5 -4.5 z m 0 0" fill="#222222"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
17
.config/ags/old/assets/processor-symbolic.svg
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 5 5 h 6 v 6 h -6 z m 0 0"/>
|
||||
<path d="m 13 5 h 3 v 1 h -3 z m 0 0"/>
|
||||
<path d="m 13 7 h 3 v 1 h -3 z m 0 0"/>
|
||||
<path d="m 13 9 h 3 v 1 h -3 z m 0 0"/>
|
||||
<path d="m 0 6 h 3 v 1 h -3 z m 0 0"/>
|
||||
<path d="m 0 8 h 3 v 1 h -3 z m 0 0"/>
|
||||
<path d="m 0 10 h 3 v 1 h -3 z m 0 0"/>
|
||||
<path d="m 5 0 h 1 v 3 h -1 z m 0 0"/>
|
||||
<path d="m 7 0 h 1 v 3 h -1 z m 0 0"/>
|
||||
<path d="m 9 0 h 1 v 3 h -1 z m 0 0"/>
|
||||
<path d="m 10 13 h 1 v 3 h -1 z m 0 0"/>
|
||||
<path d="m 8 13 h 1 v 3 h -1 z m 0 0"/>
|
||||
<path d="m 6 13 h 1 v 3 h -1 z m 0 0"/>
|
||||
<path d="m 5 2 c -1.644531 0 -3 1.355469 -3 3 v 6 c 0 1.644531 1.355469 3 3 3 h 6 c 1.644531 0 3 -1.355469 3 -3 v -6 c 0 -1.644531 -1.355469 -3 -3 -3 z m 0 2 h 6 c 0.570312 0 1 0.429688 1 1 v 6 c 0 0.570312 -0.429688 1 -1 1 h -6 c -0.570312 0 -1 -0.429688 -1 -1 v -6 c 0 -0.570312 0.429688 -1 1 -1 z m 0 0"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1,014 B |
5
.config/ags/old/assets/terminal-symbolic.svg
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 2.199219 0 c -1.207031 0 -2.199219 1.007812 -2.199219 2.207031 v 10.585938 c 0 1.199219 0.992188 2.207031 2.199219 2.207031 h 11.601562 c 1.207031 0 2.199219 -1.007812 2.199219 -2.207031 v -10.585938 c 0 -1.199219 -0.992188 -2.207031 -2.199219 -2.207031 z m 0 2 h 11.601562 c 0.121094 0 0.199219 0.070312 0.199219 0.207031 v 10.585938 c 0 0.136719 -0.078125 0.207031 -0.199219 0.207031 h -11.601562 c -0.121094 0 -0.199219 -0.070312 -0.199219 -0.207031 v -10.585938 c 0 -0.136719 0.078125 -0.207031 0.199219 -0.207031 z m 0 0"/>
|
||||
<path d="m 4.515625 5.898438 c -0.164063 -0.003907 -0.324219 0.0625 -0.441406 0.175781 c -0.230469 0.234375 -0.230469 0.617187 0 0.851562 l 1.578125 1.574219 l -1.578125 1.574219 c -0.230469 0.234375 -0.230469 0.617187 0 0.851562 c 0.234375 0.230469 0.617187 0.230469 0.851562 0 l 2 -2 c 0.230469 -0.234375 0.230469 -0.617187 0 -0.851562 l -2 -2 c -0.109375 -0.105469 -0.257812 -0.167969 -0.410156 -0.175781 z m 3.484375 4.101562 v 1 h 3 v -1 z m 0 0"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
4
.config/ags/old/assets/toolbars-symbolic.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 2 0 c -1.214844 0 -2 0.828125 -2 2 v 12 c 0 1 1 2 2 2 h 11.984375 c 1 0 2 -1 2 -2 v -12 c 0 -1.238281 -0.828125 -2 -2 -2 z m 0 2 h 2 v 2 h -2 z m 3 0 h 2 v 2 h -2 z m 3 0 h 2 v 2 h -2 z m -6 4 h 11.984375 v 8 h -11.984375 z m 0 0"/>
|
||||
</svg>
|
After Width: | Height: | Size: 382 B |
87
.config/ags/old/config.js
Normal file
|
@ -0,0 +1,87 @@
|
|||
App.addIcons(`${App.configDir}/assets`)
|
||||
|
||||
import Gdk from 'gi://Gdk';
|
||||
import GLib from 'gi://GLib';
|
||||
import App from 'resource:///com/github/Aylur/ags/app.js'
|
||||
import * as Utils from 'resource:///com/github/Aylur/ags/utils.js'
|
||||
|
||||
import options from './options.js';
|
||||
import { init } from './lib/init.js';
|
||||
|
||||
// import Lockscreen from './modules/lock/Lockscreen.js';
|
||||
// import Powermenu from './modules/powermenu/Powermenu.js';
|
||||
// import OSD from './modules/osd/OSD.js';
|
||||
// import Verification from './modules/powermenu/Verification.js';
|
||||
import Overview from './modules/overview/Overview.js';
|
||||
// import NotificationPopups from './modules/notifications/NotificationPopups.js';
|
||||
// import Bar from './modules/bar/Bar.js'
|
||||
// import { setupDateMenu } from './modules/datemenu/DateMenu.js';
|
||||
// import { setupQuickSettings } from './modules/quicksettings/QuickSettings.js';
|
||||
// import Test from './test.js';
|
||||
|
||||
const range = (length, start = 1) => Array.from({ length }, (_, i) => i + start);
|
||||
function forMonitors(widget) {
|
||||
const n = Gdk.Display.get_default()?.get_n_monitors() || 1;
|
||||
return range(n, 0).map(widget).flat(1);
|
||||
}
|
||||
|
||||
|
||||
print(App.configDir)
|
||||
// SCSS compilation
|
||||
// Utils.exec(`bash -c 'echo "" > ${App.configDir}/scss/_musicwal.scss'`); // reset music styles
|
||||
// Utils.exec(`bash -c 'echo "" > ${App.configDir}/scss/_musicmaterial.scss'`); // reset music styles
|
||||
async function applyStyle() {
|
||||
const COMPILED_STYLE_DIR = `${GLib.get_user_cache_dir()}/ags/user/generated`
|
||||
if (options.recompileSass) {
|
||||
Utils.exec(`mkdir -p ${COMPILED_STYLE_DIR}`);
|
||||
Utils.exec(`sassc ${App.configDir}/scss/main.scss ${COMPILED_STYLE_DIR}/style.css`);
|
||||
}
|
||||
App.resetCss();
|
||||
App.applyCss(`${COMPILED_STYLE_DIR}/style.css`);
|
||||
print('[LOG] Styles loaded')
|
||||
print(`CRITICAL: Reload Sass option is set to: ${options.recompileSass}`)
|
||||
}
|
||||
applyStyle().catch(print);
|
||||
|
||||
|
||||
const Windows = () => [
|
||||
// Lockscreen(),
|
||||
// Powermenu(),
|
||||
// // Dock(),
|
||||
// Verification(),
|
||||
Overview(),
|
||||
// Test(),
|
||||
// forMonitors(NotificationPopups),
|
||||
// forMonitors(Bar),
|
||||
// forMonitors(OSD),
|
||||
];
|
||||
|
||||
// const CLOSE_ANIM_TIME = 210; // Longer than actual anim time to make sure widgets animate fully
|
||||
export default {
|
||||
onConfigParsed: () => {
|
||||
// setupQuickSettings()
|
||||
// setupDateMenu()
|
||||
init()
|
||||
if (options.monitorCSS) {
|
||||
Utils.monitorFile(
|
||||
// directory that contains the scss files
|
||||
`${App.configDir}/scss`,
|
||||
function() {
|
||||
applyStyle()
|
||||
},
|
||||
)
|
||||
}
|
||||
},
|
||||
css: `${App.configDir}/style.css`,
|
||||
stackTraceOnError: true,
|
||||
closeWindowDelay: { // For animations
|
||||
// "powermenu": options.theme.PopupCloseDuration,
|
||||
// "verification": options.theme.PopupCloseDuration,
|
||||
"overview": options.theme.PopupCloseDuration,
|
||||
// "quicksettings": options.theme.PopupCloseDuration,
|
||||
// 'sideright': CLOSE_ANIM_TIME,
|
||||
// 'sideleft': CLOSE_ANIM_TIME,
|
||||
// 'osk': CLOSE_ANIM_TIME,
|
||||
},
|
||||
windows: Windows().flat(1),
|
||||
};
|
17
.config/ags/old/lib/battery.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
|
||||
import icons from "./icons.js"
|
||||
|
||||
export default async function init() {
|
||||
const bat = await Service.import("battery")
|
||||
bat.connect("notify::percent", ({ percent, charging }) => {
|
||||
const low = 30
|
||||
if (percent !== low || percent !== low / 2 || !charging)
|
||||
return
|
||||
|
||||
Utils.notify({
|
||||
summary: `${percent}% Battery Percentage`,
|
||||
iconName: icons.battery.warning,
|
||||
urgency: "critical",
|
||||
})
|
||||
})
|
||||
}
|
67
.config/ags/old/lib/experiments.js
Normal file
|
@ -0,0 +1,67 @@
|
|||
|
||||
// these are functionalities that I might include in ags
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { Variable } from "resource:///com/github/Aylur/ags/variable.js"
|
||||
import { App } from "resource:///com/github/Aylur/ags/app.js"
|
||||
import GObject from "gi://GObject?version=2.0"
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
// export function watch(init, objs, callback)
|
||||
// export function watch(init, obj, callback)
|
||||
export function pwatch(
|
||||
init,
|
||||
objs,
|
||||
sigOrFn,
|
||||
callback,
|
||||
) {
|
||||
const v = new Variable(init)
|
||||
const f = typeof sigOrFn === "function" ? sigOrFn : callback ?? (() => v.value)
|
||||
const set = () => v.value = f()
|
||||
|
||||
if (Array.isArray(objs)) {
|
||||
// multiple objects
|
||||
for (const obj of objs) {
|
||||
if (Array.isArray(obj)) {
|
||||
// obj signal pair
|
||||
const [o, s = "changed"] = obj
|
||||
o.connect(s, set)
|
||||
} else {
|
||||
// obj on changed
|
||||
obj.connect("changed", set)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// watch single object
|
||||
const signal = typeof sigOrFn === "string" ? sigOrFn : "changed"
|
||||
objs.connect(signal, set)
|
||||
}
|
||||
|
||||
return v.bind()
|
||||
}
|
||||
export function watch(init, objs, sigOrFn, callback) {
|
||||
print(objs)
|
||||
const v = new Variable(init);
|
||||
const f = typeof sigOrFn === "function" ? sigOrFn : (callback || (() => v.value));
|
||||
const set = () => { v.value = f(); };
|
||||
|
||||
if (Array.isArray(objs)) {
|
||||
// multiple objects
|
||||
for (const obj of objs) {
|
||||
if (Array.isArray(obj)) {
|
||||
// obj signal pair
|
||||
const [o, s = "changed"] = obj;
|
||||
o.connect(s, set);
|
||||
} else {
|
||||
// obj on changed
|
||||
obj.connect("changed", set);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// watch single object
|
||||
const signal = typeof sigOrFn === "string" ? sigOrFn : "changed";
|
||||
objs.connect(signal, set);
|
||||
}
|
||||
|
||||
return v.bind();
|
||||
}
|
133
.config/ags/old/lib/icons.js
Normal file
|
@ -0,0 +1,133 @@
|
|||
|
||||
export const substitutes = {
|
||||
"transmission-gtk": "transmission",
|
||||
"blueberry.py": "blueberry",
|
||||
"Caprine": "facebook-messenger",
|
||||
"com.raggesilver.BlackBox-symbolic": "terminal-symbolic",
|
||||
"audio-headset-bluetooth": "audio-headphones-symbolic",
|
||||
"audio-card-analog-usb": "audio-speakers-symbolic",
|
||||
"audio-card-analog-pci": "audio-card-symbolic",
|
||||
"preferences-system": "emblem-system-symbolic",
|
||||
"com.github.Aylur.ags-symbolic": "controls-symbolic",
|
||||
"com.github.Aylur.ags": "controls-symbolic",
|
||||
}
|
||||
|
||||
export default {
|
||||
fallback: {
|
||||
executable: "application-x-executable-symbolic",
|
||||
notification: "dialog-information-symbolic",
|
||||
video: "video-x-generic-symbolic",
|
||||
audio: "audio-x-generic-symbolic",
|
||||
},
|
||||
ui: {
|
||||
close: "window-close-symbolic",
|
||||
colorpicker: "color-select-symbolic",
|
||||
info: "info-symbolic",
|
||||
link: "external-link-symbolic",
|
||||
lock: "system-lock-screen-symbolic",
|
||||
menu: "open-menu-symbolic",
|
||||
refresh: "view-refresh-symbolic",
|
||||
search: "system-search-symbolic",
|
||||
settings: "emblem-system-symbolic",
|
||||
themes: "preferences-desktop-theme-symbolic",
|
||||
tick: "object-select-symbolic",
|
||||
time: "hourglass-symbolic",
|
||||
toolbars: "toolbars-symbolic",
|
||||
warning: "dialog-warning-symbolic",
|
||||
person: "person-symbolic",
|
||||
arrow: {
|
||||
right: "pan-end-symbolic",
|
||||
left: "pan-start-symbolic",
|
||||
down: "pan-down-symbolic",
|
||||
up: "pan-up-symbolic",
|
||||
},
|
||||
},
|
||||
audio: {
|
||||
mic: {
|
||||
muted: "microphone-disabled-symbolic",
|
||||
low: "microphone-sensitivity-low-symbolic",
|
||||
medium: "microphone-sensitivity-medium-symbolic",
|
||||
high: "microphone-sensitivity-high-symbolic",
|
||||
},
|
||||
volume: {
|
||||
muted: "audio-volume-muted-symbolic",
|
||||
low: "audio-volume-low-symbolic",
|
||||
medium: "audio-volume-medium-symbolic",
|
||||
high: "audio-volume-high-symbolic",
|
||||
overamplified: "audio-volume-overamplified-symbolic",
|
||||
},
|
||||
type: {
|
||||
headset: "audio-headphones-symbolic",
|
||||
speaker: "audio-speakers-symbolic",
|
||||
card: "audio-card-symbolic",
|
||||
},
|
||||
mixer: "mixer-symbolic",
|
||||
},
|
||||
asusctl: {
|
||||
profile: {
|
||||
Balanced: "power-profile-balanced-symbolic",
|
||||
Quiet: "power-profile-power-saver-symbolic",
|
||||
Performance: "power-profile-performance-symbolic",
|
||||
},
|
||||
mode: {
|
||||
Integrated: "processor-symbolic",
|
||||
Hybrid: "controller-symbolic",
|
||||
},
|
||||
},
|
||||
battery: {
|
||||
charging: "battery-flash-symbolic",
|
||||
warning: "battery-empty-symbolic",
|
||||
},
|
||||
bluetooth: {
|
||||
enabled: "bluetooth-active-symbolic",
|
||||
disabled: "bluetooth-disabled-symbolic",
|
||||
},
|
||||
brightness: {
|
||||
indicator: "display-brightness-symbolic",
|
||||
keyboard: "keyboard-brightness-symbolic",
|
||||
screen: "display-brightness-symbolic",
|
||||
},
|
||||
powermenu: {
|
||||
sleep: "weather-clear-night-symbolic",
|
||||
reboot: "system-reboot-symbolic",
|
||||
logout: "system-log-out-symbolic",
|
||||
shutdown: "system-shutdown-symbolic",
|
||||
},
|
||||
recorder: {
|
||||
recording: "media-record-symbolic",
|
||||
},
|
||||
notifications: {
|
||||
noisy: "org.gnome.Settings-notifications-symbolic",
|
||||
silent: "notifications-disabled-symbolic",
|
||||
message: "chat-bubbles-symbolic",
|
||||
},
|
||||
trash: {
|
||||
full: "user-trash-full-symbolic",
|
||||
empty: "user-trash-symbolic",
|
||||
},
|
||||
mpris: {
|
||||
shuffle: {
|
||||
enabled: "media-playlist-shuffle-symbolic",
|
||||
disabled: "media-playlist-consecutive-symbolic",
|
||||
},
|
||||
loop: {
|
||||
none: "media-playlist-repeat-symbolic",
|
||||
track: "media-playlist-repeat-song-symbolic",
|
||||
playlist: "media-playlist-repeat-symbolic",
|
||||
},
|
||||
playing: "media-playback-pause-symbolic",
|
||||
paused: "media-playback-start-symbolic",
|
||||
stopped: "media-playback-start-symbolic",
|
||||
prev: "media-skip-backward-symbolic",
|
||||
next: "media-skip-forward-symbolic",
|
||||
},
|
||||
system: {
|
||||
cpu: "org.gnome.SystemMonitor-symbolic",
|
||||
ram: "drive-harddisk-solidstate-symbolic",
|
||||
temp: "temperature-symbolic",
|
||||
},
|
||||
color: {
|
||||
dark: "dark-mode-symbolic",
|
||||
light: "light-mode-symbolic",
|
||||
},
|
||||
}
|
19
.config/ags/old/lib/init.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
// import hyprland from "./hyprland.js"
|
||||
// import tmux from "./tmux"
|
||||
// import gtk from "./gtk"
|
||||
import lowBattery from "./battery.js"
|
||||
// import swww from "./swww"
|
||||
|
||||
export async function init() {
|
||||
try {
|
||||
// gtk()
|
||||
// tmux()
|
||||
lowBattery()
|
||||
// hyprland()
|
||||
// css()
|
||||
// swww()
|
||||
} catch (error) {
|
||||
logError(error)
|
||||
}
|
||||
}
|
120
.config/ags/old/lib/utils.js
Normal file
|
@ -0,0 +1,120 @@
|
|||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { substitutes } from "./icons.js"
|
||||
import Gtk from "gi://Gtk?version=3.0"
|
||||
import Gdk from "gi://Gdk"
|
||||
import GLib from "gi://GLib?version=2.0"
|
||||
|
||||
export function config(config) {
|
||||
return config
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns substitute icon || name || fallback icon
|
||||
*/
|
||||
export function icon(name, fallback = name) {
|
||||
if (!name)
|
||||
return fallback || ""
|
||||
|
||||
if (GLib.file_test(name, GLib.FileTest.EXISTS))
|
||||
return name
|
||||
|
||||
const icon = (substitutes[name] || name)
|
||||
if (Utils.lookUpIcon(icon))
|
||||
return icon
|
||||
|
||||
print(`no icon substitute "${icon}" for "${name}", fallback: "${fallback}"`)
|
||||
return fallback
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns execAsync(["bash", "-c", cmd])
|
||||
*/
|
||||
export async function bash(strings, ...values) {
|
||||
const cmd = typeof strings === "string" ? strings : strings
|
||||
.flatMap((str, i) => str + `${values[i] ?? ""}`)
|
||||
.join("")
|
||||
|
||||
return Utils.execAsync(["bash", "-c", cmd]).catch(err => {
|
||||
console.error(cmd, err)
|
||||
return ""
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns execAsync(cmd)
|
||||
*/
|
||||
export async function sh(cmd) {
|
||||
return Utils.execAsync(cmd).catch(err => {
|
||||
console.error(typeof cmd === "string" ? cmd : cmd.join(" "), err)
|
||||
return ""
|
||||
})
|
||||
}
|
||||
|
||||
export function forMonitors(widget) {
|
||||
const n = Gdk.Display.get_default()?.get_n_monitors() || 1
|
||||
return range(n, 0).map(widget).flat(1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns [start...length]
|
||||
*/
|
||||
export function range(length, start = 1) {
|
||||
return Array.from({ length }, (_, i) => i + start)
|
||||
}
|
||||
|
||||
/**
|
||||
* promisified timeout
|
||||
*/
|
||||
export function wait(ms, callback) {
|
||||
return new Promise(resolve => Utils.timeout(ms, () => {
|
||||
resolve(callback())
|
||||
}))
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns true if all of the `bins` are found
|
||||
*/
|
||||
export function dependencies(...bins) {
|
||||
const missing = bins.filter(bin => {
|
||||
return !Utils.exec(`which ${bin}`)
|
||||
})
|
||||
|
||||
if (missing.length > 0)
|
||||
console.warn("missing dependencies:", missing.join(", "))
|
||||
|
||||
return missing.length === 0
|
||||
}
|
||||
|
||||
/**
|
||||
* run app detached
|
||||
*/
|
||||
export function launchApp(app) {
|
||||
const exe = app.executable
|
||||
.split(/\s+/)
|
||||
.filter(str => !str.startsWith("%") && !str.startsWith("@"))
|
||||
.join(" ")
|
||||
|
||||
bash(`${exe} &`)
|
||||
app.frequency += 1
|
||||
}
|
||||
|
||||
/**
|
||||
* to use with drag and drop
|
||||
*/
|
||||
export function createSurfaceFromWidget(widget) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const cairo = imports.gi.cairo
|
||||
const alloc = widget.get_allocation()
|
||||
const surface = new cairo.ImageSurface(
|
||||
cairo.Format.ARGB32,
|
||||
alloc.width,
|
||||
alloc.height,
|
||||
)
|
||||
const cr = new cairo.Context(surface)
|
||||
cr.setSourceRGBA(255, 255, 255, 0)
|
||||
cr.rectangle(0, 0, alloc.width, alloc.height)
|
||||
cr.fill()
|
||||
widget.draw(cr)
|
||||
return surface
|
||||
}
|
16
.config/ags/old/lib/variables.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
|
||||
import GLib from "gi://GLib"
|
||||
// import options from "options"
|
||||
//
|
||||
// const intval = options.system.fetchInterval.value
|
||||
// const tempPath = options.system.temperature.value
|
||||
|
||||
export const clock = Variable(GLib.DateTime.new_now_local(), {
|
||||
poll: [1000, () => GLib.DateTime.new_now_local()],
|
||||
})
|
||||
|
||||
export const uptime = Variable(0, {
|
||||
poll: [60_000, "cat /proc/uptime", line =>
|
||||
Number.parseInt(line.split(".")[0]) / 60,
|
||||
],
|
||||
})
|
158
.config/ags/old/modules/PopupWindow.js
Normal file
|
@ -0,0 +1,158 @@
|
|||
import Gtk from "gi://Gtk?version=3.0"
|
||||
import options from '../options.js';
|
||||
|
||||
export const Padding = (name,
|
||||
css = "",
|
||||
hexpand = true,
|
||||
vexpand = true,
|
||||
) => Widget.EventBox({
|
||||
hexpand,
|
||||
vexpand,
|
||||
can_focus: false,
|
||||
child: Widget.Box({ css }),
|
||||
setup: w => w.on("button-press-event", () => App.toggleWindow(name)),
|
||||
})
|
||||
|
||||
const PopupRevealer = (
|
||||
name,
|
||||
child,
|
||||
transition = "slide_down",
|
||||
) => Widget.Box(
|
||||
{ css: "padding: 1px;", class_name: "popup-borderbox" },
|
||||
Widget.Revealer({
|
||||
transition,
|
||||
child: Widget.Box({
|
||||
class_name: "window-content",
|
||||
child,
|
||||
}),
|
||||
transitionDuration: options.theme.PopupTransitionDuration,
|
||||
setup: self => self.hook(App, (_, wname, visible) => {
|
||||
if (wname === name)
|
||||
self.reveal_child = visible
|
||||
}),
|
||||
}),
|
||||
)
|
||||
|
||||
const Layout = (name, child, transition) => ({
|
||||
"center": () => Widget.CenterBox({},
|
||||
Padding(name),
|
||||
Widget.CenterBox(
|
||||
{ vertical: true },
|
||||
Padding(name),
|
||||
PopupRevealer(name, child, transition),
|
||||
Padding(name),
|
||||
),
|
||||
Padding(name),
|
||||
),
|
||||
"top": () => Widget.CenterBox({},
|
||||
Padding(name),
|
||||
Widget.Box(
|
||||
{ vertical: true },
|
||||
PopupRevealer(name, child, transition),
|
||||
Padding(name),
|
||||
),
|
||||
Padding(name),
|
||||
),
|
||||
"top-right": () => Widget.Box({},
|
||||
Padding(name),
|
||||
Widget.Box(
|
||||
{
|
||||
hexpand: false,
|
||||
vertical: true,
|
||||
},
|
||||
PopupRevealer(name, child, transition),
|
||||
Padding(name),
|
||||
),
|
||||
),
|
||||
"top-center": () => Widget.Box({},
|
||||
Padding(name),
|
||||
Widget.Box(
|
||||
{
|
||||
hexpand: false,
|
||||
vertical: true,
|
||||
},
|
||||
PopupRevealer(name, child, transition),
|
||||
Padding(name),
|
||||
),
|
||||
Padding(name),
|
||||
),
|
||||
"top-left": () => Widget.Box({},
|
||||
Widget.Box(
|
||||
{
|
||||
hexpand: false,
|
||||
vertical: true,
|
||||
},
|
||||
PopupRevealer(name, child, transition),
|
||||
Padding(name),
|
||||
),
|
||||
Padding(name),
|
||||
),
|
||||
"bottom-left": () => Widget.Box({},
|
||||
Widget.Box(
|
||||
{
|
||||
hexpand: false,
|
||||
vertical: true,
|
||||
},
|
||||
Padding(name),
|
||||
PopupRevealer(name, child, transition),
|
||||
),
|
||||
Padding(name),
|
||||
),
|
||||
"bottom-center": () => Widget.Box({},
|
||||
Padding(name),
|
||||
Widget.Box(
|
||||
{
|
||||
hexpand: false,
|
||||
vertical: true,
|
||||
},
|
||||
Padding(name),
|
||||
PopupRevealer(name, child, transition),
|
||||
),
|
||||
Padding(name),
|
||||
),
|
||||
"bottom-right": () => Widget.Box({},
|
||||
Padding(name),
|
||||
Widget.Box(
|
||||
{
|
||||
hexpand: false,
|
||||
vertical: true,
|
||||
},
|
||||
Padding(name),
|
||||
PopupRevealer(name, child, transition),
|
||||
),
|
||||
),
|
||||
"right": () => Widget.Box({},
|
||||
Padding(name),
|
||||
Widget.Box(
|
||||
{
|
||||
hexpand: false,
|
||||
vertical: true,
|
||||
},
|
||||
// Padding(name),
|
||||
PopupRevealer(name, child, transition),
|
||||
),
|
||||
),
|
||||
})
|
||||
|
||||
export default ({
|
||||
name,
|
||||
child,
|
||||
layout = "center",
|
||||
transition,
|
||||
exclusivity = "ignore",
|
||||
...props
|
||||
}) => Widget.Window({
|
||||
name,
|
||||
class_names: [name, "popup-window"],
|
||||
popup: true,
|
||||
visible: false,
|
||||
keymode: "on-demand",
|
||||
exclusivity,
|
||||
layer: "top",
|
||||
anchor: ["top", "bottom", "right", "left"],
|
||||
child: Layout(name, child, transition)[layout](),
|
||||
...props,
|
||||
setup: (self => {
|
||||
self.keybind("Escape", () => App.closeWindow(name))
|
||||
})
|
||||
})
|
56
.config/ags/old/modules/bar/Bar.js
Normal file
|
@ -0,0 +1,56 @@
|
|||
import BatteryBar from "./buttons/BatteryBar.js"
|
||||
import ColorPicker from "./buttons/ColorPicker.js"
|
||||
import Date from "./buttons/Date.js"
|
||||
import Launcher from "./buttons/Launcher.js"
|
||||
import Media from "./buttons/Media.js"
|
||||
import PowerMenu from "./buttons/PowerMenu.js"
|
||||
import SysTray from "./buttons/SysTray.js"
|
||||
import SystemIndicators from "./buttons/SystemIndicators.js"
|
||||
import Taskbar from "./buttons/Taskbar.js"
|
||||
import Workspaces from "./buttons/Workspaces.js"
|
||||
import ScreenRecord from "./buttons/ScreenRecord.js"
|
||||
import Messages from "./buttons/Messages.js"
|
||||
import options from "../../options.js"
|
||||
|
||||
const { start, center, end } = options.bar.layout
|
||||
const pos = options.bar.position
|
||||
|
||||
const widget = {
|
||||
battery: BatteryBar,
|
||||
colorpicker: ColorPicker,
|
||||
date: Date,
|
||||
launcher: Launcher,
|
||||
media: Media,
|
||||
powermenu: PowerMenu,
|
||||
systray: SysTray,
|
||||
system: SystemIndicators,
|
||||
taskbar: Taskbar,
|
||||
workspaces: Workspaces,
|
||||
screenrecord: ScreenRecord,
|
||||
messages: Messages,
|
||||
expander: () => Widget.Box({ expand: true }),
|
||||
}
|
||||
|
||||
export default (monitor) => Widget.Window({
|
||||
monitor,
|
||||
class_name: "bar",
|
||||
name: `bar${monitor}`,
|
||||
exclusivity: "exclusive",
|
||||
layer: "top",
|
||||
anchor: [pos, "right", "left"],
|
||||
child: Widget.CenterBox({
|
||||
css: "min-width: 2px; min-height: 2px;",
|
||||
startWidget: Widget.Box({
|
||||
hexpand: true,
|
||||
children: start.map(w => widget[w]()),
|
||||
}),
|
||||
centerWidget: Widget.Box({
|
||||
hpack: "center",
|
||||
children: center.map(w => widget[w]()),
|
||||
}),
|
||||
endWidget: Widget.Box({
|
||||
hexpand: true,
|
||||
children: end.map(w => widget[w]()),
|
||||
}),
|
||||
}),
|
||||
})
|
38
.config/ags/old/modules/bar/PanelButton.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
import options from "../../options.js"
|
||||
|
||||
export default ({
|
||||
window = "",
|
||||
flat,
|
||||
child,
|
||||
setup,
|
||||
...rest
|
||||
}) => Widget.Button({
|
||||
child: Widget.Box({ child }),
|
||||
setup: self => {
|
||||
let open = false
|
||||
|
||||
self.toggleClassName("panel-button")
|
||||
self.toggleClassName(window)
|
||||
|
||||
self.toggleClassName("flat", flat ?? options.bar.flatButtons)
|
||||
|
||||
self.hook(App, (_, win, visible) => {
|
||||
if (win !== window)
|
||||
return
|
||||
|
||||
if (open && !visible) {
|
||||
open = false
|
||||
self.toggleClassName("active", false)
|
||||
}
|
||||
|
||||
if (visible) {
|
||||
open = true
|
||||
self.toggleClassName("active")
|
||||
}
|
||||
})
|
||||
|
||||
if (setup)
|
||||
setup(self)
|
||||
},
|
||||
...rest,
|
||||
})
|
25
.config/ags/old/modules/bar/ScreenCorners.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
import options from "../../options.js"
|
||||
|
||||
const { corners } = options.bar
|
||||
|
||||
export default (monitor) => Widget.Window({
|
||||
monitor,
|
||||
name: `corner${monitor}`,
|
||||
class_name: "screen-corner",
|
||||
anchor: ["top", "bottom", "right", "left"],
|
||||
click_through: true,
|
||||
child: Widget.Box({
|
||||
class_name: "shadow",
|
||||
child: Widget.Box({
|
||||
class_name: "border",
|
||||
expand: true,
|
||||
child: Widget.Box({
|
||||
class_name: "corner",
|
||||
expand: true,
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
setup: self => {
|
||||
self.toggleClassName("corners", corners)
|
||||
},
|
||||
})
|
234
.config/ags/old/modules/bar/bar.scss
Normal file
|
@ -0,0 +1,234 @@
|
|||
@use 'sass:color';
|
||||
|
||||
$bar-spacing: $spacing * .3;
|
||||
$button-radius: $radius;
|
||||
|
||||
@mixin panel-button($flat: true, $reactive: true) {
|
||||
@include accs-button($flat, $reactive);
|
||||
|
||||
>* {
|
||||
border-radius: $button-radius;
|
||||
margin: $bar-spacing;
|
||||
}
|
||||
|
||||
label,
|
||||
image {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
>* {
|
||||
padding: $padding * 0.4 $padding * 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.bar {
|
||||
background-color: $bg;
|
||||
|
||||
.panel-button {
|
||||
@include panel-button;
|
||||
|
||||
&:not(.flat) {
|
||||
|
||||
@include accs-button($flat: false);
|
||||
}
|
||||
}
|
||||
|
||||
.launcher {
|
||||
.colored {
|
||||
color: transparentize($primary-bg, 0.2);
|
||||
}
|
||||
|
||||
&:hover .colored {
|
||||
color: $primary-bg;
|
||||
}
|
||||
|
||||
&:active .colored,
|
||||
&.active .colored {
|
||||
color: $primary-fg;
|
||||
}
|
||||
}
|
||||
|
||||
.workspaces {
|
||||
label {
|
||||
font-size: 0;
|
||||
min-width: 5pt;
|
||||
min-height: 5pt;
|
||||
border-radius: $radius*.6;
|
||||
box-shadow: inset 0 0 0 $border-width $border-color;
|
||||
margin: 0 $padding * .5;
|
||||
transition: $transition* .5;
|
||||
background-color: transparentize($fg, .8);
|
||||
|
||||
&.occupied {
|
||||
background-color: transparentize($fg, .2);
|
||||
min-width: 7pt;
|
||||
min-height: 7pt;
|
||||
}
|
||||
|
||||
&.active {
|
||||
// background-color: $primary-bg;
|
||||
background-image: $active-gradient;
|
||||
min-width: 20pt;
|
||||
min-height: 12pt;
|
||||
}
|
||||
}
|
||||
|
||||
&.active,
|
||||
&:active {
|
||||
label {
|
||||
background-color: transparentize($primary-fg, .3);
|
||||
|
||||
&.occupied {
|
||||
background-color: transparentize($primary-fg, .15);
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: $primary-fg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.media label {
|
||||
margin: 0 ($spacing * .5)
|
||||
}
|
||||
|
||||
.taskbar .indicator.active {
|
||||
background-color: $primary-bg;
|
||||
border-radius: $radius;
|
||||
min-height: 4pt;
|
||||
min-width: 6pt;
|
||||
margin: 2pt;
|
||||
}
|
||||
|
||||
.powermenu.colored,
|
||||
.recorder {
|
||||
image {
|
||||
color: transparentize($error-bg, 0.3);
|
||||
}
|
||||
|
||||
&:hover image {
|
||||
color: transparentize($error-bg, 0.15);
|
||||
}
|
||||
|
||||
&:active image {
|
||||
color: $primary-fg;
|
||||
}
|
||||
}
|
||||
|
||||
.quicksettings>box>box {
|
||||
@include spacing($spacing: if($bar-spacing==0, $padding / 2, $bar-spacing));
|
||||
}
|
||||
|
||||
.quicksettings:not(.active):not(:active) {
|
||||
.bluetooth {
|
||||
color: $primary-bg;
|
||||
|
||||
label {
|
||||
font-size: $font-size * .7;
|
||||
color: $fg;
|
||||
text-shadow: $text-shadow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.battery-bar {
|
||||
>* {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&.bar-hidden>box {
|
||||
padding: 0 $spacing * .5;
|
||||
|
||||
image {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
levelbar * {
|
||||
all: unset;
|
||||
transition: $transition;
|
||||
}
|
||||
|
||||
.whole {
|
||||
@if $shadows {
|
||||
image {
|
||||
-gtk-icon-shadow: $text-shadow;
|
||||
}
|
||||
|
||||
label {
|
||||
text-shadow: $text-shadow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.regular image {
|
||||
margin-left: $spacing * .5;
|
||||
}
|
||||
|
||||
trough {
|
||||
@include widget;
|
||||
min-height: 12pt;
|
||||
min-width: 12pt;
|
||||
}
|
||||
|
||||
.regular trough {
|
||||
margin-right: $spacing * .5;
|
||||
}
|
||||
|
||||
block {
|
||||
margin: 0;
|
||||
|
||||
&:last-child {
|
||||
border-radius: 0 $button-radius $button-radius 0;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
border-radius: $button-radius 0 0 $button-radius;
|
||||
}
|
||||
}
|
||||
|
||||
.vertical {
|
||||
block {
|
||||
&:last-child {
|
||||
border-radius: 0 0 $button-radius $button-radius;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
border-radius: $button-radius $button-radius 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@for $i from 1 through $bar-battery-blocks {
|
||||
block:nth-child(#{$i}).filled {
|
||||
background-color: color.mix($bg, $primary-bg, $i*3)
|
||||
}
|
||||
|
||||
&.low block:nth-child(#{$i}).filled {
|
||||
background-color: color.mix($bg, $error-bg, $i*3)
|
||||
}
|
||||
|
||||
&.charging block:nth-child(#{$i}).filled {
|
||||
background-color: color.mix($bg, $charging-bg, $i*3)
|
||||
}
|
||||
|
||||
&:active .regular block:nth-child(#{$i}).filled {
|
||||
background-color: color.mix($bg, $primary-fg, $i*3)
|
||||
}
|
||||
}
|
||||
|
||||
&.low image {
|
||||
color: $error-bg
|
||||
}
|
||||
|
||||
&.charging image {
|
||||
color: $charging-bg
|
||||
}
|
||||
|
||||
&:active image {
|
||||
color: $primary-fg
|
||||
}
|
||||
}
|
||||
}
|
94
.config/ags/old/modules/bar/buttons/BatteryBar.js
Normal file
|
@ -0,0 +1,94 @@
|
|||
import icons from "../../../lib/icons.js"
|
||||
import options from "../../../options.js"
|
||||
import PanelButton from "../PanelButton.js"
|
||||
|
||||
const battery = await Service.import("battery")
|
||||
let { bar, percentage, blocks, width, low } = options.bar.battery
|
||||
|
||||
percentage = Variable(percentage, {})
|
||||
|
||||
const Indicator = () => Widget.Icon({
|
||||
setup: self => self.hook(battery, () => {
|
||||
self.icon = battery.charging || battery.charged
|
||||
? icons.battery.charging
|
||||
: battery.icon_name
|
||||
}),
|
||||
})
|
||||
|
||||
const PercentLabel = () => Widget.Revealer({
|
||||
transition: "slide_right",
|
||||
click_through: true,
|
||||
reveal_child: percentage.bind(),
|
||||
child: Widget.Label({
|
||||
label: battery.bind("percent").as(p => `${p}%`),
|
||||
}),
|
||||
})
|
||||
|
||||
const LevelBar = () => {
|
||||
const level = Widget.LevelBar({
|
||||
mode: 1,
|
||||
max_value: blocks,
|
||||
visible: bar !== "hidden",
|
||||
value: battery.bind("percent").as(p => (p / 100) * blocks),
|
||||
})
|
||||
const update = () => {
|
||||
level.value = (battery.percent / 100) * blocks
|
||||
level.css = `block { min-width: ${width / blocks}pt; }`
|
||||
}
|
||||
return level
|
||||
// .hook(width, update)
|
||||
// .hook(blocks, update)
|
||||
// .hook(bar, () => {
|
||||
// level.vpack = bar.value === "whole" ? "fill" : "center"
|
||||
// level.hpack = bar.value === "whole" ? "fill" : "center"
|
||||
// })
|
||||
}
|
||||
|
||||
const WholeButton = () => Widget.Overlay({
|
||||
vexpand: true,
|
||||
child: LevelBar(),
|
||||
class_name: "whole",
|
||||
pass_through: true,
|
||||
overlay: Widget.Box({
|
||||
hpack: "center",
|
||||
children: [
|
||||
Widget.Icon({
|
||||
icon: icons.battery.charging,
|
||||
visible: Utils.merge([
|
||||
battery.bind("charging"),
|
||||
battery.bind("charged"),
|
||||
], (ing, ed) => ing || ed),
|
||||
}),
|
||||
Widget.Box({
|
||||
hpack: "center",
|
||||
vpack: "center",
|
||||
child: PercentLabel(),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
})
|
||||
|
||||
const Regular = () => Widget.Box({
|
||||
class_name: "regular",
|
||||
children: [
|
||||
Indicator(),
|
||||
PercentLabel(),
|
||||
LevelBar(),
|
||||
],
|
||||
})
|
||||
|
||||
export default () => PanelButton({
|
||||
class_name: "battery-bar",
|
||||
hexpand: false,
|
||||
on_clicked: () => { percentage.value = !percentage.value },
|
||||
child: Widget.Box({
|
||||
expand: true,
|
||||
visible: battery.bind("available"),
|
||||
child: bar === "whole" ? WholeButton() : Regular(),
|
||||
}),
|
||||
setup: self => {
|
||||
self.toggleClassName("bar-hidden", bar === "hidden")
|
||||
self.toggleClassName("charging", battery.charging || battery.charged)
|
||||
self.toggleClassName("low", battery.percent < low)
|
||||
}
|
||||
})
|
37
.config/ags/old/modules/bar/buttons/ColorPicker.js
Normal file
|
@ -0,0 +1,37 @@
|
|||
import PanelButton from "../PanelButton.js"
|
||||
import colorpicker from "../../../services/colorpicker.js"
|
||||
import Gdk from "gi://Gdk"
|
||||
|
||||
const css = (color) => `
|
||||
* {
|
||||
background-color: ${color};
|
||||
color: transparent;
|
||||
}
|
||||
*:hover {
|
||||
color: white;
|
||||
text-shadow: 2px 2px 3px rgba(0,0,0,.8);
|
||||
}`
|
||||
|
||||
export default () => {
|
||||
const menu = Widget.Menu({
|
||||
class_name: "colorpicker",
|
||||
children: colorpicker.bind("colors").as(c => c.map(color => Widget.MenuItem({
|
||||
child: Widget.Label(color),
|
||||
css: css(color),
|
||||
on_activate: () => colorpicker.wlCopy(color),
|
||||
}))),
|
||||
})
|
||||
|
||||
return PanelButton({
|
||||
class_name: "color-picker",
|
||||
child: Widget.Icon("color-select-symbolic"),
|
||||
tooltip_text: colorpicker.bind("colors").as(v => `${v.length} colors`),
|
||||
on_clicked: colorpicker.pick,
|
||||
on_secondary_click: self => {
|
||||
if (colorpicker.colors.length === 0)
|
||||
return
|
||||
|
||||
menu.popup_at_widget(self, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null)
|
||||
},
|
||||
})
|
||||
}
|
19
.config/ags/old/modules/bar/buttons/Date.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
import clock from "../../../services/clock.js"
|
||||
import PanelButton from "../PanelButton.js"
|
||||
import options from "../../../options.js"
|
||||
|
||||
const { format, action } = options.bar.date
|
||||
// const time = Utils.derive([clock], (c) => {
|
||||
// c.format(format) || ""
|
||||
// })
|
||||
|
||||
|
||||
// const time = Variable('', {
|
||||
// poll: [1000, `date "+${format}"`],
|
||||
// });
|
||||
|
||||
export default () => PanelButton({
|
||||
window: "dashboard",
|
||||
on_clicked: action,
|
||||
child: Widget.Label({ label: clock.bind('time').as(t => `${t.format(format)}`) }),
|
||||
})
|
21
.config/ags/old/modules/bar/buttons/Launcher.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
import PanelButton from "../PanelButton.js"
|
||||
import options from "../../../options.js"
|
||||
|
||||
const { icon, label, action } = options.bar.launcher
|
||||
|
||||
export default () => PanelButton({
|
||||
window: "launcher",
|
||||
on_clicked: action,
|
||||
child: Widget.Box([
|
||||
Widget.Icon({
|
||||
class_name: icon.colored ? "colored" : "",
|
||||
visible: !!icon.icon,
|
||||
icon: icon.icon,
|
||||
}),
|
||||
Widget.Label({
|
||||
class_name: label.colored ? "colored" : "",
|
||||
visible: !!label.label,
|
||||
label: label.label,
|
||||
}),
|
||||
]),
|
||||
})
|
81
.config/ags/old/modules/bar/buttons/Media.js
Normal file
|
@ -0,0 +1,81 @@
|
|||
import PanelButton from "../PanelButton.js"
|
||||
import options from "../../../options.js"
|
||||
import icons from "../../../lib/icons.js"
|
||||
import { icon } from "../../../lib/utils.js"
|
||||
|
||||
const mpris = await Service.import("mpris")
|
||||
const { length, direction, preferred, monochrome } = options.bar.media
|
||||
|
||||
const getPlayer = (name = preferred) =>
|
||||
mpris.getPlayer(name) || mpris.players[0] || null
|
||||
|
||||
const Content = (player) => {
|
||||
const revealer = Widget.Revealer({
|
||||
click_through: true,
|
||||
visible: (length > 0),
|
||||
transition: `slide_${direction}`,
|
||||
setup: self => {
|
||||
let current = ""
|
||||
self.hook(player, () => {
|
||||
if (current === player.track_title)
|
||||
return
|
||||
|
||||
current = player.track_title
|
||||
self.reveal_child = true
|
||||
Utils.timeout(3000, () => {
|
||||
!self.is_destroyed && (self.reveal_child = false)
|
||||
})
|
||||
})
|
||||
},
|
||||
child: Widget.Label({
|
||||
truncate: "end",
|
||||
max_width_chars: length,
|
||||
label: player.bind("track_title").as(() =>
|
||||
`${player.track_artists.join(", ")} - ${player.track_title}`),
|
||||
}),
|
||||
})
|
||||
|
||||
const playericon = Widget.Icon({
|
||||
icon: player.bind("entry").as(entry => {
|
||||
const name = `${entry}${monochrome ? "-symbolic" : ""}`
|
||||
return icon(name, icons.fallback.audio)
|
||||
}),
|
||||
})
|
||||
|
||||
return Widget.Box({
|
||||
attribute: { revealer },
|
||||
children: direction === "right"
|
||||
? [playericon, revealer] : [revealer, playericon],
|
||||
})
|
||||
}
|
||||
|
||||
export default () => {
|
||||
let player = getPlayer()
|
||||
|
||||
const btn = PanelButton({
|
||||
class_name: "media",
|
||||
child: Widget.Icon(icons.fallback.audio),
|
||||
})
|
||||
|
||||
const update = () => {
|
||||
player = getPlayer()
|
||||
btn.visible = !!player
|
||||
|
||||
if (!player)
|
||||
return
|
||||
|
||||
const content = Content(player)
|
||||
const { revealer } = content.attribute
|
||||
btn.child = content
|
||||
btn.on_primary_click = () => { player.playPause() }
|
||||
btn.on_secondary_click = () => { player.playPause() }
|
||||
btn.on_scroll_up = () => { player.next() }
|
||||
btn.on_scroll_down = () => { player.previous() }
|
||||
btn.on_hover = () => { revealer.reveal_child = true }
|
||||
btn.on_hover_lost = () => { revealer.reveal_child = false }
|
||||
}
|
||||
|
||||
return btn
|
||||
// .hook(preferred, update)
|
||||
.hook(mpris, update, "notify::players")
|
||||
}
|
16
.config/ags/old/modules/bar/buttons/Messages.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
import icons from "../../../lib/icons.js"
|
||||
import PanelButton from "../PanelButton.js"
|
||||
import options from "../../../options.js"
|
||||
|
||||
const n = await Service.import("notifications")
|
||||
const notifs = n.bind("notifications")
|
||||
const action = options.bar.messages.action
|
||||
|
||||
export default () => PanelButton({
|
||||
class_name: "messages",
|
||||
on_clicked: action,
|
||||
visible: notifs.as(n => n.length > 0),
|
||||
child: Widget.Box([
|
||||
Widget.Icon(icons.notifications.message),
|
||||
]),
|
||||
})
|
15
.config/ags/old/modules/bar/buttons/PowerMenu.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
import icons from "../../../lib/icons.js"
|
||||
import PanelButton from "../PanelButton.js"
|
||||
import options from "../../../options.js"
|
||||
|
||||
const { monochrome, action } = options.bar.powermenu
|
||||
|
||||
export default () => PanelButton({
|
||||
window: "powermenu",
|
||||
on_clicked: action,
|
||||
child: Widget.Icon(icons.powermenu.shutdown),
|
||||
setup: self => {
|
||||
self.toggleClassName("colored", !monochrome)
|
||||
self.toggleClassName("box")
|
||||
},
|
||||
})
|
21
.config/ags/old/modules/bar/buttons/ScreenRecord.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
import PanelButton from "../PanelButton.js"
|
||||
import screenrecord from "../../../services/screenrecord.js"
|
||||
import icons from "../../../lib/icons.js"
|
||||
|
||||
export default () => PanelButton({
|
||||
class_name: "recorder",
|
||||
on_clicked: () => screenrecord.stop(),
|
||||
visible: screenrecord.bind("recording"),
|
||||
child: Widget.Box({
|
||||
children: [
|
||||
Widget.Icon(icons.recorder.recording),
|
||||
Widget.Label({
|
||||
label: screenrecord.bind("timer").as(time => {
|
||||
const sec = time % 60
|
||||
const min = Math.floor(time / 60)
|
||||
return `${min}:${sec < 10 ? "0" + sec : sec}`
|
||||
}),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
})
|
39
.config/ags/old/modules/bar/buttons/SysTray.js
Normal file
|
@ -0,0 +1,39 @@
|
|||
import PanelButton from "../PanelButton.js"
|
||||
import Gdk from "gi://Gdk"
|
||||
import options from "../../../options.js"
|
||||
|
||||
const systemtray = await Service.import("systemtray")
|
||||
const { ignore } = options.bar.systray
|
||||
|
||||
const SysTrayItem = (item) => PanelButton({
|
||||
class_name: "tray-item",
|
||||
child: Widget.Icon({ icon: item.bind("icon") }),
|
||||
tooltip_markup: item.bind("tooltip_markup"),
|
||||
setup: self => {
|
||||
const menu = item.menu
|
||||
if (!menu)
|
||||
return
|
||||
|
||||
const id = item.menu?.connect("popped-up", () => {
|
||||
self.toggleClassName("active")
|
||||
menu.connect("notify::visible", () => {
|
||||
self.toggleClassName("active", menu.visible)
|
||||
})
|
||||
menu.disconnect(id)
|
||||
})
|
||||
|
||||
if (id)
|
||||
self.connect("destroy", () => item.menu?.disconnect(id))
|
||||
},
|
||||
|
||||
on_primary_click: btn => item.menu?.popup_at_widget(
|
||||
btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null),
|
||||
|
||||
on_secondary_click: btn => item.menu?.popup_at_widget(
|
||||
btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null),
|
||||
})
|
||||
|
||||
export default () => Widget.Box()
|
||||
.bind("children", systemtray, "items", i => i
|
||||
.filter(({ id }) => !ignore.includes(id))
|
||||
.map(SysTrayItem))
|
79
.config/ags/old/modules/bar/buttons/SystemIndicators.js
Normal file
|
@ -0,0 +1,79 @@
|
|||
import PanelButton from "../PanelButton.js"
|
||||
import icons from "../../../lib/icons.js"
|
||||
import asusctl from "../../../services/asusctl.js"
|
||||
|
||||
const notifications = await Service.import("notifications")
|
||||
const bluetooth = await Service.import("bluetooth")
|
||||
const audio = await Service.import("audio")
|
||||
const network = await Service.import("network")
|
||||
|
||||
const ProfileIndicator = () => Widget.Icon()
|
||||
.bind("visible", asusctl, "profile", p => p !== "Balanced")
|
||||
.bind("icon", asusctl, "profile", p => icons.asusctl.profile[p])
|
||||
|
||||
const ModeIndicator = () => Widget.Icon()
|
||||
.bind("visible", asusctl, "mode", m => m !== "Hybrid")
|
||||
.bind("icon", asusctl, "mode", m => icons.asusctl.mode[m])
|
||||
|
||||
const MicrophoneIndicator = () => Widget.Icon()
|
||||
.hook(audio, self => self.visible =
|
||||
audio.recorders.length > 0
|
||||
|| audio.microphone.stream?.is_muted
|
||||
|| audio.microphone.is_muted)
|
||||
.hook(audio.microphone, self => {
|
||||
const vol = audio.microphone.stream.is_muted ? 0 : audio.microphone.volume
|
||||
const { muted, low, medium, high } = icons.audio.mic
|
||||
const cons = [[67, high], [34, medium], [1, low], [0, muted]]
|
||||
self.icon = cons.find(([n]) => n <= vol * 100)?.[1] || ""
|
||||
})
|
||||
|
||||
const DNDIndicator = () => Widget.Icon({
|
||||
visible: notifications.bind("dnd"),
|
||||
icon: icons.notifications.silent,
|
||||
})
|
||||
|
||||
const BluetoothIndicator = () => Widget.Overlay({
|
||||
class_name: "bluetooth",
|
||||
passThrough: true,
|
||||
child: Widget.Icon({
|
||||
icon: icons.bluetooth.enabled,
|
||||
visible: bluetooth.bind("enabled"),
|
||||
}),
|
||||
overlay: Widget.Label({
|
||||
hpack: "end",
|
||||
vpack: "start",
|
||||
label: bluetooth.bind("connected_devices").as(c => `${c.length}`),
|
||||
visible: bluetooth.bind("connected_devices").as(c => c.length > 0),
|
||||
}),
|
||||
})
|
||||
|
||||
const NetworkIndicator = () => Widget.Icon().hook(network, self => {
|
||||
const icon = network[network.primary || "wifi"]?.icon_name
|
||||
self.icon = icon || ""
|
||||
self.visible = !!icon
|
||||
})
|
||||
|
||||
const AudioIndicator = () => Widget.Icon({
|
||||
icon: audio.speaker.bind("volume").as(vol => {
|
||||
const { muted, low, medium, high, overamplified } = icons.audio.volume
|
||||
const cons = [[101, overamplified], [67, high], [34, medium], [1, low], [0, muted]]
|
||||
const icon = cons.find(([n]) => n <= vol * 100)?.[1] || ""
|
||||
return audio.speaker.is_muted ? muted : icon
|
||||
}),
|
||||
})
|
||||
|
||||
export default () => PanelButton({
|
||||
class_name: "quicksettings panel-button",
|
||||
on_clicked: () => App.toggleWindow("quicksettings"),
|
||||
on_scroll_up: () => audio.speaker.volume += 0.02,
|
||||
on_scroll_down: () => audio.speaker.volume -= 0.02,
|
||||
child: Widget.Box([
|
||||
asusctl?.available && ProfileIndicator(),
|
||||
asusctl?.available && ModeIndicator(),
|
||||
DNDIndicator(),
|
||||
BluetoothIndicator(),
|
||||
NetworkIndicator(),
|
||||
AudioIndicator(),
|
||||
MicrophoneIndicator(),
|
||||
]),
|
||||
})
|
86
.config/ags/old/modules/bar/buttons/Taskbar.js
Normal file
|
@ -0,0 +1,86 @@
|
|||
import { launchApp, icon } from "../../../lib/utils.js"
|
||||
import icons from "../../../lib/icons.js"
|
||||
import options from "../../../options.js"
|
||||
import { watch } from "../../../lib/experiments.js"
|
||||
import PanelButton from "../PanelButton.js"
|
||||
|
||||
const hyprland = await Service.import("hyprland")
|
||||
const apps = await Service.import("applications")
|
||||
const { monochrome, exclusive } = options.bar.taskbar
|
||||
const { position } = options.bar
|
||||
|
||||
const focus = (address) => hyprland.messageAsync(
|
||||
`dispatch focuswindow address:${address}`)
|
||||
|
||||
const DummyItem = (address) => Widget.Box({
|
||||
attribute: { address },
|
||||
visible: false,
|
||||
})
|
||||
|
||||
const AppItem = (address) => {
|
||||
const client = hyprland.getClient(address)
|
||||
if (!client || client.class === "")
|
||||
return DummyItem(address)
|
||||
|
||||
const app = apps.list.find(app => app.match(client.class))
|
||||
|
||||
const btn = PanelButton({
|
||||
class_name: "panel-button",
|
||||
tooltip_text: client.title,
|
||||
on_primary_click: () => focus(address),
|
||||
on_middle_click: () => app && launchApp(app),
|
||||
visible: watch(true, [hyprland], () => {
|
||||
return exclusive
|
||||
? hyprland.active.workspace.id === client.workspace.id
|
||||
: true
|
||||
}),
|
||||
child: Widget.Icon({
|
||||
icon: icon(
|
||||
(app?.icon_name || client.class) + (monochrome ? "-symbolic" : ""),
|
||||
icons.fallback.executable,
|
||||
),
|
||||
}),
|
||||
})
|
||||
|
||||
return Widget.Box(
|
||||
{ attribute: { address } },
|
||||
Widget.Overlay({
|
||||
child: btn,
|
||||
pass_through: true,
|
||||
overlay: Widget.Box({
|
||||
className: "indicator",
|
||||
hpack: "center",
|
||||
vpack: (position === "top" ? "start" : "end"),
|
||||
setup: w => w.hook(hyprland, () => {
|
||||
w.toggleClassName("active", hyprland.active.client.address === address)
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
function sortItems(arr) {
|
||||
return arr.sort(({ attribute: a }, { attribute: b }) => {
|
||||
const aclient = hyprland.getClient(a.address)
|
||||
const bclient = hyprland.getClient(b.address)
|
||||
return aclient.workspace.id - bclient.workspace.id
|
||||
})
|
||||
}
|
||||
|
||||
export default () => Widget.Box({
|
||||
class_name: "taskbar",
|
||||
children: sortItems(hyprland.clients.map(c => AppItem(c.address))),
|
||||
setup: w => w
|
||||
.hook(hyprland, (w, address) => {
|
||||
if (typeof address === "string")
|
||||
w.children = w.children.filter(ch => ch.attribute.address !== address)
|
||||
}, "client-removed")
|
||||
.hook(hyprland, (w, address) => {
|
||||
if (typeof address === "string")
|
||||
w.children = sortItems([...w.children, AppItem(address)])
|
||||
}, "client-added")
|
||||
.hook(hyprland, (w, event) => {
|
||||
if (event === "movewindow")
|
||||
w.children = sortItems(w.children)
|
||||
}, "event"),
|
||||
})
|
38
.config/ags/old/modules/bar/buttons/Workspaces.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
import PanelButton from "../PanelButton.js"
|
||||
import options from "../../../options.js"
|
||||
import { sh, range } from "../../../lib/utils.js"
|
||||
|
||||
const hyprland = await Service.import("hyprland")
|
||||
const { workspaces } = options.bar.workspaces
|
||||
|
||||
const dispatch = (arg) => {
|
||||
sh(`hyprctl dispatch workspace ${arg}`)
|
||||
}
|
||||
|
||||
const Workspaces = (ws) => Widget.Box({
|
||||
children: range(ws || 20).map(i => Widget.Label({
|
||||
attribute: i,
|
||||
vpack: "center",
|
||||
label: `${i}`,
|
||||
setup: self => self.hook(hyprland, () => {
|
||||
self.toggleClassName("active", hyprland.active.workspace.id === i)
|
||||
self.toggleClassName("occupied", (hyprland.getWorkspace(i)?.windows || 0) > 0)
|
||||
}),
|
||||
})),
|
||||
setup: box => {
|
||||
if (ws === 0) {
|
||||
box.hook(hyprland.active.workspace, () => box.children.map(btn => {
|
||||
btn.visible = hyprland.workspaces.some(ws => ws.id === btn.attribute)
|
||||
}))
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
export default () => PanelButton({
|
||||
window: "overview",
|
||||
class_name: "workspaces",
|
||||
on_scroll_up: () => dispatch("m+1"),
|
||||
on_scroll_down: () => dispatch("m-1"),
|
||||
on_clicked: () => App.toggleWindow("overview"),
|
||||
child: Workspaces(workspaces),
|
||||
})
|
50
.config/ags/old/modules/bar/screencorner.scss
Normal file
|
@ -0,0 +1,50 @@
|
|||
$_shadow-size: $padding;
|
||||
$_radius: $radius * $hyprland-gaps-multiplier;
|
||||
$_margin: 99px;
|
||||
|
||||
window.screen-corner {
|
||||
box.shadow {
|
||||
margin-right: $_margin * -1;
|
||||
margin-left: $_margin * -1;
|
||||
|
||||
@if $shadows {
|
||||
box-shadow: inset 0 0 $_shadow-size 0 $shadow-color;
|
||||
}
|
||||
|
||||
@if $bar-position =="top" {
|
||||
margin-bottom: $_margin * -1;
|
||||
}
|
||||
|
||||
@if $bar-position =="bottom" {
|
||||
margin-top: $_margin * -1;
|
||||
}
|
||||
}
|
||||
|
||||
box.border {
|
||||
@if $bar-position =="top" {
|
||||
border-top: $border-width solid $bg;
|
||||
}
|
||||
|
||||
@if $bar-position =="bottom" {
|
||||
border-bottom: $border-width solid $bg;
|
||||
}
|
||||
|
||||
margin-right: $_margin;
|
||||
margin-left: $_margin;
|
||||
}
|
||||
|
||||
box.corner {
|
||||
box-shadow: 0 0 0 $border-width $border-color;
|
||||
}
|
||||
|
||||
&.corners {
|
||||
box.border {
|
||||
border-radius: if($radius>0, $radius * $hyprland-gaps-multiplier, 0);
|
||||
box-shadow: 0 0 0 $_radius $bg;
|
||||
}
|
||||
|
||||
box.corner {
|
||||
border-radius: if($radius>0, $radius * $hyprland-gaps-multiplier, 0);
|
||||
}
|
||||
}
|
||||
}
|
38
.config/ags/old/modules/datemenu/DateColumn.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
import { uptime } from "../../lib/variables.js"
|
||||
import clock from "../../services/clock.js"
|
||||
|
||||
function up(up) {
|
||||
const h = Math.floor(up / 60)
|
||||
const m = Math.floor(up % 60)
|
||||
return `uptime: ${h}:${m < 10 ? "0" + m : m}`
|
||||
}
|
||||
|
||||
export default () => Widget.Box({
|
||||
vertical: true,
|
||||
class_name: "date-column vertical",
|
||||
children: [
|
||||
Widget.Box({
|
||||
class_name: "clock-box",
|
||||
vertical: true,
|
||||
children: [
|
||||
Widget.Label({
|
||||
class_name: "clock",
|
||||
label: clock.bind('time').as(t => t.format("%H:%M")),
|
||||
}),
|
||||
Widget.Label({
|
||||
class_name: "uptime",
|
||||
label: uptime.bind().as(up),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
Widget.Box({
|
||||
class_name: "calendar",
|
||||
children: [
|
||||
Widget.Calendar({
|
||||
hexpand: true,
|
||||
hpack: "center",
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
})
|
33
.config/ags/old/modules/datemenu/DateMenu.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
import PopupWindow from "../PopupWindow.js"
|
||||
import DateColumn from "./DateColumn.js"
|
||||
import options from "../../options.js"
|
||||
|
||||
const { bar, datemenu } = options
|
||||
const pos = bar.position
|
||||
const layout = `${bar.position}-${datemenu.position}`
|
||||
|
||||
const Settings = () => Widget.Box({
|
||||
class_name: "datemenu horizontal",
|
||||
vexpand: false,
|
||||
children: [
|
||||
// NotificationColumn(),
|
||||
// Widget.Separator({ orientation: 1 }),
|
||||
DateColumn(),
|
||||
],
|
||||
})
|
||||
|
||||
const DateMenu = () => PopupWindow({
|
||||
name: "datemenu",
|
||||
exclusivity: "exclusive",
|
||||
transition: pos === "top" ? "slide_down" : "slide_up",
|
||||
layout: layout,
|
||||
child: Settings(),
|
||||
})
|
||||
|
||||
export function setupDateMenu() {
|
||||
App.addWindow(DateMenu())
|
||||
// layout.connect("changed", () => {
|
||||
// App.removeWindow("datemenu")
|
||||
// App.addWindow(DateMenu())
|
||||
// })
|
||||
}
|
31
.config/ags/old/modules/dock/Dock.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
// import Gtk from 'gi://Gtk';
|
||||
|
||||
/** @param {string} windowName */
|
||||
const Padding = windowName => Widget.EventBox({
|
||||
class_name: 'padding',
|
||||
hexpand: true,
|
||||
vexpand: true,
|
||||
setup: w => w.on('button-press-event', () => App.toggleWindow(windowName)),
|
||||
});
|
||||
|
||||
const Dock = () => {
|
||||
return Widget.Box({
|
||||
name: 'dock-box',
|
||||
child: Widget.Label({
|
||||
label: "Yo Yo YO YO bfbhgjhdfvbfb",
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export default () => Widget.Window({
|
||||
name: 'dock',
|
||||
anchor: ['bottom'],
|
||||
exclusivity: 'normal',
|
||||
keymode: 'on-demand',
|
||||
layer: 'background',
|
||||
// popup: true,
|
||||
// monitor: 0,
|
||||
visible: true,
|
||||
child: Dock(),
|
||||
})
|
156
.config/ags/old/modules/lock/Lockscreen.js
Normal file
|
@ -0,0 +1,156 @@
|
|||
import GLib from 'gi://GLib'
|
||||
|
||||
const time = Widget.Label({
|
||||
name: 'lockscreen-time',
|
||||
label: GLib.DateTime.new_now_local().format("%H:%M"),
|
||||
setup: (self) => self.poll(1000, label => {
|
||||
label.label = GLib.DateTime.new_now_local().format("%H:%M");
|
||||
}),
|
||||
justification: 'left',
|
||||
hexpand: true,
|
||||
hpack: 'start',
|
||||
})
|
||||
|
||||
const date = Widget.Label({
|
||||
name: 'lockscreen-date',
|
||||
label: GLib.DateTime.new_now_local().format("%e, %B %A"),
|
||||
setup: (self) => self.poll(60000, label => {
|
||||
label.label = GLib.DateTime.new_now_local().format("%e, %B %A");
|
||||
}),
|
||||
justification: 'left',
|
||||
})
|
||||
|
||||
const network = await Service.import('network')
|
||||
const battery = await Service.import('battery')
|
||||
|
||||
|
||||
const Lockscreen = () => {
|
||||
const WifiIndicator = () => Widget.Box({
|
||||
child: Widget.Icon({
|
||||
icon: network.wifi.bind('icon_name'),
|
||||
}),
|
||||
})
|
||||
|
||||
const WiredIndicator = () => Widget.Icon({
|
||||
icon: network.wired.bind('icon_name'),
|
||||
})
|
||||
|
||||
const batPercent = Widget.Revealer({
|
||||
revealChild: false,
|
||||
transitionDuration: 600,
|
||||
transition: 'slide_left',
|
||||
child: Widget.Label({
|
||||
name: "lockscreen-revealer",
|
||||
label: battery.bind('percent').transform(p => "" + p + "%"),
|
||||
}),
|
||||
})
|
||||
|
||||
const batInfo = Widget.Box({
|
||||
"class-name": 'lockscreen-smolbox',
|
||||
hexpand: false,
|
||||
hpack: 'end',
|
||||
children: [
|
||||
batPercent,
|
||||
Widget.EventBox({
|
||||
child: Widget.Box({
|
||||
child: Widget.Label({
|
||||
label: battery.bind('percent').transform(p => ['', '', '', '', ''][Math.floor(p / 20)]),
|
||||
class_name: 'lockscreen-battery',
|
||||
hexpand: false,
|
||||
setup: icon => icon.hook(battery, () => {
|
||||
icon.toggleClassName('lockscreen-charging', battery.charging);
|
||||
icon.toggleClassName('lockscreen-charged', battery.charged);
|
||||
icon.toggleClassName('lockscreen-low', battery.percent < 30);
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
onHover: () => {
|
||||
batPercent.reveal_child = true;
|
||||
print("revealed");
|
||||
},
|
||||
onHoverLost: () => {
|
||||
batPercent.reveal_child = false;
|
||||
}
|
||||
})
|
||||
]
|
||||
})
|
||||
|
||||
const networkName = Widget.Revealer({
|
||||
revealChild: false,
|
||||
transitionDuration: 600,
|
||||
transition: 'slide_left',
|
||||
child: Widget.Label({
|
||||
name: "lockscreen-revealer",
|
||||
label: network.wifi.bind('ssid')
|
||||
.as(ssid => ssid || 'Unknown'),
|
||||
}),
|
||||
})
|
||||
|
||||
const networkStatus = Widget.Box({
|
||||
class_name: "lockscreen-smolbox",
|
||||
hexpand: false,
|
||||
hpack: 'end',
|
||||
children: [
|
||||
networkName,
|
||||
Widget.EventBox({
|
||||
child: Widget.Stack({
|
||||
class_name: "lockscreen-network",
|
||||
children: {
|
||||
'wifi': WifiIndicator(),
|
||||
'wired': WiredIndicator()
|
||||
},
|
||||
shown: network.bind('primary').transform(p => p || 'wifi'),
|
||||
}),
|
||||
onHover: () => {
|
||||
networkName.reveal_child = true;
|
||||
},
|
||||
onHoverLost: () => {
|
||||
networkName.reveal_child = false;
|
||||
}
|
||||
})
|
||||
]
|
||||
})
|
||||
|
||||
const boxRight = Widget.Box({
|
||||
homogeneous: false,
|
||||
name: "lockscreen-boxRight",
|
||||
vertical: true,
|
||||
hexpand: false,
|
||||
children: [networkStatus, batInfo],
|
||||
vpack: 'end',
|
||||
hpack: 'end',
|
||||
})
|
||||
|
||||
const boxLeft = Widget.Box({
|
||||
homogeneous: false,
|
||||
vertical: true,
|
||||
children: [time, date],
|
||||
vpack: 'end',
|
||||
hpack: 'start',
|
||||
})
|
||||
|
||||
return Widget.Box({
|
||||
children: [boxLeft, boxRight],
|
||||
vertical: false,
|
||||
})
|
||||
}
|
||||
|
||||
function randomImage() {
|
||||
const a = Utils.exec(`bash -c "ls ${App.configDir + '/modules/lock/images/'} | shuf -n 1"`);
|
||||
const b = `background-image: url("${App.configDir + '/modules/lock/images/' + a}");`;
|
||||
print(b);
|
||||
return b;
|
||||
|
||||
}
|
||||
|
||||
export default () => Widget.Window({
|
||||
name: 'lockscreen',
|
||||
css: randomImage(),
|
||||
anchor: ['top', 'left', 'right', 'bottom'],
|
||||
exclusivity: 'normal',
|
||||
keymode: 'on-demand',
|
||||
layer: 'top',
|
||||
visible: false,
|
||||
monitor: 0,
|
||||
child: Lockscreen(),
|
||||
})
|
BIN
.config/ags/old/modules/lock/images/astronautart.png
Normal file
After Width: | Height: | Size: 818 KiB |
BIN
.config/ags/old/modules/lock/images/cityevening.png
Normal file
After Width: | Height: | Size: 2.8 MiB |
BIN
.config/ags/old/modules/lock/images/dark-sand.jpg
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
.config/ags/old/modules/lock/images/something.png
Normal file
After Width: | Height: | Size: 5.2 MiB |
BIN
.config/ags/old/modules/lock/images/space.png
Normal file
After Width: | Height: | Size: 2.3 MiB |
139
.config/ags/old/modules/notifications/Notification.js
Normal file
|
@ -0,0 +1,139 @@
|
|||
import GLib from "gi://GLib"
|
||||
import icons from "../../lib/icons.js"
|
||||
|
||||
const time = (time, format = "%H:%M") => GLib.DateTime
|
||||
.new_from_unix_local(time)
|
||||
.format(format)
|
||||
|
||||
const NotificationIcon = ({ app_entry, app_icon, image }) => {
|
||||
if (image) {
|
||||
return Widget.Box({
|
||||
vpack: "start",
|
||||
hexpand: false,
|
||||
class_name: "icon img",
|
||||
css: `
|
||||
background-image: url("${image}");
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
min-width: 78px;
|
||||
min-height: 78px;
|
||||
`,
|
||||
})
|
||||
}
|
||||
|
||||
let icon = icons.fallback.notification
|
||||
if (Utils.lookUpIcon(app_icon))
|
||||
icon = app_icon
|
||||
|
||||
if (Utils.lookUpIcon(app_entry || ""))
|
||||
icon = app_entry || ""
|
||||
|
||||
return Widget.Box({
|
||||
vpack: "start",
|
||||
hexpand: false,
|
||||
class_name: "icon",
|
||||
css: `
|
||||
min-width: 78px;
|
||||
min-height: 78px;
|
||||
`,
|
||||
child: Widget.Icon({
|
||||
icon,
|
||||
size: 58,
|
||||
hpack: "center", hexpand: true,
|
||||
vpack: "center", vexpand: true,
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
export default (notification) => {
|
||||
const content = Widget.Box({
|
||||
class_name: "content",
|
||||
children: [
|
||||
NotificationIcon(notification),
|
||||
Widget.Box({
|
||||
hexpand: true,
|
||||
vertical: true,
|
||||
children: [
|
||||
Widget.Box({
|
||||
children: [
|
||||
Widget.Label({
|
||||
class_name: "title",
|
||||
xalign: 0,
|
||||
justification: "left",
|
||||
hexpand: true,
|
||||
max_width_chars: 24,
|
||||
truncate: "end",
|
||||
wrap: true,
|
||||
label: notification.summary.trim(),
|
||||
use_markup: true,
|
||||
}),
|
||||
Widget.Label({
|
||||
class_name: "time",
|
||||
vpack: "start",
|
||||
label: time(notification.time),
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "close-button",
|
||||
vpack: "start",
|
||||
hexpand: false,
|
||||
vexpand: false,
|
||||
child: Widget.Icon("window-close-symbolic"),
|
||||
on_clicked: notification.close,
|
||||
}),
|
||||
],
|
||||
}),
|
||||
Widget.Label({
|
||||
class_name: "description",
|
||||
hexpand: true,
|
||||
use_markup: true,
|
||||
xalign: 0,
|
||||
justification: "left",
|
||||
label: notification.body.trim(),
|
||||
max_width_chars: 24,
|
||||
wrap: true,
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
||||
const actionsbox = notification.actions.length > 0 ? Widget.Revealer({
|
||||
transition: "slide_down",
|
||||
child: Widget.EventBox({
|
||||
child: Widget.Box({
|
||||
class_name: "actions horizontal",
|
||||
children: notification.actions.map(action => Widget.Button({
|
||||
class_name: "action-button",
|
||||
on_clicked: () => notification.invoke(action.id),
|
||||
hexpand: true,
|
||||
child: Widget.Label(action.label),
|
||||
})),
|
||||
}),
|
||||
}),
|
||||
}) : null
|
||||
|
||||
const eventbox = Widget.EventBox({
|
||||
vexpand: false,
|
||||
on_primary_click: notification.dismiss,
|
||||
on_hover() {
|
||||
if (actionsbox)
|
||||
actionsbox.reveal_child = true
|
||||
},
|
||||
on_hover_lost() {
|
||||
if (actionsbox)
|
||||
actionsbox.reveal_child = true
|
||||
|
||||
notification.dismiss()
|
||||
},
|
||||
child: Widget.Box({
|
||||
vertical: true,
|
||||
children: actionsbox ? [content, actionsbox] : [content],
|
||||
}),
|
||||
})
|
||||
|
||||
return Widget.Box({
|
||||
class_name: `notification ${notification.urgency}`,
|
||||
child: eventbox,
|
||||
})
|
||||
}
|
95
.config/ags/old/modules/notifications/NotificationPopups.js
Normal file
|
@ -0,0 +1,95 @@
|
|||
import Notification from "./Notification.js"
|
||||
import options from "../../options.js"
|
||||
|
||||
const notifications = await Service.import("notifications")
|
||||
const { transitionDuration } = options
|
||||
const { position, blacklist } = options.notifications
|
||||
const { timeout, idle } = Utils
|
||||
|
||||
function Animated(id) {
|
||||
const n = notifications.getNotification(id)
|
||||
const widget = Notification(n)
|
||||
|
||||
const inner = Widget.Revealer({
|
||||
css: "border: 1px solid magenta;",
|
||||
transition: "slide_left",
|
||||
transition_duration: transitionDuration,
|
||||
child: widget,
|
||||
})
|
||||
|
||||
const outer = Widget.Revealer({
|
||||
css: "border: 1px solid yellow;",
|
||||
transition: "slide_down",
|
||||
transition_duration: transitionDuration,
|
||||
child: inner,
|
||||
})
|
||||
|
||||
const box = Widget.Box({
|
||||
hpack: "end",
|
||||
child: outer,
|
||||
})
|
||||
|
||||
idle(() => {
|
||||
outer.reveal_child = true
|
||||
timeout(transitionDuration, () => {
|
||||
inner.reveal_child = true
|
||||
})
|
||||
})
|
||||
|
||||
return Object.assign(box, {
|
||||
dismiss() {
|
||||
inner.reveal_child = false
|
||||
timeout(transitionDuration, () => {
|
||||
outer.reveal_child = false
|
||||
timeout(transitionDuration, () => {
|
||||
box.destroy()
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
function PopupList() {
|
||||
const map = new Map
|
||||
const box = Widget.Box({
|
||||
hpack: "end",
|
||||
vertical: true,
|
||||
css: `min-width: ${options.notifications.width}px;`,
|
||||
})
|
||||
|
||||
function remove(_, id) {
|
||||
map.get(id)?.dismiss()
|
||||
map.delete(id)
|
||||
}
|
||||
|
||||
return box
|
||||
.hook(notifications, (_, id) => {
|
||||
if (id !== undefined) {
|
||||
if (map.has(id))
|
||||
remove(null, id)
|
||||
|
||||
if (blacklist.includes(notifications.getNotification(id).app_name))
|
||||
return
|
||||
|
||||
if (notifications.dnd)
|
||||
return
|
||||
|
||||
const w = Animated(id)
|
||||
map.set(id, w)
|
||||
box.children = [w, ...box.children]
|
||||
}
|
||||
}, "notified")
|
||||
.hook(notifications, remove, "dismissed")
|
||||
.hook(notifications, remove, "closed")
|
||||
}
|
||||
|
||||
export default (monitor) => Widget.Window({
|
||||
monitor,
|
||||
name: `notifications${monitor}`,
|
||||
anchor: position,
|
||||
class_name: "notifications",
|
||||
child: Widget.Box({
|
||||
css: "padding: 2px;",
|
||||
child: PopupList(),
|
||||
}),
|
||||
})
|
111
.config/ags/old/modules/osd/OSD.js
Normal file
|
@ -0,0 +1,111 @@
|
|||
import { icon } from "../../lib/utils.js"
|
||||
import icons from "../../lib/icons.js"
|
||||
import Progress from "./Progress.js"
|
||||
import brightness from "../../services/brightness.js"
|
||||
import options from "../../options.js"
|
||||
|
||||
const audio = await Service.import("audio")
|
||||
const { progress, microphone } = options.osd
|
||||
|
||||
const DELAY = 2500
|
||||
|
||||
function OnScreenProgress(vertical) {
|
||||
const indicator = Widget.Icon({
|
||||
size: 42,
|
||||
vpack: "start",
|
||||
})
|
||||
const progress = Progress({
|
||||
vertical,
|
||||
width: vertical ? 42 : 300,
|
||||
height: vertical ? 300 : 42,
|
||||
child: indicator,
|
||||
})
|
||||
|
||||
const revealer = Widget.Revealer({
|
||||
transition: "slide_left",
|
||||
child: progress,
|
||||
})
|
||||
|
||||
let count = 0
|
||||
function show(value, icon) {
|
||||
revealer.reveal_child = true
|
||||
indicator.icon = icon
|
||||
progress.setValue(value)
|
||||
count++
|
||||
Utils.timeout(DELAY, () => {
|
||||
count--
|
||||
|
||||
if (count === 0)
|
||||
revealer.reveal_child = false
|
||||
})
|
||||
}
|
||||
|
||||
return revealer
|
||||
.hook(brightness, () => show(
|
||||
brightness.screen,
|
||||
icons.brightness.screen,
|
||||
), "notify::screen")
|
||||
.hook(brightness, () => show(
|
||||
brightness.kbd,
|
||||
icons.brightness.keyboard,
|
||||
), "notify::kbd")
|
||||
.hook(audio.speaker, () => show(
|
||||
audio.speaker.volume,
|
||||
icon(audio.speaker.icon_name || "", icons.audio.type.speaker),
|
||||
), "notify::volume")
|
||||
}
|
||||
|
||||
function MicrophoneMute() {
|
||||
const icon = Widget.Icon({
|
||||
class_name: "microphone",
|
||||
})
|
||||
|
||||
const revealer = Widget.Revealer({
|
||||
transition: "slide_up",
|
||||
child: icon,
|
||||
})
|
||||
|
||||
let count = 0
|
||||
let mute = audio.microphone.stream?.is_muted ?? false
|
||||
|
||||
return revealer.hook(audio.microphone, () => Utils.idle(() => {
|
||||
if (mute !== audio.microphone.stream?.is_muted) {
|
||||
mute = audio.microphone.stream.is_muted
|
||||
icon.icon = icons.audio.mic[mute ? "muted" : "high"]
|
||||
revealer.reveal_child = true
|
||||
count++
|
||||
|
||||
Utils.timeout(DELAY, () => {
|
||||
count--
|
||||
if (count === 0)
|
||||
revealer.reveal_child = false
|
||||
})
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
export default (monitor) => Widget.Window({
|
||||
monitor,
|
||||
name: `indicator${monitor}`,
|
||||
class_name: "indicator",
|
||||
layer: "overlay",
|
||||
click_through: true,
|
||||
anchor: ["right", "left", "top", "bottom"],
|
||||
child: Widget.Box({
|
||||
css: "padding: 2px;",
|
||||
expand: true,
|
||||
child: Widget.Overlay(
|
||||
{ child: Widget.Box({ expand: true }) },
|
||||
Widget.Box({
|
||||
hpack: progress.pack.h,
|
||||
vpack: progress.pack.v,
|
||||
child: OnScreenProgress(progress.vertical),
|
||||
}),
|
||||
Widget.Box({
|
||||
hpack: microphone.pack.h,
|
||||
vpack: microphone.pack.v,
|
||||
child: MicrophoneMute(),
|
||||
}),
|
||||
),
|
||||
}),
|
||||
})
|
66
.config/ags/old/modules/osd/Progress.js
Normal file
|
@ -0,0 +1,66 @@
|
|||
import GLib from "gi://GLib?version=2.0"
|
||||
import { range } from "../../lib/utils.js"
|
||||
import options from "../../options.js"
|
||||
|
||||
export default ({
|
||||
height = 18,
|
||||
width = 180,
|
||||
vertical = false,
|
||||
child,
|
||||
}) => {
|
||||
const fill = Widget.Box({
|
||||
class_name: "fill",
|
||||
hexpand: vertical,
|
||||
vexpand: !vertical,
|
||||
hpack: vertical ? "fill" : "start",
|
||||
vpack: vertical ? "end" : "fill",
|
||||
child,
|
||||
})
|
||||
|
||||
const container = Widget.Box({
|
||||
class_name: "progress",
|
||||
child: fill,
|
||||
css: `
|
||||
min-width: ${width}px;
|
||||
min-height: ${height}px;
|
||||
`,
|
||||
})
|
||||
|
||||
let fill_size = 0
|
||||
let animations = []
|
||||
|
||||
return Object.assign(container, {
|
||||
setValue(value) {
|
||||
if (value < 0)
|
||||
return
|
||||
|
||||
if (animations.length > 0) {
|
||||
for (const id of animations)
|
||||
GLib.source_remove(id)
|
||||
|
||||
animations = []
|
||||
}
|
||||
|
||||
const axis = vertical ? "height" : "width"
|
||||
const axisv = vertical ? height : width
|
||||
const min = vertical ? width : height
|
||||
const preferred = (axisv - min) * value + min
|
||||
|
||||
if (!fill_size) {
|
||||
fill_size = preferred
|
||||
fill.css = `min-${axis}: ${preferred}px;`
|
||||
return
|
||||
}
|
||||
|
||||
const frames = options.transition / 10
|
||||
const goal = preferred - fill_size
|
||||
const step = goal / frames
|
||||
|
||||
animations = range(frames, 0).map(i => Utils.timeout(5 * i, () => {
|
||||
fill_size += step
|
||||
fill.css = `min-${axis}: ${fill_size}px`
|
||||
animations.shift()
|
||||
}))
|
||||
},
|
||||
})
|
||||
}
|
43
.config/ags/old/modules/overview/Overview.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
import PopupWindow from "../PopupWindow.js"
|
||||
import Workspace from "./Workspace.js"
|
||||
import options from "../../options.js"
|
||||
import { range } from "../../lib/utils.js"
|
||||
|
||||
const hyprland = await Service.import("hyprland")
|
||||
|
||||
const Overview = (ws) => Widget.Box({
|
||||
class_name: "overview horizontal",
|
||||
// spacing: 10,
|
||||
children: ws > 0
|
||||
? range(ws).map(Workspace)
|
||||
: hyprland.workspaces
|
||||
.map(({ id }) => Workspace(id))
|
||||
.sort((a, b) => a.attribute.id - b.attribute.id),
|
||||
|
||||
setup: w => {
|
||||
if (ws > 0)
|
||||
return
|
||||
|
||||
w.hook(hyprland, (w, id) => {
|
||||
if (id === undefined)
|
||||
return
|
||||
|
||||
w.children = w.children
|
||||
.filter(ch => ch.attribute.id !== Number(id))
|
||||
}, "workspace-removed")
|
||||
w.hook(hyprland, (w, id) => {
|
||||
if (id === undefined)
|
||||
return
|
||||
|
||||
w.children = [...w.children, Workspace(Number(id))]
|
||||
.sort((a, b) => a.attribute.id - b.attribute.id)
|
||||
}, "workspace-added")
|
||||
},
|
||||
})
|
||||
|
||||
export default () => PopupWindow({
|
||||
name: "overview",
|
||||
layout: "center",
|
||||
transition: "slide_down",
|
||||
child: Overview(options.overview.workspaces),
|
||||
})
|
51
.config/ags/old/modules/overview/Window.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
import { createSurfaceFromWidget, icon } from "../../lib/utils.js"
|
||||
import Gdk from "gi://Gdk"
|
||||
import Gtk from "gi://Gtk?version=3.0"
|
||||
import options from "../../options.js"
|
||||
import icons from "../../lib/icons.js"
|
||||
|
||||
const monochrome = options.overview.monochromeIcon
|
||||
const TARGET = [Gtk.TargetEntry.new("text/plain", Gtk.TargetFlags.SAME_APP, 0)]
|
||||
const scale = (size) => (options.overview.scale / 100) * size
|
||||
const hyprland = await Service.import("hyprland")
|
||||
const apps = await Service.import("applications")
|
||||
const dispatch = (args) => hyprland.messageAsync(`dispatch ${args}`)
|
||||
|
||||
|
||||
const Icon = (m, c) => {
|
||||
const app = apps.list.find(app => app.match(c))
|
||||
if (!app)
|
||||
return icons.fallback.executable
|
||||
|
||||
return icon(
|
||||
app.icon_name + (m ? "-symbolic" : ""),
|
||||
icons.fallback.executable,
|
||||
)
|
||||
}
|
||||
|
||||
export default ({ address, size: [w, h], class: c, title }) => Widget.Button({
|
||||
class_name: "client",
|
||||
attribute: { address },
|
||||
tooltip_text: `${title}`,
|
||||
child: Widget.Icon({
|
||||
class_name: "overview-icon",
|
||||
css: `
|
||||
min-width: ${scale(w)}px;
|
||||
min-height: ${scale(h)}px;
|
||||
`,
|
||||
icon: Icon(monochrome, c),
|
||||
}),
|
||||
on_secondary_click: () => dispatch(`closewindow address:${address}`),
|
||||
on_clicked: () => {
|
||||
dispatch(`focuswindow address:${address}`)
|
||||
App.closeWindow("overview")
|
||||
},
|
||||
setup: btn => btn
|
||||
.on("drag-data-get", (_w, _c, data) => data.set_text(address, address.length))
|
||||
.on("drag-begin", (_, context) => {
|
||||
Gtk.drag_set_icon_surface(context, createSurfaceFromWidget(btn))
|
||||
btn.toggleClassName("hidden", true)
|
||||
})
|
||||
.on("drag-end", () => btn.toggleClassName("hidden", false))
|
||||
.drag_source_set(Gdk.ModifierType.BUTTON1_MASK, TARGET, Gdk.DragAction.COPY),
|
||||
})
|
59
.config/ags/old/modules/overview/Workspace.js
Normal file
|
@ -0,0 +1,59 @@
|
|||
import Window from "./Window.js"
|
||||
import Gdk from "gi://Gdk"
|
||||
import Gtk from "gi://Gtk?version=3.0"
|
||||
import options from "../../options.js"
|
||||
|
||||
const TARGET = [Gtk.TargetEntry.new("text/plain", Gtk.TargetFlags.SAME_APP, 0)]
|
||||
const scale = (size) => (options.overview.scale / 100) * size
|
||||
const hyprland = await Service.import("hyprland")
|
||||
|
||||
const dispatch = (args) => hyprland.messageAsync(`dispatch ${args}`)
|
||||
|
||||
const size = (id) => {
|
||||
const def = { h: 1080, w: 1920 }
|
||||
const ws = hyprland.getWorkspace(id)
|
||||
if (!ws)
|
||||
return def
|
||||
|
||||
const mon = hyprland.getMonitor(ws.monitorID)
|
||||
return mon ? { h: mon.height, w: mon.width } : def
|
||||
}
|
||||
|
||||
export default (id) => Widget.Box({
|
||||
attribute: { id },
|
||||
tooltipText: `${id}`,
|
||||
class_name: "workspace",
|
||||
vpack: "center",
|
||||
css: `
|
||||
min-width: ${scale(size(id).w)}px;
|
||||
min-height: ${scale(size(id).h)}px;
|
||||
`,
|
||||
setup: box => box.hook(hyprland, () => {
|
||||
box.toggleClassName("active", hyprland.active.workspace.id === id)
|
||||
}),
|
||||
child: Widget.EventBox({
|
||||
expand: true,
|
||||
on_primary_click: () => {
|
||||
App.closeWindow("overview")
|
||||
dispatch(`workspace ${id}`)
|
||||
},
|
||||
setup: eventbox => {
|
||||
eventbox.drag_dest_set(Gtk.DestDefaults.ALL, TARGET, Gdk.DragAction.COPY)
|
||||
eventbox.connect("drag-data-received", (_w, _c, _x, _y, data) => {
|
||||
const address = new TextDecoder().decode(data.get_data())
|
||||
dispatch(`movetoworkspacesilent ${id},address:${address}`)
|
||||
})
|
||||
},
|
||||
child: Widget.Fixed().hook(hyprland, fixed => {
|
||||
fixed.get_children().forEach(ch => ch.destroy())
|
||||
hyprland.clients
|
||||
.filter(({ workspace }) => workspace.id === id)
|
||||
.forEach(c => {
|
||||
const x = c.at[0] - (hyprland.getMonitor(c.monitor)?.x || 0)
|
||||
const y = c.at[1] - (hyprland.getMonitor(c.monitor)?.y || 0)
|
||||
c.mapped && fixed.put(Window(c), scale(x), scale(y))
|
||||
})
|
||||
fixed.show_all()
|
||||
}, "notify::clients"),
|
||||
}),
|
||||
})
|
144
.config/ags/old/modules/powermenu/Powermenu.js
Normal file
|
@ -0,0 +1,144 @@
|
|||
// import Gtk from 'gi://Gtk';
|
||||
import { uptime } from '../../lib/variables.js';
|
||||
import powermenu from '../../services/powermenu.js';
|
||||
import PopupWindow from "../PopupWindow.js";
|
||||
|
||||
const options = [
|
||||
{
|
||||
label: "lock",
|
||||
icon: ""
|
||||
},
|
||||
{
|
||||
label: "sleep",
|
||||
icon: ""
|
||||
},
|
||||
{
|
||||
label: "logout",
|
||||
icon: ""
|
||||
},
|
||||
{
|
||||
label: "shutdown",
|
||||
icon: ""
|
||||
},
|
||||
{
|
||||
label: "reboot",
|
||||
icon: ""
|
||||
}
|
||||
];
|
||||
|
||||
function buttonCreator(option, flag = 'none') {
|
||||
const but = Widget.Button({
|
||||
className: 'powermenu-buttonBox',
|
||||
child: Widget.Box({
|
||||
child: Widget.Label({
|
||||
className: 'powermenu-buttonLabel',
|
||||
label: option['icon'],
|
||||
}),
|
||||
}),
|
||||
onClicked: () => powermenu.action(option['label']),//Utils.execAsync(option['cmd']),
|
||||
})
|
||||
if (flag == 'first') {
|
||||
but.toggleClassName('powermenu-buttonBoxFirst', true);
|
||||
} else if (flag == 'last') {
|
||||
but.toggleClassName('powermenu-buttonBoxLast', true);
|
||||
}
|
||||
|
||||
return but;
|
||||
}
|
||||
|
||||
const Powermenu = () => {
|
||||
|
||||
let powerbutton = Widget.Box({
|
||||
hpack: 'start',
|
||||
vpack: 'start',
|
||||
className: 'powermenu-powerbutton',
|
||||
child: Widget.Label({
|
||||
label: "",
|
||||
hpack: 'start',
|
||||
}),
|
||||
})
|
||||
|
||||
const topBox = Widget.Box({
|
||||
vertical: false,
|
||||
homogeneous: false,
|
||||
name: "powermenu-topbox",
|
||||
css: `background-image: url('${App.configDir + '/modules/powermenu/imag2.png'}'); background-position: center;`,
|
||||
spacing: 0,
|
||||
children: [
|
||||
Widget.EventBox({
|
||||
vexpand: false,
|
||||
vpack: 'start',
|
||||
child: powerbutton,
|
||||
onPrimaryClick: () => {
|
||||
App.toggleWindow('powermenu');
|
||||
}
|
||||
}),
|
||||
Widget.Box({
|
||||
hpack: 'start',
|
||||
vpack: 'start',
|
||||
className: 'powermenu-username',
|
||||
child: Widget.Label({
|
||||
hpack: 'start',
|
||||
label: `${Utils.exec('whoami')}`
|
||||
})
|
||||
})
|
||||
]
|
||||
})
|
||||
|
||||
const midBox = Widget.Box({
|
||||
hpack: 'fill',
|
||||
className: 'powermenu-midbox',
|
||||
child: Widget.Label({
|
||||
label: uptime.bind().as(value => 'Uptime : ' + Math.floor(value / 60) + ' hours ' + Math.floor(value % 60) + ' minutes'),
|
||||
setup: self => self.hook(uptime, () => {
|
||||
self.label = uptime.value.toString();
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
let bottomBox = Widget.Box({
|
||||
vertical: false,
|
||||
homogeneous: false,
|
||||
name: 'powermenu-bottombox',
|
||||
spacing: 20,
|
||||
children: [
|
||||
buttonCreator(options[0], 'first'),
|
||||
buttonCreator(options[1]),
|
||||
buttonCreator(options[2]),
|
||||
buttonCreator(options[3]),
|
||||
buttonCreator(options[4], 'last'),
|
||||
],
|
||||
})
|
||||
|
||||
let motherBox = Widget.Box({
|
||||
homogeneous: false,
|
||||
vertical: true,
|
||||
name: 'powermenu-motherbox',
|
||||
// hexpand: true,
|
||||
// vexpand: false,
|
||||
hpack: 'center',
|
||||
vpack: 'center',
|
||||
children: [topBox, midBox, bottomBox],
|
||||
})
|
||||
|
||||
return motherBox;
|
||||
}
|
||||
|
||||
export default () => PopupWindow({
|
||||
name: 'powermenu',
|
||||
transition: "slide_down",
|
||||
child: Powermenu(),
|
||||
})
|
||||
|
||||
|
||||
// export default () => Widget.Window({
|
||||
// name: 'powermenu',
|
||||
// anchor: ['top', 'left', 'right', 'bottom'],
|
||||
// exclusivity: 'normal',
|
||||
// keymode: 'exclusive',
|
||||
// layer: 'top',
|
||||
// popup: true,
|
||||
// // monitor: 0,
|
||||
// visible: false,
|
||||
// child: Powermenu(),
|
||||
// })
|
70
.config/ags/old/modules/powermenu/Verification.js
Normal file
|
@ -0,0 +1,70 @@
|
|||
|
||||
import PopupWindow from '../PopupWindow.js';
|
||||
import powermenu from '../../services/powermenu.js';
|
||||
|
||||
export default () => PopupWindow({
|
||||
name: "verification",
|
||||
transition: "crossfade",
|
||||
layout: 'center',
|
||||
child: Widget.Box({
|
||||
class_name: "verification",
|
||||
vertical: true,
|
||||
homogeneous: false,
|
||||
children: [
|
||||
Widget.Box({
|
||||
class_name: "verification-label",
|
||||
vertical: true,
|
||||
children: [
|
||||
Widget.Label({
|
||||
class_name: "desc",
|
||||
label: powermenu.bind("title"),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
Widget.Box({
|
||||
vexpand: true,
|
||||
vpack: "end",
|
||||
spacing: 20,
|
||||
homogeneous: false,
|
||||
children: [
|
||||
Widget.Button({
|
||||
class_name: "verification-buttonBox verification-buttonBoxFirst",
|
||||
child: Widget.Label({
|
||||
label: "No",
|
||||
hpack: "center",
|
||||
vpack: "center",
|
||||
}),
|
||||
on_clicked: () => App.toggleWindow("verification"),
|
||||
setup: self => self.hook(App, (_, name, visible) => {
|
||||
if (name === "verification" && visible)
|
||||
self.grab_focus()
|
||||
}),
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "verification-buttonBox verification-buttonBoxLast",
|
||||
child: Widget.Label({
|
||||
label: "Yes",
|
||||
hpack: "center",
|
||||
vpack: "center",
|
||||
}),
|
||||
on_clicked: () => Utils.exec(powermenu.cmd),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
})
|
||||
|
||||
|
||||
// export default () => Widget.Window({
|
||||
// name: 'verification',
|
||||
// // transition: 'crossfade',
|
||||
// anchor: ['top', 'left', 'right', 'bottom'],
|
||||
// exclusivity: 'normal',
|
||||
// keymode: 'exclusive',
|
||||
// layer: 'top',
|
||||
// popup: true,
|
||||
// // monitor: 0,
|
||||
// visible: false,
|
||||
// child: Verification(),
|
||||
// })
|
BIN
.config/ags/old/modules/powermenu/imag2.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
.config/ags/old/modules/powermenu/image.png
Normal file
After Width: | Height: | Size: 884 KiB |
117
.config/ags/old/modules/quicksettings/NotificationColumn.js
Normal file
|
@ -0,0 +1,117 @@
|
|||
import Notification from "../notifications/Notification.js"
|
||||
import options from "../../options.js"
|
||||
import icons from "../../lib/icons.js"
|
||||
|
||||
const notifications = await Service.import("notifications")
|
||||
const notifs = notifications.bind("notifications")
|
||||
|
||||
const Animated = (n) => Widget.Revealer({
|
||||
transition_duration: options.transition,
|
||||
transition: "slide_down",
|
||||
child: Notification(n),
|
||||
setup: self => Utils.timeout(options.transition, () => {
|
||||
if (!self.is_destroyed)
|
||||
self.reveal_child = true
|
||||
}),
|
||||
})
|
||||
|
||||
const ClearButton = () => Widget.Button({
|
||||
on_clicked: notifications.clear,
|
||||
sensitive: notifs.as(n => n.length > 0),
|
||||
child: Widget.Box({
|
||||
children: [
|
||||
Widget.Label("Clear "),
|
||||
Widget.Icon({
|
||||
icon: notifs.as(n => icons.trash[n.length > 0 ? "full" : "empty"]),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
})
|
||||
|
||||
const Header = () => Widget.Box({
|
||||
class_name: "header",
|
||||
children: [
|
||||
Widget.Label({ label: "Notifications", hexpand: true, xalign: 0 }),
|
||||
ClearButton(),
|
||||
],
|
||||
})
|
||||
|
||||
const NotificationList = () => {
|
||||
const map = new Map
|
||||
const box = Widget.Box({
|
||||
vertical: true,
|
||||
children: notifications.notifications.map(n => {
|
||||
const w = Animated(n)
|
||||
map.set(n.id, w)
|
||||
return w
|
||||
}),
|
||||
visible: notifs.as(n => n.length > 0),
|
||||
})
|
||||
|
||||
function remove(_, id) {
|
||||
const n = map.get(id)
|
||||
if (n) {
|
||||
n.reveal_child = false
|
||||
Utils.timeout(options.transition, () => {
|
||||
n.destroy()
|
||||
map.delete(id)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return box
|
||||
.hook(notifications, remove, "closed")
|
||||
.hook(notifications, (_, id) => {
|
||||
if (id !== undefined) {
|
||||
if (map.has(id))
|
||||
remove(null, id)
|
||||
|
||||
const n = notifications.getNotification(id)
|
||||
const w = Animated(n)
|
||||
map.set(id, w)
|
||||
box.children = [w, ...box.children]
|
||||
}
|
||||
}, "notified")
|
||||
}
|
||||
|
||||
const Placeholder = () => Widget.Box({
|
||||
class_name: "placeholder",
|
||||
vertical: true,
|
||||
vpack: "center",
|
||||
hpack: "center",
|
||||
vexpand: true,
|
||||
hexpand: true,
|
||||
visible: notifs.as(n => n.length === 0),
|
||||
children: [
|
||||
Widget.Icon(icons.notifications.silent),
|
||||
Widget.Label("Your inbox is empty"),
|
||||
],
|
||||
})
|
||||
|
||||
export default () => Widget.Box({
|
||||
class_name: "notifications",
|
||||
css: `min-width: ${options.notifications.width}px`,
|
||||
// vpack: "fill",
|
||||
vexpand: true,
|
||||
vertical: true,
|
||||
children: [
|
||||
Header(),
|
||||
Widget.Scrollable({
|
||||
vexpand: true,
|
||||
// vpack: "fill",
|
||||
hscroll: "never",
|
||||
class_name: "notification-scrollable",
|
||||
child: Widget.Box({
|
||||
class_name: "notification-list vertical",
|
||||
vertical: true,
|
||||
vexpand: true,
|
||||
// vpack: "fill",
|
||||
// vexpand: true,
|
||||
children: [
|
||||
NotificationList(),
|
||||
Placeholder(),
|
||||
],
|
||||
}),
|
||||
}),
|
||||
],
|
||||
})
|
87
.config/ags/old/modules/quicksettings/QuickSettings.js
Normal file
|
@ -0,0 +1,87 @@
|
|||
import { ProfileSelector, ProfileToggle } from "./widgets/AsusProfile.js"
|
||||
// import { Header } from "./widgets/Header.js"
|
||||
import { Volume, Microhone, SinkSelector, AppMixer } from "./widgets/Volume.js"
|
||||
import { Brightness } from "./widgets/Brightness.js"
|
||||
import { NetworkToggle, WifiSelection } from "./widgets/Network.js"
|
||||
import { BluetoothToggle, BluetoothDevices } from "./widgets/Bluetooth.js"
|
||||
import { DND } from "./widgets/DND.js"
|
||||
// import { DarkModeToggle } from "./widgets/DarkMode.js"
|
||||
import { MicMute } from "./widgets/MicMute.js"
|
||||
import { Media } from "./widgets/Media.js"
|
||||
import PopupWindow from "../PopupWindow.js"
|
||||
import NotificationColumn from "./NotificationColumn.js"
|
||||
import options from "../../options.js"
|
||||
|
||||
const { bar, quicksettings } = options
|
||||
const media = (await Service.import("mpris")).bind("players")
|
||||
const layout = `${quicksettings.position}`
|
||||
|
||||
|
||||
const Row = (
|
||||
toggles = [],
|
||||
menus = [],
|
||||
) => Widget.Box({
|
||||
vertical: true,
|
||||
children: [
|
||||
Widget.Box({
|
||||
homogeneous: true,
|
||||
class_name: "row horizontal",
|
||||
children: toggles.map(w => w()),
|
||||
}),
|
||||
...menus.map(w => w()),
|
||||
],
|
||||
})
|
||||
|
||||
const Settings = () => Widget.Box({
|
||||
vertical: true,
|
||||
vexpand: true,
|
||||
vpack: "fill",
|
||||
class_name: "quicksettings vertical",
|
||||
css: `min-width: ${quicksettings.width}px;`,
|
||||
children: [
|
||||
// Header(),
|
||||
Widget.Box({
|
||||
class_name: "sliders-box vertical",
|
||||
vertical: true,
|
||||
children: [
|
||||
Row(
|
||||
[Volume],
|
||||
[SinkSelector, AppMixer],
|
||||
),
|
||||
Microhone(),
|
||||
Brightness(),
|
||||
],
|
||||
}),
|
||||
Row(
|
||||
[NetworkToggle, BluetoothToggle],
|
||||
[WifiSelection, BluetoothDevices],
|
||||
),
|
||||
Row(
|
||||
[ProfileToggle],
|
||||
[ProfileSelector],
|
||||
),
|
||||
Row([MicMute, DND]),
|
||||
Widget.Box({
|
||||
visible: media.as(l => l.length > 0),
|
||||
child: Media(),
|
||||
}),
|
||||
NotificationColumn(),
|
||||
],
|
||||
})
|
||||
|
||||
const QuickSettings = () => PopupWindow({
|
||||
name: "quicksettings",
|
||||
transition: "slide_left", //bar.position === "top" ? "slide_down" : "slide_up",
|
||||
// anchor: ["right", "top"],
|
||||
keymode: 'on-demand',
|
||||
layout: layout,
|
||||
child: Settings(),
|
||||
vpack: "fill",
|
||||
// hpack: "fill",
|
||||
vexpand: true,
|
||||
// hexpand: true,
|
||||
})
|
||||
|
||||
export function setupQuickSettings() {
|
||||
App.addWindow(QuickSettings())
|
||||
}
|
129
.config/ags/old/modules/quicksettings/ToggleButton.js
Normal file
|
@ -0,0 +1,129 @@
|
|||
import icons from "../../lib/icons.js"
|
||||
|
||||
export const opened = Variable("")
|
||||
App.connect("window-toggled", (_, name, visible) => {
|
||||
if (name === "quicksettings" && !visible)
|
||||
Utils.timeout(500, () => opened.value = "")
|
||||
})
|
||||
|
||||
export const Arrow = (name, activate) => {
|
||||
let deg = 0
|
||||
let iconOpened = false
|
||||
const icon = Widget.Icon(icons.ui.arrow.right).hook(opened, () => {
|
||||
if (opened.value === name && !iconOpened || opened.value !== name && iconOpened) {
|
||||
const step = opened.value === name ? 10 : -10
|
||||
iconOpened = !iconOpened
|
||||
for (let i = 0; i < 9; ++i) {
|
||||
Utils.timeout(15 * i, () => {
|
||||
deg += step
|
||||
icon.setCss(`-gtk-icon-transform: rotate(${deg}deg);`)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return Widget.Button({
|
||||
child: icon,
|
||||
class_name: "arrow",
|
||||
on_clicked: () => {
|
||||
opened.value = opened.value === name ? "" : name
|
||||
if (typeof activate === "function")
|
||||
activate()
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export const ArrowToggleButton = ({
|
||||
name,
|
||||
icon,
|
||||
label,
|
||||
activate,
|
||||
deactivate,
|
||||
activateOnArrow = true,
|
||||
connection: [service, condition],
|
||||
}) => Widget.Box({
|
||||
class_name: "toggle-button",
|
||||
setup: self => self.hook(service, () => {
|
||||
self.toggleClassName("active", condition())
|
||||
}),
|
||||
children: [
|
||||
Widget.Button({
|
||||
child: Widget.Box({
|
||||
hexpand: true,
|
||||
children: [
|
||||
Widget.Icon({
|
||||
class_name: "icon",
|
||||
icon,
|
||||
}),
|
||||
Widget.Label({
|
||||
class_name: "label",
|
||||
max_width_chars: 10,
|
||||
truncate: "end",
|
||||
label,
|
||||
}),
|
||||
],
|
||||
}),
|
||||
on_clicked: () => {
|
||||
if (condition()) {
|
||||
deactivate()
|
||||
if (opened.value === name)
|
||||
opened.value = ""
|
||||
} else {
|
||||
activate()
|
||||
}
|
||||
},
|
||||
}),
|
||||
Arrow(name, activateOnArrow && activate),
|
||||
],
|
||||
})
|
||||
|
||||
export const Menu = ({ name, icon, title, content }) => Widget.Revealer({
|
||||
transition: "slide_down",
|
||||
reveal_child: opened.bind().as(v => v === name),
|
||||
child: Widget.Box({
|
||||
class_names: ["menu", name],
|
||||
vertical: true,
|
||||
children: [
|
||||
Widget.Box({
|
||||
class_name: "title-box",
|
||||
children: [
|
||||
Widget.Icon({
|
||||
class_name: "icon",
|
||||
icon,
|
||||
}),
|
||||
Widget.Label({
|
||||
class_name: "title",
|
||||
truncate: "end",
|
||||
label: title,
|
||||
}),
|
||||
],
|
||||
}),
|
||||
Widget.Separator(),
|
||||
Widget.Box({
|
||||
vertical: true,
|
||||
class_name: "content vertical",
|
||||
children: content,
|
||||
}),
|
||||
],
|
||||
}),
|
||||
})
|
||||
|
||||
export const SimpleToggleButton = ({
|
||||
icon,
|
||||
label,
|
||||
toggle,
|
||||
connection: [service, condition],
|
||||
}) => Widget.Button({
|
||||
on_clicked: toggle,
|
||||
class_name: "simple-toggle",
|
||||
setup: self => self.hook(service, () => {
|
||||
self.toggleClassName("active", condition())
|
||||
}),
|
||||
child: Widget.Box([
|
||||
Widget.Icon({ icon }),
|
||||
Widget.Label({
|
||||
max_width_chars: 10,
|
||||
truncate: "end",
|
||||
label,
|
||||
}),
|
||||
]),
|
||||
})
|
51
.config/ags/old/modules/quicksettings/widgets/AsusProfile.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
import { ArrowToggleButton, Menu } from "../ToggleButton.js"
|
||||
import icons from "../../../lib/icons.js"
|
||||
import asusctl from "../../../services/asusctl.js"
|
||||
|
||||
const profile = asusctl.bind("profile")
|
||||
|
||||
export const ProfileToggle = () => ArrowToggleButton({
|
||||
name: "asusctl-profile",
|
||||
icon: profile.as(p => icons.asusctl.profile[p]),
|
||||
label: profile,
|
||||
connection: [asusctl, () => asusctl.profile !== "Balanced"],
|
||||
activate: () => asusctl.setProfile("Quiet"),
|
||||
deactivate: () => asusctl.setProfile("Balanced"),
|
||||
activateOnArrow: false,
|
||||
})
|
||||
|
||||
export const ProfileSelector = () => Menu({
|
||||
name: "asusctl-profile",
|
||||
icon: profile.as(p => icons.asusctl.profile[p]),
|
||||
title: "Profile Selector",
|
||||
content: [
|
||||
Widget.Box({
|
||||
vertical: true,
|
||||
hexpand: true,
|
||||
children: [
|
||||
Widget.Box({
|
||||
vertical: true,
|
||||
children: asusctl.profiles.map(prof => Widget.Button({
|
||||
on_clicked: () => asusctl.setProfile(prof),
|
||||
child: Widget.Box({
|
||||
children: [
|
||||
Widget.Icon(icons.asusctl.profile[prof]),
|
||||
Widget.Label(prof),
|
||||
],
|
||||
}),
|
||||
})),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
Widget.Separator(),
|
||||
Widget.Button({
|
||||
on_clicked: () => Utils.execAsync("rog-control-center"),
|
||||
child: Widget.Box({
|
||||
children: [
|
||||
Widget.Icon(icons.ui.settings),
|
||||
Widget.Label("Rog Control Center"),
|
||||
],
|
||||
}),
|
||||
}),
|
||||
],
|
||||
})
|
62
.config/ags/old/modules/quicksettings/widgets/Bluetooth.js
Normal file
|
@ -0,0 +1,62 @@
|
|||
import { Menu, ArrowToggleButton } from "../ToggleButton.js"
|
||||
import icons from "../../../lib/icons.js"
|
||||
import { watch } from "../../../lib/experiments.js"
|
||||
|
||||
const bluetooth = await Service.import("bluetooth")
|
||||
const title = watch("Disabled", bluetooth, () => {
|
||||
if (!bluetooth.enabled)
|
||||
return "Disabled"
|
||||
|
||||
if (bluetooth.connected_devices.length === 1)
|
||||
return bluetooth.connected_devices[0].alias
|
||||
|
||||
return `${bluetooth.connected_devices.length} Connected`
|
||||
})
|
||||
|
||||
export const BluetoothToggle = () => ArrowToggleButton({
|
||||
name: "bluetooth",
|
||||
icon: bluetooth.bind("enabled").as(p => icons.bluetooth[p ? "enabled" : "disabled"]),
|
||||
label: title,
|
||||
connection: [bluetooth, () => bluetooth.enabled],
|
||||
deactivate: () => bluetooth.enabled = false,
|
||||
activate: () => bluetooth.enabled = true,
|
||||
})
|
||||
|
||||
const DeviceItem = (device) => Widget.Box({
|
||||
children: [
|
||||
Widget.Icon(device.icon_name + "-symbolic"),
|
||||
Widget.Label(device.name),
|
||||
Widget.Label({
|
||||
label: `${device.battery_percentage}%`,
|
||||
visible: device.bind("battery_percentage").as(p => p > 0),
|
||||
}),
|
||||
Widget.Box({ hexpand: true }),
|
||||
Widget.Spinner({
|
||||
active: device.bind("connecting"),
|
||||
visible: device.bind("connecting"),
|
||||
}),
|
||||
Widget.Switch({
|
||||
active: device.connected,
|
||||
visible: device.bind("connecting").as(p => !p),
|
||||
setup: self => self.on("notify::active", () => {
|
||||
device.setConnection(self.active)
|
||||
}),
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
||||
export const BluetoothDevices = () => Menu({
|
||||
name: "bluetooth",
|
||||
icon: icons.bluetooth.disabled,
|
||||
title: "Bluetooth",
|
||||
content: [
|
||||
Widget.Box({
|
||||
class_name: "bluetooth-devices",
|
||||
hexpand: true,
|
||||
vertical: true,
|
||||
children: bluetooth.bind("devices").as(ds => ds
|
||||
.filter(d => d.name)
|
||||
.map(DeviceItem)),
|
||||
}),
|
||||
],
|
||||
})
|
23
.config/ags/old/modules/quicksettings/widgets/Brightness.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
import icons from "../../../lib/icons.js"
|
||||
import brightness from "../../../services/brightness.js"
|
||||
|
||||
const BrightnessSlider = () => Widget.Slider({
|
||||
draw_value: false,
|
||||
hexpand: true,
|
||||
value: brightness.bind("screen"),
|
||||
on_change: ({ value }) => brightness.screen = value,
|
||||
})
|
||||
|
||||
export const Brightness = () => Widget.Box({
|
||||
class_name: "brightness",
|
||||
children: [
|
||||
Widget.Button({
|
||||
vpack: "center",
|
||||
child: Widget.Icon(icons.brightness.indicator),
|
||||
on_clicked: () => brightness.screen = 0,
|
||||
tooltip_text: brightness.bind("screen").as(v =>
|
||||
`Screen Brightness: ${Math.floor(v * 100)}%`),
|
||||
}),
|
||||
BrightnessSlider(),
|
||||
],
|
||||
})
|
12
.config/ags/old/modules/quicksettings/widgets/DND.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { SimpleToggleButton } from "../ToggleButton.js"
|
||||
import icons from "../../../lib/icons.js"
|
||||
|
||||
const n = await Service.import("notifications")
|
||||
const dnd = n.bind("dnd")
|
||||
|
||||
export const DND = () => SimpleToggleButton({
|
||||
icon: dnd.as(dnd => icons.notifications[dnd ? "silent" : "noisy"]),
|
||||
label: dnd.as(dnd => dnd ? "Silent" : "Noisy"),
|
||||
toggle: () => n.dnd = !n.dnd,
|
||||
connection: [n, () => n.dnd],
|
||||
})
|
10
.config/ags/old/modules/quicksettings/widgets/DarkMode.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { SimpleToggleButton } from "../ToggleButton.js"
|
||||
import icons from "../../../lib/icons.js"
|
||||
|
||||
let scheme = "dark"
|
||||
|
||||
export const DarkModeToggle = () => SimpleToggleButton({
|
||||
icon: icons.color[scheme],
|
||||
label: scheme === "dark" ? "Dark" : "Light",
|
||||
toggle: () => scheme = scheme === "dark" ? "light" : "dark",
|
||||
})
|
60
.config/ags/old/modules/quicksettings/widgets/Header.js
Normal file
|
@ -0,0 +1,60 @@
|
|||
import icons from "../../../lib/icons.js"
|
||||
import { uptime } from "../../../lib/variables.js"
|
||||
import options from "../../../options.js"
|
||||
import powermenu from "../../../services/powermenu.js"
|
||||
|
||||
const battery = await Service.import("battery")
|
||||
const { image, size } = options.quicksettings.avatar
|
||||
|
||||
function up(up) {
|
||||
const h = Math.floor(up / 60)
|
||||
const m = Math.floor(up % 60)
|
||||
return `${h}h ${m < 10 ? "0" + m : m}m`
|
||||
}
|
||||
|
||||
const Avatar = () => Widget.Box({
|
||||
class_name: "avatar",
|
||||
css: `
|
||||
min-width: ${size}px;
|
||||
min-height: ${size}px;
|
||||
background-image: url('${image}');
|
||||
background-size: cover;
|
||||
`,
|
||||
})
|
||||
|
||||
const SysButton = (action) => Widget.Button({
|
||||
vpack: "center",
|
||||
child: Widget.Icon(icons.powermenu[action]),
|
||||
on_clicked: () => powermenu.action(action),
|
||||
})
|
||||
|
||||
export const Header = () => Widget.Box(
|
||||
{ class_name: "header horizontal" },
|
||||
Avatar(),
|
||||
Widget.Box({
|
||||
vertical: true,
|
||||
vpack: "center",
|
||||
children: [
|
||||
Widget.Box([
|
||||
Widget.Icon({ icon: battery.bind("icon_name") }),
|
||||
Widget.Label({ label: battery.bind("percent").as(p => `${p}%`) }),
|
||||
]),
|
||||
Widget.Box([
|
||||
Widget.Icon({ icon: icons.ui.time }),
|
||||
Widget.Label({ label: uptime.bind().as(up) }),
|
||||
]),
|
||||
],
|
||||
}),
|
||||
Widget.Box({ hexpand: true }),
|
||||
Widget.Button({
|
||||
vpack: "center",
|
||||
child: Widget.Icon(icons.ui.settings),
|
||||
on_clicked: () => {
|
||||
App.closeWindow("quicksettings")
|
||||
App.closeWindow("settings-dialog")
|
||||
App.openWindow("settings-dialog")
|
||||
},
|
||||
}),
|
||||
SysButton("logout"),
|
||||
SysButton("shutdown"),
|
||||
)
|
148
.config/ags/old/modules/quicksettings/widgets/Media.js
Normal file
|
@ -0,0 +1,148 @@
|
|||
import icons from "../../../lib/icons.js"
|
||||
import options from "../../../options.js"
|
||||
import { icon } from "../../../lib/utils.js"
|
||||
|
||||
const mpris = await Service.import("mpris")
|
||||
const players = mpris.bind("players")
|
||||
const { media } = options.quicksettings
|
||||
|
||||
function lengthStr(length) {
|
||||
const min = Math.floor(length / 60)
|
||||
const sec = Math.floor(length % 60)
|
||||
const sec0 = sec < 10 ? "0" : ""
|
||||
return `${min}:${sec0}${sec}`
|
||||
}
|
||||
|
||||
const Player = (player) => {
|
||||
const cover = Widget.Box({
|
||||
class_name: "cover",
|
||||
vpack: "start",
|
||||
css: player.bind("cover_path").as(path => `
|
||||
min-width: ${media.coverSize}px;
|
||||
min-height: ${media.coverSize}px;
|
||||
background-image: url('${path}');
|
||||
`),
|
||||
})
|
||||
|
||||
const title = Widget.Label({
|
||||
class_name: "title",
|
||||
max_width_chars: 20,
|
||||
truncate: "end",
|
||||
hpack: "start",
|
||||
label: player.bind("track_title"),
|
||||
})
|
||||
|
||||
const artist = Widget.Label({
|
||||
class_name: "artist",
|
||||
max_width_chars: 20,
|
||||
truncate: "end",
|
||||
hpack: "start",
|
||||
label: player.bind("track_artists").as(a => a.join(", ")),
|
||||
})
|
||||
|
||||
const positionSlider = Widget.Slider({
|
||||
class_name: "position",
|
||||
draw_value: false,
|
||||
on_change: ({ value }) => player.position = value * player.length,
|
||||
setup: self => {
|
||||
const update = () => {
|
||||
const { length, position } = player
|
||||
self.visible = length > 0
|
||||
self.value = length > 0 ? position / length : 0
|
||||
}
|
||||
self.hook(player, update)
|
||||
self.hook(player, update, "position")
|
||||
self.poll(1000, update)
|
||||
},
|
||||
})
|
||||
|
||||
const positionLabel = Widget.Label({
|
||||
class_name: "position",
|
||||
hpack: "start",
|
||||
setup: self => {
|
||||
const update = (_, time) => {
|
||||
self.label = lengthStr(time || player.position)
|
||||
self.visible = player.length > 0
|
||||
}
|
||||
self.hook(player, update, "position")
|
||||
self.poll(1000, update)
|
||||
},
|
||||
})
|
||||
|
||||
const lengthLabel = Widget.Label({
|
||||
class_name: "length",
|
||||
hpack: "end",
|
||||
visible: player.bind("length").as(l => l > 0),
|
||||
label: player.bind("length").as(lengthStr),
|
||||
})
|
||||
|
||||
const playericon = Widget.Icon({
|
||||
class_name: "icon",
|
||||
hexpand: true,
|
||||
hpack: "end",
|
||||
vpack: "start",
|
||||
tooltip_text: player.identity || "",
|
||||
icon: player.bind("entry").as(e => {
|
||||
const name = `${e}${media.monochromeIcon ? "-symbolic" : ""}`
|
||||
return icon(name, icons.fallback.audio)
|
||||
}),
|
||||
})
|
||||
|
||||
const playPause = Widget.Button({
|
||||
class_name: "play-pause",
|
||||
on_clicked: () => player.playPause(),
|
||||
visible: player.bind("can_play"),
|
||||
child: Widget.Icon({
|
||||
icon: player.bind("play_back_status").as(s => {
|
||||
switch (s) {
|
||||
case "Playing": return icons.mpris.playing
|
||||
case "Paused":
|
||||
case "Stopped": return icons.mpris.stopped
|
||||
}
|
||||
}),
|
||||
}),
|
||||
})
|
||||
|
||||
const prev = Widget.Button({
|
||||
on_clicked: () => player.previous(),
|
||||
visible: player.bind("can_go_prev"),
|
||||
child: Widget.Icon(icons.mpris.prev),
|
||||
})
|
||||
|
||||
const next = Widget.Button({
|
||||
on_clicked: () => player.next(),
|
||||
visible: player.bind("can_go_next"),
|
||||
child: Widget.Icon(icons.mpris.next),
|
||||
})
|
||||
|
||||
return Widget.Box(
|
||||
{ class_name: "player", vexpand: false },
|
||||
cover,
|
||||
Widget.Box(
|
||||
{ vertical: true },
|
||||
Widget.Box([
|
||||
title,
|
||||
playericon,
|
||||
]),
|
||||
artist,
|
||||
Widget.Box({ vexpand: true }),
|
||||
positionSlider,
|
||||
Widget.CenterBox({
|
||||
class_name: "footer horizontal",
|
||||
start_widget: positionLabel,
|
||||
center_widget: Widget.Box([
|
||||
prev,
|
||||
playPause,
|
||||
next,
|
||||
]),
|
||||
end_widget: lengthLabel,
|
||||
}),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
export const Media = () => Widget.Box({
|
||||
vertical: true,
|
||||
class_name: "media vertical",
|
||||
children: players.as(p => p.map(Player)),
|
||||
})
|
26
.config/ags/old/modules/quicksettings/widgets/MicMute.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { SimpleToggleButton } from "../ToggleButton.js"
|
||||
import icons from "../../../lib/icons.js"
|
||||
const { microphone } = await Service.import("audio")
|
||||
|
||||
const icon = () => microphone.is_muted || microphone.stream?.is_muted
|
||||
? icons.audio.mic.muted
|
||||
: icons.audio.mic.high
|
||||
|
||||
const label = () => microphone.is_muted || microphone.stream?.is_muted
|
||||
? "Muted"
|
||||
: "Unmuted"
|
||||
|
||||
// TODO: Variable watch option
|
||||
const ico = Variable(icon())
|
||||
microphone.connect("changed", () => ico.value = icon())
|
||||
|
||||
// TODO: Variable watch option
|
||||
const lbl = Variable(label())
|
||||
microphone.connect("changed", () => lbl.value = label())
|
||||
|
||||
export const MicMute = () => SimpleToggleButton({
|
||||
icon: ico.bind(),
|
||||
label: lbl.bind(),
|
||||
toggle: () => microphone.is_muted = !microphone.is_muted,
|
||||
connection: [microphone, () => microphone?.is_muted || false],
|
||||
})
|
61
.config/ags/old/modules/quicksettings/widgets/Network.js
Normal file
|
@ -0,0 +1,61 @@
|
|||
import { Menu, ArrowToggleButton } from "../ToggleButton.js"
|
||||
import icons from "../../../lib/icons.js"
|
||||
import { dependencies, sh } from "../../../lib/utils.js"
|
||||
import options from "../../../options.js"
|
||||
const { wifi } = await Service.import("network")
|
||||
|
||||
export const NetworkToggle = () => ArrowToggleButton({
|
||||
name: "network",
|
||||
icon: wifi.bind("icon_name"),
|
||||
label: wifi.bind("ssid").as(ssid => ssid || "Not Connected"),
|
||||
connection: [wifi, () => wifi.enabled],
|
||||
deactivate: () => wifi.enabled = false,
|
||||
activate: () => {
|
||||
wifi.enabled = true
|
||||
wifi.scan()
|
||||
},
|
||||
})
|
||||
|
||||
export const WifiSelection = () => Menu({
|
||||
name: "network",
|
||||
icon: wifi.bind("icon_name"),
|
||||
title: "Wifi Selection",
|
||||
content: [
|
||||
Widget.Box({
|
||||
vertical: true,
|
||||
setup: self => self.hook(wifi, () => self.children =
|
||||
wifi.access_points.map(ap => Widget.Button({
|
||||
on_clicked: () => {
|
||||
if (dependencies("nmcli"))
|
||||
Utils.execAsync(`nmcli device wifi connect ${ap.bssid}`)
|
||||
},
|
||||
child: Widget.Box({
|
||||
children: [
|
||||
Widget.Icon(ap.iconName),
|
||||
Widget.Label(ap.ssid || ""),
|
||||
Widget.Icon({
|
||||
icon: icons.ui.tick,
|
||||
hexpand: true,
|
||||
hpack: "end",
|
||||
setup: self => Utils.idle(() => {
|
||||
if (!self.is_destroyed)
|
||||
self.visible = ap.active
|
||||
}),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
})),
|
||||
),
|
||||
}),
|
||||
Widget.Separator(),
|
||||
Widget.Button({
|
||||
on_clicked: () => sh(options.quicksettings.networkSettings),
|
||||
child: Widget.Box({
|
||||
children: [
|
||||
Widget.Icon(icons.ui.settings),
|
||||
Widget.Label("Network"),
|
||||
],
|
||||
}),
|
||||
}),
|
||||
],
|
||||
})
|
141
.config/ags/old/modules/quicksettings/widgets/Volume.js
Normal file
|
@ -0,0 +1,141 @@
|
|||
import { Arrow, Menu } from "../ToggleButton.js"
|
||||
import { dependencies, icon, sh } from "../../../lib/utils.js"
|
||||
import icons from "../../../lib/icons.js"
|
||||
const audio = await Service.import("audio")
|
||||
|
||||
const VolumeIndicator = (type = "speaker") => Widget.Button({
|
||||
vpack: "center",
|
||||
on_clicked: () => audio[type].is_muted = !audio[type].is_muted,
|
||||
child: Widget.Icon({
|
||||
icon: audio[type].bind("icon_name")
|
||||
.as(i => icon(i || "", icons.audio.mic.high)),
|
||||
tooltipText: audio[type].bind("volume")
|
||||
.as(vol => `Volume: ${Math.floor(vol * 100)}%`),
|
||||
}),
|
||||
})
|
||||
|
||||
const VolumeSlider = (type = "speaker") => Widget.Slider({
|
||||
hexpand: true,
|
||||
draw_value: false,
|
||||
on_change: ({ value, dragging }) => dragging && (audio[type].volume = value),
|
||||
value: audio[type].bind("volume"),
|
||||
})
|
||||
|
||||
export const Volume = () => Widget.Box({
|
||||
class_name: "volume",
|
||||
children: [
|
||||
VolumeIndicator("speaker"),
|
||||
VolumeSlider("speaker"),
|
||||
Widget.Box({
|
||||
vpack: "center",
|
||||
child: Arrow("sink-selector"),
|
||||
}),
|
||||
Widget.Box({
|
||||
vpack: "center",
|
||||
child: Arrow("app-mixer"),
|
||||
visible: audio.bind("apps").as(a => a.length > 0),
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
||||
export const Microhone = () => Widget.Box({
|
||||
class_name: "slider horizontal",
|
||||
visible: audio.bind("recorders").as(a => a.length > 0),
|
||||
children: [
|
||||
VolumeIndicator("microphone"),
|
||||
VolumeSlider("microphone"),
|
||||
],
|
||||
})
|
||||
|
||||
const MixerItem = (stream) => Widget.Box(
|
||||
{
|
||||
hexpand: true,
|
||||
class_name: "mixer-item horizontal",
|
||||
},
|
||||
Widget.Icon({
|
||||
tooltip_text: stream.bind("name").as(n => n || ""),
|
||||
icon: stream.bind("name").as(n => {
|
||||
return Utils.lookUpIcon(n || "")
|
||||
? (n || "")
|
||||
: icons.fallback.audio
|
||||
}),
|
||||
}),
|
||||
Widget.Box(
|
||||
{ vertical: true },
|
||||
Widget.Label({
|
||||
xalign: 0,
|
||||
truncate: "end",
|
||||
max_width_chars: 28,
|
||||
label: stream.bind("description").as(d => d || ""),
|
||||
}),
|
||||
Widget.Slider({
|
||||
hexpand: true,
|
||||
draw_value: false,
|
||||
value: stream.bind("volume"),
|
||||
on_change: ({ value }) => stream.volume = value,
|
||||
}),
|
||||
),
|
||||
)
|
||||
|
||||
const SinkItem = (stream) => Widget.Button({
|
||||
hexpand: true,
|
||||
on_clicked: () => audio.speaker = stream,
|
||||
child: Widget.Box({
|
||||
children: [
|
||||
Widget.Icon({
|
||||
icon: icon(stream.icon_name || "", icons.fallback.audio),
|
||||
tooltip_text: stream.icon_name || "",
|
||||
}),
|
||||
Widget.Label((stream.description || "").split(" ").slice(0, 4).join(" ")),
|
||||
Widget.Icon({
|
||||
icon: icons.ui.tick,
|
||||
hexpand: true,
|
||||
hpack: "end",
|
||||
visible: audio.speaker.bind("stream").as(s => s === stream.stream),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
})
|
||||
|
||||
const SettingsButton = () => Widget.Button({
|
||||
on_clicked: () => {
|
||||
if (dependencies("pavucontrol"))
|
||||
sh("pavucontrol")
|
||||
},
|
||||
hexpand: true,
|
||||
child: Widget.Box({
|
||||
children: [
|
||||
Widget.Icon(icons.ui.settings),
|
||||
Widget.Label("Settings"),
|
||||
],
|
||||
}),
|
||||
})
|
||||
|
||||
export const AppMixer = () => Menu({
|
||||
name: "app-mixer",
|
||||
icon: icons.audio.mixer,
|
||||
title: "App Mixer",
|
||||
content: [
|
||||
Widget.Box({
|
||||
vertical: true,
|
||||
class_name: "vertical mixer-item-box",
|
||||
children: audio.bind("apps").as(a => a.map(MixerItem)),
|
||||
}),
|
||||
Widget.Separator(),
|
||||
SettingsButton(),
|
||||
],
|
||||
})
|
||||
|
||||
export const SinkSelector = () => Menu({
|
||||
name: "sink-selector",
|
||||
icon: icons.audio.type.headset,
|
||||
title: "Sink Selector",
|
||||
content: [
|
||||
Widget.Box({
|
||||
vertical: true,
|
||||
children: audio.bind("speakers").as(a => a.map(SinkItem)),
|
||||
}),
|
||||
Widget.Separator(),
|
||||
SettingsButton(),
|
||||
],
|
||||
})
|
139
.config/ags/old/options.js
Normal file
|
@ -0,0 +1,139 @@
|
|||
|
||||
const options = {
|
||||
recompileSass: true,
|
||||
monitorCSS: true,
|
||||
theme: {
|
||||
PopupTransitionDuration: 400,
|
||||
PopupCloseDuration: 300,
|
||||
},
|
||||
// powermenu: {
|
||||
// sleep: 'systemctl suspend',
|
||||
// lock: 'waylock',
|
||||
// logout: 'hyprctl dispatch exit',
|
||||
// shutdown: 'shutdown now',
|
||||
// reboot: 'reboot',
|
||||
// },
|
||||
overview: {
|
||||
scale: 9,
|
||||
workspaces: 8,
|
||||
monochromeIcon: false,
|
||||
},
|
||||
// notifications: {
|
||||
// position: ["top", "right"],
|
||||
// blacklist: ["Spotify"],
|
||||
// width: 440,
|
||||
// },
|
||||
// transitionDuration: 200,
|
||||
// transition: 200,
|
||||
|
||||
// bar: {
|
||||
// flatButtons: true,
|
||||
// position: "bottom",
|
||||
// corners: true,
|
||||
// layout: {
|
||||
// start: [
|
||||
// "launcher",
|
||||
// "workspaces",
|
||||
// "taskbar",
|
||||
// "expander",
|
||||
// // "messages",
|
||||
// ],
|
||||
// center: [
|
||||
// "date",
|
||||
// ],
|
||||
// end: [
|
||||
// "media",
|
||||
// "expander",
|
||||
// "systray",
|
||||
// // "colorpicker",
|
||||
// // "screenrecord",
|
||||
// "system",
|
||||
// "battery",
|
||||
// "powermenu",
|
||||
// ],
|
||||
// },
|
||||
// launcher: {
|
||||
// icon: {
|
||||
// colored: true,
|
||||
// icon: "system-search-symbolic",
|
||||
// },
|
||||
// label: {
|
||||
// colored: false,
|
||||
// label: " Rofi", // Text that appears with the search icon
|
||||
// },
|
||||
// action: () => Utils.execAsync('bash -c "pkill rofi || rofi -show drun"'),
|
||||
// },
|
||||
// date: {
|
||||
// format: "%H:%M - %A %e.",
|
||||
// action: () => App.toggleWindow("datemenu"),
|
||||
// },
|
||||
// battery: {
|
||||
// bar: "regular",
|
||||
// charging: "#00D787",
|
||||
// percentage: true,
|
||||
// blocks: 10,
|
||||
// width: 70,
|
||||
// low: 30,
|
||||
// },
|
||||
// workspaces: {
|
||||
// workspaces: 7,
|
||||
// },
|
||||
// taskbar: {
|
||||
// monochrome: false,
|
||||
// exclusive: true,
|
||||
// },
|
||||
// messages: {
|
||||
// action: () => App.toggleWindow("datemenu"),
|
||||
// },
|
||||
// systray: {
|
||||
// ignore: [
|
||||
// "KDE Connect Indicator",
|
||||
// "spotify-client",
|
||||
// ],
|
||||
// },
|
||||
// media: {
|
||||
// monochrome: false,
|
||||
// preferred: "spotify",
|
||||
// direction: "right",
|
||||
// length: 40,
|
||||
// },
|
||||
// powermenu: {
|
||||
// monochrome: false,
|
||||
// action: () => App.toggleWindow("powermenu"),
|
||||
// },
|
||||
// },
|
||||
// osd: {
|
||||
// progress: {
|
||||
// vertical: false,
|
||||
// pack: {
|
||||
// h: "center",
|
||||
// v: "end",
|
||||
// },
|
||||
// },
|
||||
// microphone: {
|
||||
// pack: {
|
||||
// h: "center",
|
||||
// v: "center",
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// datemenu: {
|
||||
// position: "center",
|
||||
// },
|
||||
|
||||
// quicksettings: {
|
||||
// avatar: {
|
||||
// image: `/var/lib/AccountsService/icons/${Utils.USER}`,
|
||||
// size: 70,
|
||||
// },
|
||||
// width: 380,
|
||||
// position: "right",
|
||||
// networkSettings: "gtk-launch gnome-control-center",
|
||||
// media: {
|
||||
// monochromeIcon: false,
|
||||
// coverSize: 100,
|
||||
// },
|
||||
// },
|
||||
};
|
||||
|
||||
export default options;
|
337
.config/ags/old/scss/_bar.scss
Normal file
|
@ -0,0 +1,337 @@
|
|||
$radius: 11px;
|
||||
$bar-battery-blocks: 10;
|
||||
$button-radius: 10px;
|
||||
$bg: #171717;
|
||||
$primary-bg: $blue;
|
||||
$primary-fg: $mantle;
|
||||
$charging-bg: $green;
|
||||
$error-bg: $red;
|
||||
|
||||
.bar {
|
||||
background-color: $crust;
|
||||
|
||||
.panel-button {
|
||||
all: unset;
|
||||
color: $text;
|
||||
|
||||
>* {
|
||||
border-radius: 10px;
|
||||
transition: 200ms;
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
&:focus>*,
|
||||
&.focused>* {
|
||||
box-shadow: inset 0 0 0 1px $blue;
|
||||
background-color: transparentize($subtext1, 94px *.9 / 100);
|
||||
color: lighten($subtext1, 8%);
|
||||
}
|
||||
|
||||
&:hover>* {
|
||||
box-shadow: inset 0 0 0 1px #080808;
|
||||
background-color: transparentize($subtext1, 94px *.9 / 100);
|
||||
color: lighten($subtext1, 8%);
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active,
|
||||
&.on,
|
||||
&:checked {
|
||||
>* {
|
||||
box-shadow: inset 0 0 0 1px #080808;
|
||||
background-image: linear-gradient(to right, $mantle , darken($mantle, 4%));
|
||||
background-color: $blue;
|
||||
color: $mantle;
|
||||
}
|
||||
|
||||
&:hover>* {
|
||||
box-shadow: inset 0 0 0 1px $blue,
|
||||
inset 0 0 0 99px transparentize($subtext1, 94px *.9 / 100);
|
||||
}
|
||||
}
|
||||
|
||||
>* {
|
||||
border-radius: 10px;
|
||||
margin: 4px;
|
||||
padding: 5px 8px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
label,
|
||||
image {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
&:not(.flat) {
|
||||
// all: unset;
|
||||
color: $text;
|
||||
|
||||
>* {
|
||||
border-radius: 10px;
|
||||
transition: 200ms;
|
||||
}
|
||||
|
||||
&:focus>*,
|
||||
&.focused>* {
|
||||
box-shadow: inset 0 0 0 1px $blue;
|
||||
background-color: transparentize($subtext1, 94px *.9 / 100);
|
||||
color: lighten($subtext1, 8%);
|
||||
}
|
||||
|
||||
&:hover>* {
|
||||
box-shadow: inset 0 0 0 1px #080808;
|
||||
background-color: transparentize($subtext1, 94px *.9 / 100);
|
||||
color: lighten($subtext1, 8%);
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active,
|
||||
&.on,
|
||||
&:checked {
|
||||
>* {
|
||||
box-shadow: inset 0 0 0 1px #080808;
|
||||
background-image: linear-gradient(to right, $mantle , darken($mantle, 4%));
|
||||
background-color: $blue;
|
||||
color: $mantle;
|
||||
}
|
||||
|
||||
&:hover>* {
|
||||
box-shadow: inset 0 0 0 1px $blue,
|
||||
inset 0 0 0 99px transparentize($subtext1, 94px *.9 / 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.launcher {
|
||||
.colored {
|
||||
color: transparentize($blue, 0.2);
|
||||
}
|
||||
|
||||
&:hover .colored {
|
||||
color: $blue;
|
||||
}
|
||||
|
||||
&:active .colored,
|
||||
&.active .colored {
|
||||
color: $blue;
|
||||
}
|
||||
}
|
||||
|
||||
.workspaces {
|
||||
label {
|
||||
font-size: 0;
|
||||
min-width: 5pt;
|
||||
min-height: 5pt;
|
||||
border-radius: $radius*.6;
|
||||
box-shadow: inset 0 0 0 1px transparent;
|
||||
margin: 0 7px*.5;
|
||||
transition: 100ms* .5;
|
||||
background-color: transparentize($text, .8);
|
||||
|
||||
&.occupied {
|
||||
background-color: transparentize($text, .2);
|
||||
min-width: 7pt;
|
||||
min-height: 7pt;
|
||||
// box-shadow: inset 0 0 0 1px $blue;
|
||||
// box-shadow: inset 0 0 0 1px transparent;
|
||||
}
|
||||
|
||||
&.active {
|
||||
// background-color: $primary-bg;
|
||||
// box-shadow: inset 0 0 0 1px transparent;
|
||||
box-shadow: inset 0 0 0 1px $blue;
|
||||
background-image: linear-gradient(to right, $mantle , darken($mantle, 4%));
|
||||
min-width: 20pt;
|
||||
min-height: 12pt;
|
||||
}
|
||||
}
|
||||
|
||||
&.active,
|
||||
&:active {
|
||||
label {
|
||||
background-color: transparentize($blue, .3);
|
||||
|
||||
&.occupied {
|
||||
background-color: transparentize($blue, .15);
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: $blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.media label {
|
||||
margin: 0 (12px * .5)
|
||||
}
|
||||
|
||||
.taskbar .indicator.active {
|
||||
background-color: $blue;
|
||||
border-radius: $radius;
|
||||
min-height: 4pt;
|
||||
min-width: 6pt;
|
||||
margin: 2pt;
|
||||
}
|
||||
|
||||
.powermenu.colored,
|
||||
.recorder {
|
||||
image {
|
||||
color: transparentize($red, 0.3);
|
||||
}
|
||||
|
||||
&:hover image {
|
||||
color: transparentize($red, 0.15);
|
||||
}
|
||||
|
||||
&:active image {
|
||||
color: $mantle;
|
||||
}
|
||||
}
|
||||
|
||||
.quicksettings>box>box {
|
||||
&.horizontal>* {
|
||||
margin: 0 calc(12px * 0.3 / 2);
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.vertical>* {
|
||||
margin: calc(12px * 0.3 / 2) 0;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.quicksettings:not(.active):not(:active) {
|
||||
.bluetooth {
|
||||
color: $blue;
|
||||
|
||||
label {
|
||||
font-size: 13px * .7;
|
||||
color: $text;
|
||||
text-shadow: 2pt 2pt 2pt rgba(0, 0, 0, .6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.battery-bar {
|
||||
>* {
|
||||
padding: 0;
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
&.bar-hidden>box {
|
||||
padding: 0 12px* .5;
|
||||
|
||||
image {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
levelbar * {
|
||||
all: unset;
|
||||
transition: 200ms;
|
||||
}
|
||||
|
||||
.whole {
|
||||
image {
|
||||
-gtk-icon-shadow: 2pt 2pt 2pt rgba(0, 0, 0, .6);
|
||||
}
|
||||
|
||||
label {
|
||||
text-shadow: 2pt 2pt 2pt rgba(0, 0, 0, .6);
|
||||
}
|
||||
}
|
||||
|
||||
.regular image {
|
||||
margin-left: 12px * .5;
|
||||
}
|
||||
|
||||
trough {
|
||||
transition: 200ms;
|
||||
border-radius: $radius;
|
||||
color: $mantle;
|
||||
background-color: $base;
|
||||
// border: 1px solid $surface0;
|
||||
min-height: 5px;
|
||||
min-width: 140px;
|
||||
padding: 0px;
|
||||
margin: 7px;
|
||||
}
|
||||
|
||||
.regular trough {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
block {
|
||||
margin: 0;
|
||||
|
||||
&:last-child {
|
||||
border-radius: 0 $button-radius $button-radius 0;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
border-radius: $button-radius 0 0 $button-radius;
|
||||
}
|
||||
}
|
||||
|
||||
.vertical {
|
||||
block {
|
||||
&:last-child {
|
||||
border-radius: 0 0 $button-radius $button-radius;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
border-radius: $button-radius $button-radius 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@for $i from 1 through $bar-battery-blocks {
|
||||
block:nth-child(#{$i}).filled {
|
||||
background-color: $primary-bg
|
||||
}
|
||||
|
||||
&.low block:nth-child(#{$i}).filled {
|
||||
background-color: $error-bg
|
||||
}
|
||||
|
||||
&.charging block:nth-child(#{$i}).filled {
|
||||
background-color: $charging-bg
|
||||
}
|
||||
|
||||
&:active .regular block:nth-child(#{$i}).filled {
|
||||
background-color: $primary-fg
|
||||
}
|
||||
}
|
||||
|
||||
&.low image {
|
||||
color: $error-bg
|
||||
}
|
||||
|
||||
&.charging image {
|
||||
color: $charging-bg
|
||||
}
|
||||
|
||||
&:active image {
|
||||
color: $primary-fg
|
||||
}
|
||||
}
|
||||
}
|
340
.config/ags/old/scss/_datemenu.scss
Normal file
|
@ -0,0 +1,340 @@
|
|||
@import './notifications';
|
||||
|
||||
@mixin calendar {
|
||||
transition: 200ms;
|
||||
border-radius: 18px;
|
||||
color: $text;
|
||||
background-color: $mantle;
|
||||
border: 2px solid $blue;
|
||||
padding: 8px 8px 0px;
|
||||
|
||||
calendar {
|
||||
all: unset;
|
||||
|
||||
&.button {
|
||||
all: unset;
|
||||
transition: 200ms;
|
||||
border-radius: 6px;
|
||||
color: $text;
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
box-shadow: none;
|
||||
|
||||
&:focus {
|
||||
box-shadow: inset 0 0 0 2px #0e0e0e;
|
||||
background-color: transparentize(#eeeeee, $amount: 0.8);
|
||||
color: lighten($color: #eeeeee, $amount: 8%);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
box-shadow: inset 0 0 0 2px $blue;
|
||||
background-color: transparentize(#eeeeee, $amount: 0.8);
|
||||
color: lighten($color: #eeeeee, $amount: 8%);
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.on,
|
||||
&.active,
|
||||
&:checked {
|
||||
box-shadow: inset 0 0 0 2px $blue;
|
||||
background-image: linear-gradient(to right, $mantle, darken($mantle, 4%));
|
||||
background-color: $blue;
|
||||
color: $base;
|
||||
|
||||
&:hover {
|
||||
box-shadow: inset 0 0 0 2px $blue,
|
||||
inset 0 0 0 99px transparentize(#eeeeee, $amount: 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
color: transparentize($blue, 0.7);
|
||||
}
|
||||
}
|
||||
|
||||
&:selected {
|
||||
box-shadow: inset 0 -8px 0 0 transparentize($green, 0.5),
|
||||
inset 0 0 0 1px $green;
|
||||
border-radius: 8px;
|
||||
color: $blue;
|
||||
}
|
||||
|
||||
&.header {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
color: transparentize($text, 0.5);
|
||||
}
|
||||
|
||||
&.highlight {
|
||||
background-color: transparent;
|
||||
color: transparentize($blue, 0.0);
|
||||
}
|
||||
|
||||
&:indeterminate {
|
||||
color: transparentize($text, 0.8);
|
||||
}
|
||||
|
||||
font-size: 1.4em;
|
||||
padding: .2em;
|
||||
}
|
||||
}
|
||||
|
||||
window#datemenu .datemenu {
|
||||
box-shadow: 0 0 5px 0 #0e0e0e;
|
||||
|
||||
margin: 9px;
|
||||
border: 2px solid $blue;
|
||||
background-color: $base;
|
||||
color: $text;
|
||||
border-radius: 26px;
|
||||
padding: 8px;
|
||||
|
||||
.notifications {
|
||||
.header {
|
||||
margin-bottom: 30px;
|
||||
margin-right: 30px;
|
||||
|
||||
>label {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
button {
|
||||
all: unset;
|
||||
transition: 200ms;
|
||||
border-radius: 10px;
|
||||
color: $text;
|
||||
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: inset 0 0 0 2px $blue;
|
||||
|
||||
&:focus {
|
||||
box-shadow: inset 0 0 0 2px #0e0e0e;
|
||||
background-color: transparentize(#eeeeee, $amount: 0.8);
|
||||
color: lighten($color: #eeeeee, $amount: 8%);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
box-shadow: inset 0 0 0 2px $blue;
|
||||
background-color: transparentize(#eeeeee, $amount: 0.8);
|
||||
color: lighten($color: #eeeeee, $amount: 8%);
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.on,
|
||||
&.active,
|
||||
&:checked {
|
||||
box-shadow: inset 0 0 0 2px $blue;
|
||||
background-image: linear-gradient(to right, $mantle, darken($mantle, 4%));
|
||||
background-color: $blue;
|
||||
color: $base;
|
||||
|
||||
&:hover {
|
||||
box-shadow: inset 0 0 0 2px $blue,
|
||||
inset 0 0 0 99px transparentize(#eeeeee, $amount: 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
color: transparentize($mantle, 0.7);
|
||||
}
|
||||
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.notification-scrollable {
|
||||
|
||||
scrollbar,
|
||||
scrollbar * {
|
||||
all: unset;
|
||||
}
|
||||
|
||||
scrollbar.vertical {
|
||||
transition: 200ms;
|
||||
background-color: transparentize($base, 0.7);
|
||||
|
||||
&:hover {
|
||||
background-color: transparentize($base, 0.3);
|
||||
|
||||
slider {
|
||||
background-color: transparentize($text, 0.3);
|
||||
min-width: .6em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
scrollbar.vertical slider {
|
||||
background-color: transparentize($text, 0.5);
|
||||
border-radius: 10px;
|
||||
min-width: .4em;
|
||||
min-height: 2em;
|
||||
transition: 200ms;
|
||||
}
|
||||
}
|
||||
|
||||
.notification-list {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.notification {
|
||||
&.critical {
|
||||
box-shadow: inset 0 0 .5em 0 $red;
|
||||
}
|
||||
|
||||
&:hover button.close-button {
|
||||
// @include button-hover;
|
||||
background-color: transparentize($red, .5);
|
||||
}
|
||||
|
||||
.content {
|
||||
.title {
|
||||
margin-top: 5px;
|
||||
margin-right: 10px;
|
||||
color: $text;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.time {
|
||||
color: transparentize($text, .2);
|
||||
margin: 5px 10px;
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: .9em;
|
||||
color: transparentize($text, .2);
|
||||
}
|
||||
|
||||
.icon {
|
||||
border-radius: 10px;
|
||||
margin-right: 10px;
|
||||
|
||||
&.img {
|
||||
border: 2px solid $green;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
box.actions {
|
||||
// @include spacing(0.5);
|
||||
margin-top: 10px;
|
||||
|
||||
button {
|
||||
// @include button;
|
||||
background-color: $surface0;
|
||||
border: 2px solid $surface0;
|
||||
border-radius: 10px;
|
||||
font-size: 1.2em;
|
||||
margin: 0px 10px 10px 0px;
|
||||
padding: 10px;
|
||||
|
||||
&:first-child {
|
||||
margin: 0px 10px 10px 10px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: $surface2;
|
||||
border: 2px solid $rosewater;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button.close-button {
|
||||
// @include button($flat: true);
|
||||
margin: 0px 0px 0px 0px;
|
||||
border-radius: 10px;
|
||||
min-width: 30px;
|
||||
min-height: 30px;
|
||||
background-color: rgba(0, 0, 0, 0); //$crust;
|
||||
padding: 0px;
|
||||
|
||||
&:hover {
|
||||
background-color: transparentize($red, .2);
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-image: none;
|
||||
background-color: $red;
|
||||
}
|
||||
}
|
||||
|
||||
transition: 200ms;
|
||||
color: $text;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 15px;
|
||||
background-color: $base;
|
||||
font-family: "Iosevka";
|
||||
padding: 5px;
|
||||
border: 2px solid $rosewater;
|
||||
box-shadow: rgba(0, 0, 0, 0.4) 5px 5px 5px;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
image {
|
||||
font-size: 7em;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
separator {
|
||||
background-color: $mantle;
|
||||
min-width: 3px;
|
||||
border-radius: 100px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.datemenu {
|
||||
&.horizontal>* {
|
||||
margin: 0 10px;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.vertical>* {
|
||||
margin: 10px 0;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.clock-box {
|
||||
padding: 10px;
|
||||
|
||||
.clock {
|
||||
font-size: 6em;
|
||||
}
|
||||
|
||||
.uptime {
|
||||
font-family: "Iosevka";
|
||||
font-size: 18px;
|
||||
color: transparentize($text, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.calendar {
|
||||
font-family: "Iosevka";
|
||||
font-size: 18px;
|
||||
@include calendar;
|
||||
}
|
||||
}
|
9
.config/ags/old/scss/_dock.scss
Normal file
|
@ -0,0 +1,9 @@
|
|||
#dock * {
|
||||
font-family: 'Iosevka';
|
||||
}
|
||||
|
||||
#dock-box {
|
||||
min-height: 10px;
|
||||
min-width: 100px;
|
||||
background-color: $base;
|
||||
}
|
1
.config/ags/old/scss/_globals.scss
Normal file
|
@ -0,0 +1 @@
|
|||
// Trying yo put some global variables
|
76
.config/ags/old/scss/_lockscreen.scss
Normal file
|
@ -0,0 +1,76 @@
|
|||
#lockscreen * {
|
||||
// all:unset;
|
||||
font-family: "SF Pro Display";
|
||||
}
|
||||
|
||||
/* #lockscreen { */
|
||||
/* background-image: url("/home/hooman/gitjargan/wallpapers/0012.jpg"); */
|
||||
/* } */
|
||||
|
||||
#lockscreen-time {
|
||||
color: #b8bcc2;
|
||||
font-size: 12.5rem;
|
||||
margin-bottom: 2.5rem;
|
||||
}
|
||||
|
||||
#lockscreen-date {
|
||||
color: #b8bcc2;
|
||||
font-size: 3.75rem;
|
||||
margin-bottom: 6rem;
|
||||
}
|
||||
|
||||
#lockscreen-time, #lockscreen-date {
|
||||
margin-left: 7.8125rem;
|
||||
}
|
||||
|
||||
.lockscreen-smolbox {
|
||||
background-color: #172030;
|
||||
border-radius: 0.5rem;
|
||||
min-height: 4.375rem;
|
||||
min-width: 4.375rem;
|
||||
margin-right: 5rem;
|
||||
margin-bottom: 2.5rem;
|
||||
font-size: 2rem;
|
||||
|
||||
label {
|
||||
min-height: 4.375rem;
|
||||
min-width: 4.375rem;
|
||||
color: #b8bcc2;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 5rem;
|
||||
}
|
||||
}
|
||||
|
||||
#lockscreen-revealer {
|
||||
padding-left: 1rem;
|
||||
}
|
||||
|
||||
.lockscreen-charged {
|
||||
color: #6b7cdb;
|
||||
}
|
||||
|
||||
.lockscreen-low {
|
||||
color: #c45e62;
|
||||
}
|
||||
|
||||
.lockscreen-charging {
|
||||
color: #62bf81;
|
||||
}
|
||||
.lockscreen-battery {
|
||||
padding-right: 0;
|
||||
margin-left: -0.5625rem;
|
||||
margin-bottom: -0.4375rem;
|
||||
margin-right: 0.5625rem;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.lockscreen-network {
|
||||
padding-left: 1.25rem;
|
||||
margin-right: 1.125rem;
|
||||
}
|
||||
|
||||
#lockscreen-boxRight {
|
||||
min-width: 4.375rem;
|
||||
}
|
26
.config/ags/old/scss/_mocha.scss
Normal file
|
@ -0,0 +1,26 @@
|
|||
$rosewater: #f5e0dc;
|
||||
$flamingo: #f2cdcd;
|
||||
$pink: #f5c2e7;
|
||||
$mauve: #cba6f7;
|
||||
$red: #f38ba8;
|
||||
$maroon: #eba0ac;
|
||||
$peach: #fab387;
|
||||
$yellow: #f9e2af;
|
||||
$green: #a6e3a1;
|
||||
$teal: #94e2d5;
|
||||
$sky: #89dceb;
|
||||
$sapphire: #74c7ec;
|
||||
$blue: #89b4fa;
|
||||
$lavender: #b4befe;
|
||||
$text: #cdd6f4;
|
||||
$subtext1: #bac2de;
|
||||
$subtext0: #a6adc8;
|
||||
$overlay2: #9399b2;
|
||||
$overlay1: #7f849c;
|
||||
$overlay0: #6c7086;
|
||||
$surface2: #585b70;
|
||||
$surface1: #45475a;
|
||||
$surface0: #313244;
|
||||
$base: #1e1e2e;
|
||||
$mantle: #181825;
|
||||
$crust: #11111b;
|
96
.config/ags/old/scss/_notifications.scss
Normal file
|
@ -0,0 +1,96 @@
|
|||
window.notifications {
|
||||
.notification {
|
||||
border-radius: 15px;
|
||||
background-color: $base;
|
||||
margin: 25px 25px 20px 0px;
|
||||
font-family: "Iosevka";
|
||||
padding: 5px;
|
||||
// border: 2px solid $rosewater;
|
||||
box-shadow: rgba(0, 0, 0, 0.4) 5px 5px 5px;
|
||||
|
||||
&.critical {
|
||||
box-shadow: inset 0 0 .5em 0 $red;
|
||||
}
|
||||
|
||||
&:hover button.close-button {
|
||||
// @include button-hover;
|
||||
background-color: transparentize($red, .5);
|
||||
}
|
||||
|
||||
.content {
|
||||
.title {
|
||||
margin-top: 5px;
|
||||
margin-right: 10px;
|
||||
color: $text;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.time {
|
||||
color: transparentize($text, .2);
|
||||
margin: 5px 10px;
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: .9em;
|
||||
color: transparentize($text, .2);
|
||||
}
|
||||
|
||||
.icon {
|
||||
border-radius: 10px;
|
||||
margin-right: 10px;
|
||||
|
||||
&.img {
|
||||
border: 2px solid $green;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
box.actions {
|
||||
// @include spacing(0.5);
|
||||
margin-top: 10px;
|
||||
|
||||
button {
|
||||
// @include button;
|
||||
background-color: $surface0;
|
||||
border: 2px solid $surface0;
|
||||
border-radius: 10px;
|
||||
font-size: 1.2em;
|
||||
margin: 0px 10px 10px 0px;
|
||||
padding: 10px;
|
||||
|
||||
&:first-child {
|
||||
margin: 0px 10px 10px 10px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: $surface2;
|
||||
border: 2px solid $rosewater;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button.close-button {
|
||||
// @include button($flat: true);
|
||||
margin: 0px 0px 0px 0px;
|
||||
border-radius: 10px;
|
||||
min-width: 30px;
|
||||
min-height: 30px;
|
||||
background-color: rgba(0, 0, 0, 0); //$crust;
|
||||
padding: 0px;
|
||||
|
||||
&:hover {
|
||||
background-color: transparentize($red, .5);
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-image: none;
|
||||
background-color: $red;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.description {
|
||||
min-width: 350px;
|
||||
}
|
||||
}
|
||||
}
|
35
.config/ags/old/scss/_osd.scss
Normal file
|
@ -0,0 +1,35 @@
|
|||
$shadow-color: #0e0e0e;
|
||||
|
||||
window.indicator {
|
||||
.progress {
|
||||
box-shadow: 0 0 5px 0 $shadow-color;
|
||||
margin: 15px;
|
||||
border: 2px solid $blue;
|
||||
background-color: $base;
|
||||
color: $text;
|
||||
padding: 5px;
|
||||
border-radius: 15px;
|
||||
|
||||
.fill {
|
||||
border-radius: 10px;
|
||||
background-color: $blue;
|
||||
color: $crust;
|
||||
|
||||
image {
|
||||
-gtk-icon-transform: scale(0.7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.microphone {
|
||||
box-shadow: 0 0 5px 0 $shadow-color;
|
||||
margin: 15px;
|
||||
border: 2px solid $blue;
|
||||
background-color: $base;
|
||||
color: $text;
|
||||
padding: 5px;
|
||||
border-radius: 15px;
|
||||
font-size: 58px;
|
||||
color: transparentize($crust, .1)
|
||||
}
|
||||
}
|
76
.config/ags/old/scss/_overview.scss
Normal file
|
@ -0,0 +1,76 @@
|
|||
window#overview .overview {
|
||||
background-color: $crust;
|
||||
border: 2px solid $overlay0;
|
||||
border-radius: 35px;
|
||||
padding: 15px;
|
||||
margin: 30px;
|
||||
box-shadow: rgba(0, 0, 0, 0.6) 0 0 10px 10px;
|
||||
|
||||
|
||||
&.horizontal>* {
|
||||
margin: 0 10px;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.vertical>* {
|
||||
margin: 10px 0;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.workspace {
|
||||
|
||||
&.active>widget {
|
||||
border-color: $blue;
|
||||
}
|
||||
|
||||
>widget {
|
||||
border-radius: 20px;
|
||||
background-color: $base;
|
||||
margin: 10px;
|
||||
border: 2px solid rgba(0, 0, 0, 0);
|
||||
|
||||
&:hover {
|
||||
background-color: $surface1;
|
||||
}
|
||||
|
||||
&:drop(active) {
|
||||
background-color: $base;
|
||||
}
|
||||
}
|
||||
|
||||
.client {
|
||||
background-color: rgba(0, 0, 0, .3);
|
||||
border: 2px solid $surface0;
|
||||
margin: 10px;
|
||||
border-radius: 10px;
|
||||
padding: 0px;
|
||||
|
||||
&:active,
|
||||
&.on,
|
||||
&.active,
|
||||
&:checked,
|
||||
&:focus {
|
||||
border: 2px solid $blue;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
160
.config/ags/old/scss/_powermenu.scss
Normal file
|
@ -0,0 +1,160 @@
|
|||
#powermenu {
|
||||
/* opacity: 0; */
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
window#powermenu,
|
||||
window#verification {
|
||||
// the fraction has to be more than hyprland ignorealpha
|
||||
background-color: rgba(0, 0, 0, .4);
|
||||
}
|
||||
|
||||
#powermenu-motherbox,
|
||||
.verification {
|
||||
background-color: $crust;
|
||||
// margin: 162px 288px;
|
||||
border-radius: 25px;
|
||||
opacity: 1;
|
||||
// box-shadow: rgba(0,0,0,0.4)
|
||||
// 10px 10px;
|
||||
margin: 30px;
|
||||
box-shadow: rgba(0, 0, 0, 0.6) 0 0 10px 20px;
|
||||
border: 2px solid $overlay0;
|
||||
}
|
||||
|
||||
.verification {
|
||||
min-height: 158px;
|
||||
min-width: 358px;
|
||||
}
|
||||
|
||||
|
||||
.powermenu-powerbutton {
|
||||
background-color: $red;
|
||||
color: #212228;
|
||||
border-radius: 200px;
|
||||
min-height: 48px;
|
||||
min-width: 48px;
|
||||
font-size: 20px;
|
||||
font-family: "Iosevka";
|
||||
|
||||
&:hover {
|
||||
background-color: $green;
|
||||
font-size: 100px;
|
||||
}
|
||||
|
||||
label {
|
||||
padding-left: 15px;
|
||||
padding-top: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.powermenu-username {
|
||||
background-color: $green;
|
||||
color: #212228;
|
||||
border-radius: 200px;
|
||||
min-height: 48px;
|
||||
font-size: 20px;
|
||||
font-family: "Iosevka";
|
||||
|
||||
label {
|
||||
padding-left: 24px;
|
||||
padding-right: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.powermenu-powerbutton,
|
||||
.powermenu-username {
|
||||
margin: 10px 0px 0px 10px;
|
||||
}
|
||||
|
||||
|
||||
.powermenu-midbox {
|
||||
background-color: $base;
|
||||
color: #FFFFFF;
|
||||
border-radius: 10px;
|
||||
margin: 15px 25px;
|
||||
padding: 10px 25px;
|
||||
font-size: 20px;
|
||||
font-family: "Iosevka";
|
||||
}
|
||||
|
||||
.verification-label {
|
||||
background-color: $base;
|
||||
color: #FFFFFF;
|
||||
border-radius: 10px;
|
||||
margin: 25px 25px;
|
||||
padding: 10px 25px;
|
||||
font-size: 30px;
|
||||
font-family: "Iosevka";
|
||||
}
|
||||
|
||||
#powermenu-topbox {
|
||||
margin: 25px 25px 0px 25px;
|
||||
min-height: 388px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.powermenu-buttonLabel {
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
}
|
||||
|
||||
.powermenu-buttonBox {
|
||||
background-color: $base;
|
||||
padding: 0px;
|
||||
color: #EEEEEF;
|
||||
min-height: 242px;
|
||||
min-width: 242px;
|
||||
border-radius: 10px;
|
||||
margin: 0px 0px 25px 0px;
|
||||
font-size: 100px;
|
||||
border: 2px solid rgba(0, 0, 0, 0);
|
||||
|
||||
label {
|
||||
margin-left: 85px;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
background-color: $blue;
|
||||
color: #1E2127;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border: 2px solid $lavender;
|
||||
background-color: $surface0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.verification-buttonBox {
|
||||
background-color: $base;
|
||||
padding: 0px;
|
||||
color: #EEEEEF;
|
||||
min-height: 60px;
|
||||
min-width: 140px;
|
||||
border-radius: 10px;
|
||||
margin: 0px 0px 25px 0px;
|
||||
font-size: 35px;
|
||||
font-family: "Iosevka";
|
||||
border: 2px solid rgba(0, 0, 0, 0);
|
||||
|
||||
|
||||
&:focus {
|
||||
background-color: $blue;
|
||||
color: #1E2127;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border: 2px solid $lavender;
|
||||
background-color: $surface0;
|
||||
}
|
||||
}
|
||||
|
||||
.powermenu-buttonBoxFirst,
|
||||
.verification-buttonBoxFirst {
|
||||
margin-left: 25px;
|
||||
}
|
||||
|
||||
.powermenu-buttonBoxLast,
|
||||
.verification-buttonBoxLast {
|
||||
margin-right: 25px;
|
||||
}
|
1075
.config/ags/old/scss/_quicksettings.scss
Normal file
11
.config/ags/old/scss/main.scss
Normal file
|
@ -0,0 +1,11 @@
|
|||
@import './mocha';
|
||||
@import './globals';
|
||||
@import './lockscreen';
|
||||
@import './powermenu';
|
||||
@import './dock';
|
||||
@import './overview';
|
||||
@import './notifications';
|
||||
@import './bar';
|
||||
@import './osd';
|
||||
@import './datemenu';
|
||||
@import './quicksettings';
|
49
.config/ags/old/services/asusctl.js
Normal file
|
@ -0,0 +1,49 @@
|
|||
import { sh } from "../lib/utils.js"
|
||||
|
||||
class Asusctl extends Service {
|
||||
static {
|
||||
Service.register(this, {}, {
|
||||
"profile": ["string", "r"],
|
||||
"mode": ["string", "r"],
|
||||
})
|
||||
}
|
||||
|
||||
available = !!Utils.exec("which asusctl")
|
||||
#profile = "Balanced"
|
||||
#mode = "Hybrid"
|
||||
|
||||
async nextProfile() {
|
||||
await sh("asusctl profile -n")
|
||||
const profile = await sh("asusctl profile -p")
|
||||
const p = profile.split(" ")[3]
|
||||
this.#profile = p
|
||||
this.changed("profile")
|
||||
}
|
||||
|
||||
async setProfile(prof) {
|
||||
await sh(`asusctl profile --profile-set ${prof}`)
|
||||
this.#profile = prof
|
||||
this.changed("profile")
|
||||
}
|
||||
|
||||
async nextMode() {
|
||||
await sh(`supergfxctl -m ${this.#mode === "Hybrid" ? "Integrated" : "Hybrid"}`)
|
||||
this.#mode = await sh("supergfxctl -g")
|
||||
this.changed("profile")
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
|
||||
if (this.available) {
|
||||
sh("asusctl profile -p").then(p => this.#profile = p.split(" ")[3])
|
||||
sh("supergfxctl -g").then(m => this.#mode = m)
|
||||
}
|
||||
}
|
||||
|
||||
get profiles() { return ["Performance", "Balanced", "Quiet"] }
|
||||
get profile() { return this.#profile }
|
||||
get mode() { return this.#mode }
|
||||
}
|
||||
|
||||
export default new Asusctl()
|
69
.config/ags/old/services/brightness.js
Normal file
|
@ -0,0 +1,69 @@
|
|||
import { bash, dependencies, sh } from "../lib/utils.js"
|
||||
|
||||
if (!dependencies("brightnessctl"))
|
||||
App.quit()
|
||||
|
||||
const get = (args) => Number(Utils.exec(`brightnessctl ${args}`))
|
||||
const screen = await bash`ls -w1 /sys/class/backlight | head -1`
|
||||
const kbd = await bash`ls -w1 /sys/class/leds | head -1`
|
||||
|
||||
class Brightness extends Service {
|
||||
static {
|
||||
Service.register(this, {}, {
|
||||
"screen": ["float", "rw"],
|
||||
"kbd": ["int", "rw"],
|
||||
})
|
||||
}
|
||||
|
||||
#kbdMax = get(`--device ${kbd} max`)
|
||||
#kbd = get(`--device ${kbd} get`)
|
||||
#screenMax = get("max")
|
||||
#screen = get("get") / get("max")
|
||||
|
||||
get kbd() { return this.#kbd }
|
||||
get screen() { return this.#screen }
|
||||
|
||||
set kbd(value) {
|
||||
if (value < 0 || value > this.#kbdMax)
|
||||
return
|
||||
|
||||
sh(`brightnessctl -d ${kbd} s ${value} -q`).then(() => {
|
||||
this.#kbd = value
|
||||
this.changed("kbd")
|
||||
})
|
||||
}
|
||||
|
||||
set screen(percent) {
|
||||
if (percent < 0)
|
||||
percent = 0
|
||||
|
||||
if (percent > 1)
|
||||
percent = 1
|
||||
|
||||
sh(`brightnessctl set ${Math.floor(percent * 100)}% -q`).then(() => {
|
||||
this.#screen = percent
|
||||
this.changed("screen")
|
||||
})
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
|
||||
const screenPath = `/sys/class/backlight/${screen}/brightness`
|
||||
const kbdPath = `/sys/class/leds/${kbd}/brightness`
|
||||
|
||||
Utils.monitorFile(screenPath, async f => {
|
||||
const v = await Utils.readFileAsync(f)
|
||||
this.#screen = Number(v) / this.#screenMax
|
||||
this.changed("screen")
|
||||
})
|
||||
|
||||
Utils.monitorFile(kbdPath, async f => {
|
||||
const v = await Utils.readFileAsync(f)
|
||||
this.#kbd = Number(v) / this.#kbdMax
|
||||
this.changed("kbd")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default new Brightness()
|
21
.config/ags/old/services/clock.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
const { GLib } = imports.gi;
|
||||
class ClockService extends Service {
|
||||
static {
|
||||
Service.register ( this, {}, {
|
||||
'time': ['gobject']
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
#time = GLib.DateTime.new_now_local()
|
||||
|
||||
get time() { return this.#time; }
|
||||
constructor() {
|
||||
super()
|
||||
Utils.interval(1000, () => {
|
||||
this.#time = GLib.DateTime.new_now_local()
|
||||
this.changed("time")
|
||||
})
|
||||
}
|
||||
}
|
||||
export default new ClockService()
|
57
.config/ags/old/services/colorpicker.js
Normal file
|
@ -0,0 +1,57 @@
|
|||
import icons from "../lib/icons.js"
|
||||
import { bash, dependencies } from "../lib/utils.js"
|
||||
|
||||
const COLORS_CACHE = Utils.CACHE_DIR + "/colorpicker.json"
|
||||
const MAX_NUM_COLORS = 10
|
||||
|
||||
class ColorPicker extends Service {
|
||||
static {
|
||||
Service.register(this, {}, {
|
||||
"colors": ["jsobject"],
|
||||
})
|
||||
}
|
||||
|
||||
notifID = 0
|
||||
#colors = JSON.parse(Utils.readFile(COLORS_CACHE) || "[]")
|
||||
|
||||
get colors() { return [...this.#colors] }
|
||||
set colors(colors) {
|
||||
this.#colors = colors
|
||||
this.changed("colors")
|
||||
}
|
||||
|
||||
// TODO: doesn't work?
|
||||
async wlCopy(color) {
|
||||
if (dependencies("wl-copy"))
|
||||
bash(`wl-copy ${color}`)
|
||||
}
|
||||
|
||||
async pick() {
|
||||
if (!dependencies("hyprpicker"))
|
||||
return
|
||||
|
||||
const color = await bash("hyprpicker -a -r")
|
||||
if (!color)
|
||||
return
|
||||
|
||||
colorpicker.wlCopy(color)
|
||||
const list = colorpicker.colors
|
||||
if (!list.includes(color)) {
|
||||
list.push(color)
|
||||
if (list.length > MAX_NUM_COLORS)
|
||||
list.shift()
|
||||
|
||||
colorpicker.colors = list
|
||||
Utils.writeFile(JSON.stringify(list, null, 2), COLORS_CACHE)
|
||||
}
|
||||
|
||||
colorpicker.notifID = await Utils.notify({
|
||||
id: colorpicker.notifID,
|
||||
iconName: icons.ui.colorpicker,
|
||||
summary: color,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const colorpicker = new ColorPicker
|
||||
export default colorpicker
|
43
.config/ags/old/services/powermenu.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
import options from '../options.js';
|
||||
// const { sleep, reboot, logout, shutdown } = options.powermenu
|
||||
|
||||
// export type Action = "sleep" | "reboot" | "logout" | "shutdown"
|
||||
|
||||
class PowerMenu extends Service {
|
||||
static {
|
||||
Service.register(this, {}, {
|
||||
"title": ["string"],
|
||||
"cmd": ["string"],
|
||||
})
|
||||
}
|
||||
|
||||
#title = ""
|
||||
#cmd = ""
|
||||
|
||||
get title() { return this.#title }
|
||||
get cmd() { return this.#cmd }
|
||||
|
||||
action(action) {
|
||||
[this.#cmd, this.#title] = {
|
||||
sleep: [options.powermenu.sleep, "Sleep"],
|
||||
reboot: [options.powermenu.reboot, "Reboot"],
|
||||
logout: [options.powermenu.logout, "Log Out"],
|
||||
shutdown: [options.powermenu.shutdown, "Shutdown"],
|
||||
lock: [options.powermenu.lock, "Lock"],
|
||||
}[action]
|
||||
|
||||
this.notify("cmd")
|
||||
this.notify("title")
|
||||
this.emit("changed")
|
||||
App.closeWindow("powermenu")
|
||||
App.openWindow("verification")
|
||||
}
|
||||
|
||||
shutdown = () => {
|
||||
this.action("shutdown")
|
||||
}
|
||||
}
|
||||
|
||||
const powermenu = new PowerMenu
|
||||
globalThis["powermenu"] = powermenu
|
||||
export default powermenu
|
93
.config/ags/old/services/screenrecord.js
Normal file
|
@ -0,0 +1,93 @@
|
|||
import GLib from "gi://GLib"
|
||||
import icons from "../lib/icons.js"
|
||||
import { dependencies, sh, bash } from "../lib/utils.js"
|
||||
|
||||
const now = () => GLib.DateTime.new_now_local().format("%Y-%m-%d_%H-%M-%S")
|
||||
|
||||
class Recorder extends Service {
|
||||
static {
|
||||
Service.register(this, {}, {
|
||||
"timer": ["int"],
|
||||
"recording": ["boolean"],
|
||||
})
|
||||
}
|
||||
|
||||
#recordings = Utils.HOME + "/Videos/Screencasting"
|
||||
#screenshots = Utils.HOME + "/Pictures/Screenshots"
|
||||
#file = ""
|
||||
#interval = 0
|
||||
|
||||
recording = false
|
||||
timer = 0
|
||||
|
||||
async start() {
|
||||
if (!dependencies("slurp", "wf-recorder"))
|
||||
return
|
||||
|
||||
if (this.recording)
|
||||
return
|
||||
|
||||
Utils.ensureDirectory(this.#recordings)
|
||||
this.#file = `${this.#recordings}/${now()}.mp4`
|
||||
sh(`wf-recorder -g ${await sh("slurp")} -f ${this.#file} --pixel-format yuv420p`)
|
||||
|
||||
this.recording = true
|
||||
this.changed("recording")
|
||||
|
||||
this.timer = 0
|
||||
this.#interval = Utils.interval(1000, () => {
|
||||
this.changed("timer")
|
||||
this.timer++
|
||||
})
|
||||
}
|
||||
|
||||
async stop() {
|
||||
if (!this.recording)
|
||||
return
|
||||
|
||||
await bash("killall -INT wf-recorder")
|
||||
this.recording = false
|
||||
this.changed("recording")
|
||||
GLib.source_remove(this.#interval)
|
||||
|
||||
Utils.notify({
|
||||
iconName: icons.fallback.video,
|
||||
summary: "Screenrecord",
|
||||
body: this.#file,
|
||||
actions: {
|
||||
"Show in Files": () => sh(`xdg-open ${this.#recordings}`),
|
||||
"View": () => sh(`xdg-open ${this.#file}`),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
async screenshot(full = false) {
|
||||
if (!dependencies("slurp", "wayshot"))
|
||||
return
|
||||
|
||||
const file = `${this.#screenshots}/${now()}.png`
|
||||
Utils.ensureDirectory(this.#screenshots)
|
||||
|
||||
const wayshot = `wayshot -f ${file} ${full ? "" : `-s "${await sh("slurp")}"`}`
|
||||
await sh(wayshot)
|
||||
bash(`wl-copy < ${file}`)
|
||||
|
||||
Utils.notify({
|
||||
image: file,
|
||||
summary: "Screenshot",
|
||||
body: this.#file,
|
||||
actions: {
|
||||
"Show in Files": () => sh(`xdg-open ${this.#screenshots}`),
|
||||
"View": () => sh(`xdg-open ${file}`),
|
||||
"Edit": () => {
|
||||
if (!dependencies("swappy"))
|
||||
sh(`swappy, -f ${file}`)
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const recorder = new Recorder
|
||||
globalThis["recorder"] = recorder
|
||||
export default recorder
|
1
.config/ags/old/symlink_types
Normal file
|
@ -0,0 +1 @@
|
|||
/usr/share/com.github.Aylur.ags/types
|
25
.config/ags/old/test.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
import PopupWindow from "./modules/PopupWindow.js";
|
||||
|
||||
|
||||
export default () => PopupWindow({
|
||||
|
||||
name: "test",
|
||||
exclusivity: "ignore",
|
||||
// transition: "slide_left", //bar.position === "top" ? "slide_down" : "slide_up",
|
||||
// anchor: ["top"],
|
||||
layout: "right",
|
||||
// anchor: ["right", "bottom", "top"],
|
||||
child: Widget.Label({
|
||||
label: "No sex",
|
||||
css: `background-color: #0e0e0e;
|
||||
border: 2px solid #FFFFFF;`,
|
||||
// vpack: "fill",
|
||||
// hpack: "fill",
|
||||
vexpand: true,
|
||||
hexpand: true,
|
||||
}),
|
||||
// vpack: "fill",
|
||||
// hpack: "fill",
|
||||
vexpand: true,
|
||||
hexpand: true,
|
||||
})
|
18
.config/ags/old/tsconfig.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"lib": [
|
||||
"ES2022"
|
||||
],
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"strict": true,
|
||||
"noImplicitAny": false,
|
||||
"baseUrl": ".",
|
||||
"typeRoots": [
|
||||
"./types"
|
||||
],
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|