moved to personal fennel config for awesome and added qutebrowser
71
awes2/widget/screen-recorder/icons/audio.svg
Normal file
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 240 240"
|
||||
xml:space="preserve"
|
||||
width="240"
|
||||
height="240"
|
||||
sodipodi:docname="audio.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"><metadata
|
||||
id="metadata21"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs19" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
id="namedview17"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:zoom="0.4609375"
|
||||
inkscape:cx="256"
|
||||
inkscape:cy="256"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="Capa_1" /><g
|
||||
id="g14"
|
||||
transform="matrix(0.390625,0,0,0.390625,20,20)"><g
|
||||
id="g6">
|
||||
<g
|
||||
id="g4">
|
||||
<path
|
||||
d="m 431.666,239.934 c 0,-8.284 -6.717,-15 -15,-15 -8.285,0 -15,6.716 -15,15 0,80.32 -65.346,145.666 -145.666,145.666 -80.32,0 -145.666,-65.346 -145.666,-145.666 0,-8.284 -6.717,-15 -15,-15 -8.285,0 -15,6.716 -15,15 0,91.809 70.799,167.383 160.666,175.02 V 482 h -33.199 c -8.285,0 -15,6.716 -15,15 0,8.284 6.715,15 15,15 h 96.4 c 8.283,0 15,-6.716 15,-15 0,-8.284 -6.717,-15 -15,-15 H 271 v -67.047 c 89.867,-7.637 160.666,-83.211 160.666,-175.019 z"
|
||||
data-original="#000000"
|
||||
class="active-path"
|
||||
data-old_color="#000000"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
</g>
|
||||
</g><g
|
||||
id="g12">
|
||||
<g
|
||||
id="g10">
|
||||
<path
|
||||
d="m 256,0 c -43.707,0 -79.266,35.559 -79.266,79.266 v 160.668 c 0,43.707 35.559,79.265 79.266,79.265 43.709,0 79.268,-35.559 79.268,-79.266 V 79.266 C 335.268,35.559 299.709,0 256,0 Z"
|
||||
data-original="#000000"
|
||||
class="active-path"
|
||||
data-old_color="#000000"
|
||||
id="path8"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
</g>
|
||||
</g></g> </svg>
|
After Width: | Height: | Size: 2.5 KiB |
57
awes2/widget/screen-recorder/icons/back.svg
Normal file
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="240"
|
||||
height="240"
|
||||
viewBox="0 0 240 240"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="ic_chevron_left_48px.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:zoom="0.86915209"
|
||||
inkscape:cx="-182.41294"
|
||||
inkscape:cy="-30.651111"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="M 181.79166,43.583333 158.20833,20 58.208335,120 158.20833,220 181.79166,196.41667 105.375,120 Z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="stroke-width:8.33333302;fill:#ffffff;fill-opacity:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
1
awes2/widget/screen-recorder/icons/close-screen.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="240" height="240" viewBox="0 0 24 24"><path fill="#ffffff" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>
|
After Width: | Height: | Size: 421 B |
68
awes2/widget/screen-recorder/icons/recorder-countdown.svg
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="240mm"
|
||||
height="240mm"
|
||||
viewBox="0 0 240 240"
|
||||
version="1.1"
|
||||
id="svg906"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||
sodipodi:docname="recorder-countdown.svg">
|
||||
<defs
|
||||
id="defs900" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.60460731"
|
||||
inkscape:cx="245.64249"
|
||||
inkscape:cy="505.04802"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata903">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-57)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke-width:0.2583026"
|
||||
d="M 119.99991,76.999813 A 100,100 0 0 0 19.999813,176.99991 100,100 0 0 0 119.99991,277 100,100 0 0 0 220,176.99991 100,100 0 0 0 119.99991,76.999813 Z m 0,25.000027 c 41.2733,0 75.00007,33.72677 75.00007,75.00007 0,41.2733 -33.72677,75.00007 -75.00007,75.00007 -41.273299,0 -75.000075,-33.72677 -75.000075,-75.00007 0,-41.2733 33.726776,-75.00007 75.000075,-75.00007 z"
|
||||
id="path858" />
|
||||
<path
|
||||
style="fill:#53e2ae;fill-opacity:1;fill-rule:evenodd;stroke-width:0.2583026"
|
||||
d="m 120,126.99995 c -27.762298,0 -50.000048,22.23776 -50.000048,50.00006 0,27.7623 22.23775,50.00004 50.000048,50.00004 27.7623,0 50.00005,-22.23774 50.00005,-50.00004 0,-27.7623 -22.23775,-50.00006 -50.00005,-50.00006 z"
|
||||
id="path1456"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
63
awes2/widget/screen-recorder/icons/recorder-off.svg
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="240mm"
|
||||
height="240mm"
|
||||
viewBox="0 0 240 240"
|
||||
version="1.1"
|
||||
id="svg906"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||
sodipodi:docname="recorder-off.svg">
|
||||
<defs
|
||||
id="defs900" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.35"
|
||||
inkscape:cx="721.80219"
|
||||
inkscape:cy="560"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata903">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-57)">
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke-width:0.97626179"
|
||||
d="M 453.54297 75.589844 A 377.95276 377.95276 0 0 0 75.589844 453.54297 A 377.95276 377.95276 0 0 0 453.54297 831.49609 A 377.95276 377.95276 0 0 0 831.49609 453.54297 A 377.95276 377.95276 0 0 0 453.54297 75.589844 z M 453.54297 179.52734 C 604.43002 179.52734 727.55859 302.65591 727.55859 453.54297 C 727.55859 604.43002 604.43002 727.55859 453.54297 727.55859 C 302.65592 727.55859 179.52734 604.43002 179.52734 453.54297 C 179.52734 302.65591 302.65592 179.52734 453.54297 179.52734 z M 453.54297 255.11719 C 343.50809 255.11719 255.11719 343.50807 255.11719 453.54297 C 255.11719 563.57787 343.50809 651.96875 453.54297 651.96875 C 563.57787 651.96875 651.96875 563.57787 651.96875 453.54297 C 651.96875 343.50807 563.57787 255.11719 453.54297 255.11719 z "
|
||||
transform="matrix(0.26458333,0,0,0.26458333,0,57)"
|
||||
id="path1456" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
71
awes2/widget/screen-recorder/icons/recorder-on.svg
Normal file
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="240mm"
|
||||
height="240mm"
|
||||
viewBox="0 0 240 240"
|
||||
version="1.1"
|
||||
id="svg906"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||
sodipodi:docname="recorder-on.svg">
|
||||
<defs
|
||||
id="defs900" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.60460731"
|
||||
inkscape:cx="560.72303"
|
||||
inkscape:cy="505.04802"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata903">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-57)">
|
||||
<g
|
||||
id="g882">
|
||||
<path
|
||||
id="path858"
|
||||
transform="matrix(0.26458333,0,0,0.26458333,0,57)"
|
||||
d="M 453.54297 75.589844 A 377.95276 377.95276 0 0 0 75.589844 453.54297 A 377.95276 377.95276 0 0 0 453.54297 831.49609 A 377.95276 377.95276 0 0 0 831.49609 453.54297 A 377.95276 377.95276 0 0 0 453.54297 75.589844 z M 453.54297 170.07812 C 609.53654 170.07813 737.00781 297.54939 737.00781 453.54297 C 737.00781 609.53654 609.53654 737.00781 453.54297 737.00781 C 297.5494 737.00781 170.07812 609.53654 170.07812 453.54297 C 170.07812 297.54939 297.5494 170.07812 453.54297 170.07812 z "
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke-width:0.97626179" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1456"
|
||||
d="m 120,126.99995 c -27.762298,0 -50.000048,22.23776 -50.000048,50.00006 0,27.7623 22.23775,50.00004 50.000048,50.00004 27.7623,0 50.00005,-22.23774 50.00005,-50.00004 0,-27.7623 -22.23775,-50.00006 -50.00005,-50.00006 z"
|
||||
style="fill:#ee4f84;fill-opacity:1;fill-rule:evenodd;stroke-width:0.2583026" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.7 KiB |
86
awes2/widget/screen-recorder/icons/recording-button.svg
Normal file
|
@ -0,0 +1,86 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Layer_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 426.667 426.667"
|
||||
style="enable-background:new 0 0 426.667 426.667;"
|
||||
xml:space="preserve"
|
||||
width="512px"
|
||||
height="512px"
|
||||
class=""
|
||||
sodipodi:docname="recording.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"><metadata
|
||||
id="metadata27"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs25" /><sodipodi:namedview
|
||||
pagecolor="#252525"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="1"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="742"
|
||||
id="namedview23"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.4609375"
|
||||
inkscape:cx="256"
|
||||
inkscape:cy="256"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="26"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="Layer_1" /><g
|
||||
id="g6">
|
||||
<g
|
||||
id="g4">
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path2"
|
||||
data-old_color="#000000"
|
||||
class="active-path"
|
||||
data-original="#000000"
|
||||
d="M 213.333,0 C 95.513,0 0,95.513 0,213.333 c 0,117.82 95.513,213.333 213.333,213.333 117.82,0 213.333,-95.513 213.333,-213.333 C 426.666,95.513 331.154,0 213.333,0 Z m 0,387.413 c -96.142,0 -174.08,-77.938 -174.08,-174.08 0,-96.142 77.938,-174.08 174.08,-174.08 96.093,0.118 173.962,77.987 174.08,174.08 0,96.142 -77.938,174.08 -174.08,174.08 z" />
|
||||
</g>
|
||||
</g><g
|
||||
id="g12"
|
||||
style="fill:#ee4f84;fill-opacity:1">
|
||||
<g
|
||||
id="g10"
|
||||
style="fill:#ee4f84;fill-opacity:1">
|
||||
<circle
|
||||
style="fill:#ee4f84;fill-opacity:1"
|
||||
id="circle8"
|
||||
data-old_color="#000000"
|
||||
class="active-path"
|
||||
data-original="#000000"
|
||||
r="64"
|
||||
cy="213.33299"
|
||||
cx="213.33299" />
|
||||
</g>
|
||||
</g><g
|
||||
id="g18">
|
||||
<g
|
||||
id="g16">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ee4f84;fill-opacity:1"
|
||||
id="path14"
|
||||
data-old_color="#000000"
|
||||
class="active-path"
|
||||
data-original="#000000"
|
||||
d="M 213.333,128 C 166.205,128 128,166.205 128,213.333 c 0,47.128 38.205,85.333 85.333,85.333 47.128,0 85.333,-38.205 85.333,-85.333 0,-47.128 -38.204,-85.333 -85.333,-85.333 z m 0,128 c -23.564,0 -42.667,-19.103 -42.667,-42.667 0,-23.564 19.103,-42.667 42.667,-42.667 23.564,0 42.667,19.103 42.667,42.667 C 256,236.897 236.897,256 213.333,256 Z" />
|
||||
</g>
|
||||
</g> </svg>
|
After Width: | Height: | Size: 2.9 KiB |
57
awes2/widget/screen-recorder/icons/settings.svg
Normal file
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="240"
|
||||
height="240"
|
||||
viewBox="0 0 240 240"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="ic_settings_48px.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:zoom="2.4583333"
|
||||
inkscape:cx="113.59335"
|
||||
inkscape:cy="135.94651"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="m 194.275,129.75 c 0.4,-3.2 0.7,-6.45 0.7,-9.75 0,-3.3 -0.3,-6.55 -0.7,-9.75 l 21.15,-16.55 c 1.9,-1.5 2.45,-4.2 1.2,-6.4 l -20,-34.65 c -1.25,-2.15 -3.85,-3.05 -6.1,-2.15 l -24.9,10.05 c -5.15,-3.95 -10.8,-7.3 -16.9,-9.85 l -3.75,-26.5 c -0.45,-2.35 -2.5,-4.2 -5,-4.2 h -40 c -2.5,0 -4.55,1.85 -4.95,4.2 l -3.75,26.5 c -6.1,2.55 -11.75,5.85 -16.9,9.85 L 49.475,50.5 c -2.25,-0.85 -4.85,0 -6.1,2.15 l -20,34.65 c -1.25,2.15 -0.7,4.85 1.2,6.4 l 21.1,16.55 c -0.4,3.2 -0.7,6.45 -0.7,9.75 0,3.3 0.3,6.55 0.7,9.75 l -21.1,16.55 c -1.9,1.5 -2.45,4.2 -1.2,6.4 l 20,34.65 c 1.25,2.15 3.85,3.05 6.1,2.15 l 24.9,-10.05 c 5.15,3.95 10.8,7.3 16.9,9.85 l 3.75,26.5 c 0.4,2.35 2.45,4.2 4.95,4.2 h 40 c 2.5,0 4.55,-1.85 4.95,-4.2 l 3.75,-26.5 c 6.1,-2.55 11.75,-5.85 16.9,-9.85 l 24.9,10.05 c 2.25,0.85 4.85,0 6.1,-2.15 l 20,-34.65 c 1.25,-2.15 0.7,-4.85 -1.2,-6.4 z m -74.3,25.25 c -19.35,0 -35,-15.65 -35,-35 0,-19.35 15.65,-35 35,-35 19.35,0 35,15.65 35,35 0,19.35 -15.65,35 -35,35 z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="stroke-width:5;fill:#ffffff;fill-opacity:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 426.667 426.667" style="enable-background:new 0 0 426.667 426.667;" xml:space="preserve" width="512px" height="512px" class=""><g><g>
|
||||
<g>
|
||||
<path d="M213.333,0C95.513,0,0,95.513,0,213.333s95.513,213.333,213.333,213.333s213.333-95.513,213.333-213.333 S331.154,0,213.333,0z M213.333,387.413c-96.142,0-174.08-77.938-174.08-174.08s77.938-174.08,174.08-174.08 c96.093,0.118,173.962,77.987,174.08,174.08C387.413,309.475,309.475,387.413,213.333,387.413z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#FFFFFF"/>
|
||||
</g>
|
||||
</g><g>
|
||||
<g>
|
||||
<circle cx="213.333" cy="213.333" r="64" data-original="#000000" class="active-path" data-old_color="#000000" fill="#FFFFFF"/>
|
||||
</g>
|
||||
</g><g>
|
||||
<g>
|
||||
<path d="M213.333,128C166.205,128,128,166.205,128,213.333s38.205,85.333,85.333,85.333s85.333-38.205,85.333-85.333 S260.462,128,213.333,128z M213.333,256c-23.564,0-42.667-19.103-42.667-42.667s19.103-42.667,42.667-42.667 S256,189.769,256,213.333S236.897,256,213.333,256z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#FFFFFF"/>
|
||||
</g>
|
||||
</g></g> </svg>
|
After Width: | Height: | Size: 1.2 KiB |
23
awes2/widget/screen-recorder/init.lua
Normal file
|
@ -0,0 +1,23 @@
|
|||
local wibox = require('wibox')
|
||||
local awful = require('awful')
|
||||
local gears = require('gears')
|
||||
|
||||
local clickable_container = require('widget.clickable-container')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
local HOME = os.getenv('HOME')
|
||||
|
||||
local recorder_table = require('widget.screen-recorder.screen-recorder-ui')
|
||||
|
||||
require('widget.screen-recorder.screen-recorder-ui-backend')
|
||||
|
||||
local screen_rec_toggle_button = recorder_table.screen_rec_toggle_button
|
||||
|
||||
|
||||
local return_button = function()
|
||||
|
||||
return screen_rec_toggle_button
|
||||
|
||||
end
|
||||
|
||||
return return_button
|
10
awes2/widget/screen-recorder/screen-recorder-config.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
local user_preferences = {}
|
||||
|
||||
user_preferences.user_resolution = '1366x768' -- Screen WIDTHxHEIGHT
|
||||
user_preferences.user_offset = '0,0' -- Offset x,y
|
||||
user_preferences.user_audio = false -- bool true or false
|
||||
user_preferences.user_save_directory = '$(xdg-user-dir VIDEOS)/Recordings/' -- String $HOME
|
||||
user_preferences.user_mic_lvl = '20' -- String
|
||||
user_preferences.user_fps = '30' -- String
|
||||
|
||||
return user_preferences
|
172
awes2/widget/screen-recorder/screen-recorder-scripts.lua
Normal file
|
@ -0,0 +1,172 @@
|
|||
local awful = require('awful')
|
||||
local naughty = require('naughty')
|
||||
|
||||
local user_config = require('widget.screen-recorder.screen-recorder-config')
|
||||
|
||||
local scripts_tbl = {}
|
||||
|
||||
local ffmpeg_pid = nil
|
||||
|
||||
-- Get user settings
|
||||
scripts_tbl.user_resolution = user_config.user_resolution
|
||||
scripts_tbl.user_offset = user_config.user_offset
|
||||
scripts_tbl.user_audio = user_config.user_audio
|
||||
scripts_tbl.user_dir = user_config.user_save_directory
|
||||
scripts_tbl.user_mic_lvl = user_config.user_mic_lvl
|
||||
scripts_tbl.user_fps = user_config.user_fps
|
||||
|
||||
scripts_tbl.update_user_settings = function(res, offset, audio)
|
||||
scripts_tbl.user_resolution = res
|
||||
scripts_tbl.user_offset = offset
|
||||
scripts_tbl.user_audio = audio
|
||||
end
|
||||
|
||||
scripts_tbl.check_settings = function()
|
||||
-- For debugging purpose only
|
||||
-- naughty.notification({
|
||||
-- message=scripts_tbl.user_resolution .. ' ' .. scripts_tbl.user_offset .. tostring(scripts_tbl.user_audio)
|
||||
-- })
|
||||
end
|
||||
|
||||
local create_save_directory = function()
|
||||
|
||||
local create_dir_cmd = [[
|
||||
dir=]] .. scripts_tbl.user_dir .. [[
|
||||
|
||||
if [ ! -d $dir ]; then
|
||||
mkdir -p $dir
|
||||
fi
|
||||
]]
|
||||
|
||||
awful.spawn.easy_async_with_shell(
|
||||
create_dir_cmd,
|
||||
function(stdout) end
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
create_save_directory()
|
||||
|
||||
local kill_existing_recording_ffmpeg = function()
|
||||
-- Let's killall ffmpeg instance first after awesome (re)-starts if there's any
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
ps x | grep "ffmpeg -video_size" | grep -v grep | awk '{print $1}' | xargs kill
|
||||
]],
|
||||
function(stdout) end
|
||||
)
|
||||
end
|
||||
|
||||
kill_existing_recording_ffmpeg()
|
||||
|
||||
local turn_on_the_mic = function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
amixer set Capture cap
|
||||
amixer set Capture ]].. scripts_tbl.user_mic_lvl ..[[%
|
||||
]],
|
||||
function() end
|
||||
)
|
||||
end
|
||||
|
||||
local ffmpeg_stop_recording = function()
|
||||
awesome.kill(
|
||||
ffmpeg_pid, awesome.unix_signal.SIGINT
|
||||
)
|
||||
end
|
||||
|
||||
local create_notification = function(file_dir)
|
||||
local open_video = naughty.action {
|
||||
name = 'Open',
|
||||
icon_only = false,
|
||||
}
|
||||
|
||||
local delete_video = naughty.action {
|
||||
name = 'Delete',
|
||||
icon_only = false,
|
||||
}
|
||||
|
||||
open_video:connect_signal(
|
||||
'invoked',
|
||||
function()
|
||||
awful.spawn('xdg-open ' .. file_dir, false)
|
||||
end
|
||||
)
|
||||
|
||||
delete_video:connect_signal(
|
||||
'invoked',
|
||||
function()
|
||||
awful.spawn('gio trash ' .. file_dir, false)
|
||||
end
|
||||
)
|
||||
|
||||
naughty.notification ({
|
||||
app_name = 'Screenshot Recorder',
|
||||
timeout = 60,
|
||||
title = '<b>Recording Finished!</b>',
|
||||
message = 'Recording can now be viewed.',
|
||||
actions = { open_video, delete_video }
|
||||
})
|
||||
end
|
||||
|
||||
local ffmpeg_start_recording = function(audio, filename)
|
||||
|
||||
local add_audio_str = ' '
|
||||
|
||||
if audio then
|
||||
turn_on_the_mic()
|
||||
add_audio_str = ' -f pulse -ac 2 -i default '
|
||||
end
|
||||
|
||||
ffmpeg_pid = awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
file_name=]] .. filename .. [[
|
||||
|
||||
ffmpeg -video_size ]] .. scripts_tbl.user_resolution .. [[ -framerate ]] .. scripts_tbl.user_fps .. [[ -f x11grab \
|
||||
-i :0.0+]] .. scripts_tbl.user_offset .. add_audio_str .. [[ $file_name
|
||||
]],
|
||||
function(stdout, stderr)
|
||||
|
||||
if stderr and stderr:match('Invalid argument') then
|
||||
naughty.notification({
|
||||
app_name = 'Screen Recorder',
|
||||
title = '<b>Invalid Configuration!</b>',
|
||||
message = 'Please, put a valid settings!',
|
||||
timeout = 60,
|
||||
urgency = 'normal'
|
||||
})
|
||||
awesome.emit_signal('widget::screen_recorder')
|
||||
return
|
||||
end
|
||||
create_notification(filename)
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
local create_unique_filename = function(audio)
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
dir=]] .. scripts_tbl.user_dir .. [[
|
||||
date=$(date '+%Y-%m-%d_%H-%M-%S')
|
||||
format=.mp4
|
||||
|
||||
echo ${dir}${date}${format} | tr -d '\n'
|
||||
]],
|
||||
function(stdout)
|
||||
local filename = stdout
|
||||
ffmpeg_start_recording(audio, filename)
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
scripts_tbl.start_recording = function(audio_mode)
|
||||
create_save_directory()
|
||||
create_unique_filename(audio_mode)
|
||||
end
|
||||
|
||||
scripts_tbl.stop_recording = function()
|
||||
ffmpeg_stop_recording()
|
||||
end
|
||||
|
||||
|
||||
return scripts_tbl
|
597
awes2/widget/screen-recorder/screen-recorder-ui-backend.lua
Normal file
|
@ -0,0 +1,597 @@
|
|||
local wibox = require('wibox')
|
||||
local awful = require('awful')
|
||||
local gears = require('gears')
|
||||
local naughty = require('naughty')
|
||||
local beautiful = require('beautiful')
|
||||
|
||||
local dpi = beautiful.xresources.apply_dpi
|
||||
|
||||
local config_dir = gears.filesystem.get_configuration_dir()
|
||||
local widget_icon_dir = config_dir .. 'widget/screen-recorder/icons/'
|
||||
|
||||
-- The screen-recorders scripting
|
||||
local screen_rec_backend = require('widget.screen-recorder.screen-recorder-scripts')
|
||||
|
||||
|
||||
-- The screen-recorder's UI
|
||||
local screen_rec_ui = require('widget.screen-recorder.screen-recorder-ui')
|
||||
|
||||
|
||||
-- User Preferences
|
||||
|
||||
local sr_user_resolution = screen_rec_backend.user_resolution
|
||||
local sr_user_offset = screen_rec_backend.user_offset
|
||||
local sr_user_audio = screen_rec_backend.user_audio
|
||||
local sr_user_update = screen_rec_backend.update_user_settings
|
||||
|
||||
-- Panel UIs
|
||||
|
||||
local sr_toggle_imgbox = screen_rec_ui.screen_rec_toggle_imgbox
|
||||
local sr_toggle_button = screen_rec_ui.screen_rec_toggle_button
|
||||
local sr_countdown_text = screen_rec_ui.screen_rec_countdown_txt
|
||||
local sr_main_imgbox = screen_rec_ui.screen_rec_main_imgbox
|
||||
local sr_main_button = screen_rec_ui.screen_rec_main_button
|
||||
local sr_audio_imgbox = screen_rec_ui.screen_rec_audio_imgbox
|
||||
local sr_audio_button = screen_rec_ui.screen_rec_audio_button
|
||||
local sr_settings_button = screen_rec_ui.screen_rec_settings_button
|
||||
local sr_close_button = screen_rec_ui.screen_rec_close_button
|
||||
|
||||
|
||||
-- Settings UIs
|
||||
|
||||
local sr_back_button = screen_rec_ui.screen_rec_back_button
|
||||
|
||||
local sr_resolution_box = screen_rec_ui.screen_rec_res_txtbox
|
||||
local sr_offset_box = screen_rec_ui.screen_rec_offset_txtbox
|
||||
|
||||
local sr_resolution_tbox = sr_resolution_box:get_children_by_id('res_tbox')[1]
|
||||
local sr_offset_tbox = sr_offset_box:get_children_by_id('offset_tbox')[1]
|
||||
|
||||
|
||||
-- Main Scripts
|
||||
|
||||
local sr_start_recording = screen_rec_backend.start_recording
|
||||
local sr_stop_recording = screen_rec_backend.stop_recording
|
||||
|
||||
|
||||
-- Active Screen Recorder
|
||||
local sr_screen = nil
|
||||
|
||||
|
||||
-- Active textbox
|
||||
local sr_active_tbox = nil
|
||||
|
||||
|
||||
-- Status variables
|
||||
|
||||
local status_countdown = false
|
||||
local status_recording = false
|
||||
|
||||
local status_audio = sr_user_audio
|
||||
|
||||
|
||||
-- Update UI on startup using the user config
|
||||
|
||||
sr_resolution_tbox:set_markup('<span foreground="#FFFFFF66">' .. sr_user_resolution .. "</span>")
|
||||
sr_offset_tbox:set_markup('<span foreground="#FFFFFF66">' .. sr_user_offset .. "</span>")
|
||||
|
||||
local sr_res_default_markup = sr_resolution_tbox:get_markup()
|
||||
local sr_offset_default_markup = sr_offset_tbox:get_markup()
|
||||
|
||||
|
||||
if status_audio then
|
||||
sr_audio_button.bg = '#EE4F84' .. '66'
|
||||
else
|
||||
sr_audio_button.bg = beautiful.groups_bg
|
||||
end
|
||||
|
||||
|
||||
-- Textbox ui manipulators
|
||||
|
||||
local emphasize_inactive_tbox = function()
|
||||
if sr_active_tbox == 'res_tbox' then
|
||||
|
||||
sr_resolution_box.shape_border_width = dpi(0)
|
||||
sr_resolution_box.shape_border_color = beautiful.transparent
|
||||
|
||||
elseif sr_active_tbox == 'offset_tbox' then
|
||||
|
||||
sr_offset_box.shape_border_width = dpi(0)
|
||||
sr_offset_box.shape_border_color = beautiful.transparent
|
||||
end
|
||||
|
||||
sr_active_tbox = nil
|
||||
end
|
||||
|
||||
local emphasize_active_tbox = function()
|
||||
|
||||
if sr_active_tbox == 'res_tbox' then
|
||||
|
||||
sr_resolution_box.border_width = dpi(1)
|
||||
sr_resolution_box.border_color = '#F2F2F2AA'
|
||||
|
||||
elseif sr_active_tbox == 'offset_tbox' then
|
||||
|
||||
sr_offset_box.border_width = dpi(1)
|
||||
sr_offset_box.border_color = '#F2F2F2AA'
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
-- Delete, reset and write to the textbox
|
||||
|
||||
local write_to_textbox = function(char)
|
||||
|
||||
-- naughty.notification({message=sr_active_tbox})
|
||||
|
||||
if sr_active_tbox == 'res_tbox' and (char:match('%d') or char == 'x') then
|
||||
|
||||
if sr_resolution_tbox:get_markup() == sr_res_default_markup then
|
||||
sr_resolution_tbox:set_text('')
|
||||
end
|
||||
|
||||
if tonumber(#sr_resolution_tbox:get_text()) <= 8 then
|
||||
sr_resolution_tbox:set_text(sr_resolution_tbox:get_text() .. char)
|
||||
end
|
||||
|
||||
elseif sr_active_tbox == 'offset_tbox' and (char:match('%d') or char == ',') then
|
||||
|
||||
if sr_offset_tbox:get_markup() == sr_offset_default_markup then
|
||||
sr_offset_tbox:set_text('')
|
||||
end
|
||||
|
||||
sr_offset_tbox:set_text(sr_offset_tbox:get_text() .. char)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local reset_textbox = function()
|
||||
|
||||
if sr_active_tbox == 'res_tbox' then
|
||||
|
||||
sr_resolution_tbox:set_markup(sr_res_default_markup)
|
||||
|
||||
elseif sr_active_tbox == 'offset_tbox' then
|
||||
|
||||
sr_offset_tbox:set_markup(sr_offset_default_markup)
|
||||
|
||||
end
|
||||
|
||||
emphasize_inactive_tbox()
|
||||
|
||||
end
|
||||
|
||||
|
||||
-- Set audio mode
|
||||
|
||||
|
||||
local sr_audio_mode = function()
|
||||
|
||||
if not status_recording and not status_countdown then
|
||||
|
||||
-- screen_rec_audio_button
|
||||
|
||||
if status_audio then
|
||||
|
||||
status_audio = false
|
||||
|
||||
sr_audio_button.bg = beautiful.groups_bg
|
||||
|
||||
else
|
||||
|
||||
status_audio = true
|
||||
|
||||
sr_audio_button.bg = '#EE4F84' .. '66'
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
local delete_key = function()
|
||||
|
||||
if sr_active_tbox == 'res_tbox' then
|
||||
|
||||
if tonumber(#sr_resolution_tbox:get_text()) == 1 then
|
||||
reset_textbox()
|
||||
return
|
||||
end
|
||||
|
||||
sr_resolution_tbox:set_text(sr_resolution_tbox:get_text():sub(1, -2))
|
||||
|
||||
|
||||
elseif sr_active_tbox == 'offset_tbox' then
|
||||
|
||||
if tonumber(#sr_offset_tbox:get_text()) == 1 then
|
||||
reset_textbox()
|
||||
return
|
||||
end
|
||||
|
||||
sr_offset_tbox:set_text(sr_offset_tbox:get_text():sub(1, -2))
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
local apply_new_settings = function()
|
||||
|
||||
-- Get the text on texbox
|
||||
sr_user_resolution = sr_resolution_tbox:get_text()
|
||||
sr_user_offset = sr_offset_tbox:get_text()
|
||||
|
||||
-- Apply new settings
|
||||
sr_user_update(sr_user_resolution, sr_user_offset, status_audio)
|
||||
|
||||
|
||||
-- Debugger
|
||||
screen_rec_backend.check_settings()
|
||||
|
||||
end
|
||||
|
||||
|
||||
-- Settings Key grabber
|
||||
|
||||
local settings_updater = awful.keygrabber {
|
||||
auto_start = true,
|
||||
stop_event = 'release',
|
||||
keypressed_callback = function(self, mod, key, command)
|
||||
if key == 'BackSpace' then
|
||||
delete_key()
|
||||
end
|
||||
end,
|
||||
keyreleased_callback = function(self, mod, key, command)
|
||||
|
||||
if key == 'Return' then
|
||||
apply_new_settings()
|
||||
self:stop()
|
||||
end
|
||||
|
||||
if key == 'Escape' then
|
||||
self:stop()
|
||||
reset_textbox()
|
||||
end
|
||||
|
||||
if key:match('%d') or key == 'x' or key == ',' then
|
||||
write_to_textbox(key)
|
||||
end
|
||||
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
-- Textboxes
|
||||
|
||||
|
||||
sr_resolution_tbox:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
emphasize_inactive_tbox()
|
||||
|
||||
sr_active_tbox = 'res_tbox'
|
||||
|
||||
emphasize_active_tbox()
|
||||
|
||||
settings_updater:start()
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
sr_offset_tbox:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
emphasize_inactive_tbox()
|
||||
|
||||
sr_active_tbox = 'offset_tbox'
|
||||
|
||||
emphasize_active_tbox()
|
||||
|
||||
settings_updater:start()
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
-- UI switcher
|
||||
|
||||
|
||||
local sr_navigation_reset = function()
|
||||
if sr_screen then
|
||||
local recorder_panel = sr_screen:get_children_by_id('recorder_panel')[1]
|
||||
local recorder_settings = sr_screen:get_children_by_id('recorder_settings')[1]
|
||||
|
||||
recorder_settings.visible = false
|
||||
recorder_panel.visible = true
|
||||
end
|
||||
end
|
||||
|
||||
local sr_navigation = function()
|
||||
|
||||
if sr_screen then
|
||||
|
||||
local recorder_panel = sr_screen:get_children_by_id('recorder_panel')[1]
|
||||
local recorder_settings = sr_screen:get_children_by_id('recorder_settings')[1]
|
||||
|
||||
if recorder_panel.visible then
|
||||
recorder_panel.visible = false
|
||||
recorder_settings.visible = true
|
||||
else
|
||||
recorder_settings.visible = false
|
||||
recorder_panel.visible = true
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
sr_settings_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
if not status_recording and not status_countdown then
|
||||
sr_navigation()
|
||||
end
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
sr_back_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
-- Save settings
|
||||
apply_new_settings()
|
||||
|
||||
-- Reset textbox UI
|
||||
emphasize_inactive_tbox()
|
||||
|
||||
-- Go back to UI Panel
|
||||
sr_navigation()
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
-- Close button functions and buttons
|
||||
|
||||
local screen_rec_close = function()
|
||||
|
||||
for s in screen do
|
||||
s.recorder_screen.visible = false
|
||||
end
|
||||
|
||||
settings_updater:stop()
|
||||
|
||||
sr_navigation_reset()
|
||||
sr_screen = nil
|
||||
end
|
||||
|
||||
sr_close_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
screen_rec_close()
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
-- Right click to exit
|
||||
|
||||
local screen_close_on_rmb = function(widget)
|
||||
widget:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
3,
|
||||
nil,
|
||||
function()
|
||||
screen_rec_close()
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
-- Open recorder screen
|
||||
|
||||
sr_toggle_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
for s in screen do
|
||||
s.recorder_screen.visible = false
|
||||
end
|
||||
|
||||
sr_screen = awful.screen.focused().recorder_screen
|
||||
|
||||
screen_close_on_rmb(sr_screen)
|
||||
|
||||
sr_screen.visible = not sr_screen.visible
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
-- Start Recording
|
||||
|
||||
local sr_recording_start = function()
|
||||
|
||||
status_countdown = false
|
||||
status_recording = true
|
||||
|
||||
local sr_screen = awful.screen.focused().recorder_screen
|
||||
|
||||
-- Hide recorder screen
|
||||
sr_screen.visible = false
|
||||
|
||||
-- Manipulate UIs
|
||||
sr_toggle_imgbox:set_image(widget_icon_dir .. 'recording-button' .. '.svg')
|
||||
sr_main_imgbox:set_image(widget_icon_dir .. 'recorder-on' .. '.svg')
|
||||
|
||||
|
||||
sr_start_recording(status_audio)
|
||||
|
||||
end
|
||||
|
||||
|
||||
-- Stop Recording
|
||||
|
||||
|
||||
local sr_recording_stop = function()
|
||||
|
||||
status_recording = false
|
||||
status_audio = false
|
||||
|
||||
-- Manipulate UIs
|
||||
sr_toggle_imgbox:set_image(widget_icon_dir .. 'start-recording-button' .. '.svg')
|
||||
sr_main_imgbox:set_image(widget_icon_dir .. 'recorder-off' .. '.svg')
|
||||
|
||||
|
||||
sr_stop_recording()
|
||||
|
||||
end
|
||||
|
||||
awesome.connect_signal('widget::screen_recorder',
|
||||
function()
|
||||
sr_recording_stop()
|
||||
end
|
||||
)
|
||||
|
||||
-- Countdown timer functions
|
||||
|
||||
local countdown_timer = nil
|
||||
|
||||
local counter_timer = function()
|
||||
|
||||
status_countdown = true
|
||||
|
||||
local seconds = 3
|
||||
|
||||
countdown_timer = gears.timer.start_new(
|
||||
1,
|
||||
function()
|
||||
if seconds == 0 then
|
||||
|
||||
sr_countdown_text.opacity = 0.0
|
||||
|
||||
-- Start recording function
|
||||
sr_recording_start()
|
||||
|
||||
sr_countdown_text:emit_signal('widget::redraw_needed')
|
||||
return false
|
||||
|
||||
else
|
||||
|
||||
sr_main_imgbox:set_image(widget_icon_dir .. 'recorder-countdown' .. '.svg')
|
||||
|
||||
sr_countdown_text.opacity = 1.0
|
||||
sr_countdown_text:set_text(tostring(seconds))
|
||||
|
||||
sr_countdown_text:emit_signal('widget::redraw_needed')
|
||||
end
|
||||
|
||||
seconds = seconds - 1
|
||||
|
||||
return true
|
||||
end
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
|
||||
-- Stop Countdown timer
|
||||
|
||||
|
||||
local sr_countdown_stop = function()
|
||||
|
||||
countdown_timer:stop()
|
||||
|
||||
status_countdown = false
|
||||
|
||||
sr_main_imgbox:set_image(widget_icon_dir .. 'recorder-off' .. '.svg')
|
||||
|
||||
sr_countdown_text.opacity = 0.0
|
||||
sr_countdown_text:emit_signal('widget::redraw_needed')
|
||||
|
||||
end
|
||||
|
||||
|
||||
sr_audio_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
sr_audio_mode()
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
-- Main button functions and buttons
|
||||
|
||||
local status_checker = function()
|
||||
|
||||
if status_recording and not status_countdown then
|
||||
|
||||
-- Stop recording
|
||||
sr_recording_stop()
|
||||
return
|
||||
|
||||
elseif not status_recording and status_countdown then
|
||||
|
||||
-- Stop timer
|
||||
sr_countdown_stop()
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
-- Start counting down
|
||||
counter_timer()
|
||||
|
||||
end
|
||||
|
||||
|
||||
sr_main_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
status_checker()
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
352
awes2/widget/screen-recorder/screen-recorder-ui.lua
Normal file
|
@ -0,0 +1,352 @@
|
|||
local awful = require('awful')
|
||||
local gears = require('gears')
|
||||
local wibox = require('wibox')
|
||||
local beautiful = require('beautiful')
|
||||
|
||||
local dpi = beautiful.xresources.apply_dpi
|
||||
|
||||
local clickable_container = require('widget.clickable-container')
|
||||
|
||||
local config_dir = gears.filesystem.get_configuration_dir()
|
||||
local widget_icon_dir = config_dir .. 'widget/screen-recorder/icons/'
|
||||
|
||||
local record_tbl = {}
|
||||
|
||||
-- Panel UI
|
||||
|
||||
record_tbl.screen_rec_toggle_imgbox = wibox.widget {
|
||||
image = widget_icon_dir .. 'start-recording-button' .. '.svg',
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_toggle_button = wibox.widget {
|
||||
{
|
||||
record_tbl.screen_rec_toggle_imgbox,
|
||||
margins = dpi(7),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_countdown_txt = wibox.widget {
|
||||
id = 'countdown_text',
|
||||
font = 'SF Pro Text Bold 64',
|
||||
text = '4',
|
||||
align = 'center',
|
||||
valign = 'bottom',
|
||||
opacity = 0.0,
|
||||
widget = wibox.widget.textbox
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_main_imgbox = wibox.widget {
|
||||
image = widget_icon_dir .. 'recorder-off' .. '.svg',
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_main_button = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
record_tbl.screen_rec_main_imgbox,
|
||||
margins = dpi(24),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
},
|
||||
forced_width = dpi(200),
|
||||
forced_height = dpi(200),
|
||||
bg = beautiful.groups_bg,
|
||||
shape = gears.shape.circle,
|
||||
widget = wibox.container.background
|
||||
},
|
||||
margins = dpi(24),
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
|
||||
|
||||
record_tbl.screen_rec_audio_imgbox = wibox.widget {
|
||||
image = widget_icon_dir .. 'audio' .. '.svg',
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_audio_button = wibox.widget {
|
||||
{
|
||||
nil,
|
||||
{
|
||||
{
|
||||
record_tbl.screen_rec_audio_imgbox,
|
||||
margins = dpi(16),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
},
|
||||
nil,
|
||||
expand = 'none',
|
||||
layout = wibox.layout.align.vertical
|
||||
},
|
||||
forced_width = dpi(60),
|
||||
forced_height = dpi(60),
|
||||
bg = beautiful.groups_bg,
|
||||
shape = gears.shape.circle,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_close_imgbox = wibox.widget {
|
||||
image = widget_icon_dir .. 'close-screen' .. '.svg',
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_close_button = wibox.widget {
|
||||
{
|
||||
nil,
|
||||
{
|
||||
{
|
||||
record_tbl.screen_rec_close_imgbox,
|
||||
margins = dpi(16),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
},
|
||||
nil,
|
||||
expand = 'none',
|
||||
layout = wibox.layout.align.horizontal
|
||||
},
|
||||
forced_width = dpi(60),
|
||||
forced_height = dpi(60),
|
||||
bg = beautiful.groups_bg,
|
||||
shape = gears.shape.circle,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_settings_imgbox = wibox.widget {
|
||||
image = widget_icon_dir .. 'settings' .. '.svg',
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_settings_button = wibox.widget {
|
||||
{
|
||||
nil,
|
||||
{
|
||||
{
|
||||
record_tbl.screen_rec_settings_imgbox,
|
||||
margins = dpi(16),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
},
|
||||
nil,
|
||||
expand = 'none',
|
||||
layout = wibox.layout.align.vertical
|
||||
},
|
||||
forced_width = dpi(60),
|
||||
forced_height = dpi(60),
|
||||
bg = beautiful.groups_bg,
|
||||
shape = gears.shape.circle,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_back_imgbox = wibox.widget {
|
||||
image = widget_icon_dir .. 'back' .. '.svg',
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_back_button = wibox.widget {
|
||||
{
|
||||
nil,
|
||||
{
|
||||
{
|
||||
record_tbl.screen_rec_back_imgbox,
|
||||
margins = dpi(16),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
},
|
||||
nil,
|
||||
expand = 'none',
|
||||
layout = wibox.layout.align.vertical
|
||||
},
|
||||
forced_width = dpi(48),
|
||||
forced_height = dpi(48),
|
||||
bg = beautiful.groups_bg,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, beautiful.groups_radius)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_back_txt = wibox.widget {
|
||||
{
|
||||
text = 'Back',
|
||||
font = 'SF Pro Display Bold 16',
|
||||
align = 'left',
|
||||
valign = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
margins = dpi(5),
|
||||
widget = wibox.container.margin
|
||||
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_res_txt = wibox.widget {
|
||||
{
|
||||
text = 'Resolution',
|
||||
font = 'SF Pro Display Bold 16',
|
||||
align = 'left',
|
||||
valign = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
margins = dpi(5),
|
||||
widget = wibox.container.margin
|
||||
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_res_txtbox = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
id = 'res_tbox',
|
||||
markup = '<span foreground="#FFFFFF66">' .. '1366x768' .. "</span>",
|
||||
font = 'SF Pro Display Bold 16',
|
||||
align = 'left',
|
||||
valign = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
margins = dpi(5),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
},
|
||||
forced_width = dpi(60),
|
||||
forced_height = dpi(60),
|
||||
bg = beautiful.groups_bg,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, beautiful.groups_radius)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_offset_txt = wibox.widget {
|
||||
{
|
||||
text = 'Offset',
|
||||
font = 'SF Pro Display Bold 16',
|
||||
align = 'left',
|
||||
valign = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
margins = dpi(5),
|
||||
widget = wibox.container.margin
|
||||
|
||||
}
|
||||
|
||||
record_tbl.screen_rec_offset_txtbox = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
id = 'offset_tbox',
|
||||
markup = '<span foreground="#FFFFFF66">' .. '0,0' .. "</span>",
|
||||
font = 'SF Pro Display Bold 16',
|
||||
ellipsize = 'start',
|
||||
align = 'left',
|
||||
valign = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
margins = dpi(5),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
},
|
||||
forced_width = dpi(60),
|
||||
forced_height = dpi(60),
|
||||
bg = beautiful.groups_bg,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, beautiful.groups_radius)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
|
||||
}
|
||||
|
||||
screen.connect_signal("request::desktop_decoration", function(s)
|
||||
|
||||
s.recorder_screen = wibox
|
||||
({
|
||||
ontop = true,
|
||||
screen = s,
|
||||
type = 'dock',
|
||||
height = s.geometry.height,
|
||||
width = s.geometry.width,
|
||||
x = s.geometry.x,
|
||||
y = s.geometry.y,
|
||||
bg = beautiful.background,
|
||||
fg = beautiful.fg_normal
|
||||
})
|
||||
|
||||
s.recorder_screen : setup {
|
||||
layout = wibox.layout.stack,
|
||||
{
|
||||
id = 'recorder_panel',
|
||||
visible = true,
|
||||
layout = wibox.layout.align.vertical,
|
||||
expand = 'none',
|
||||
nil,
|
||||
{
|
||||
layout = wibox.layout.align.horizontal,
|
||||
expand = 'none',
|
||||
nil,
|
||||
{
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
record_tbl.screen_rec_countdown_txt,
|
||||
{
|
||||
layout = wibox.layout.align.horizontal,
|
||||
record_tbl.screen_rec_settings_button,
|
||||
record_tbl.screen_rec_main_button,
|
||||
record_tbl.screen_rec_audio_button
|
||||
},
|
||||
record_tbl.screen_rec_close_button,
|
||||
},
|
||||
nil
|
||||
|
||||
},
|
||||
nil
|
||||
},
|
||||
{
|
||||
id = 'recorder_settings',
|
||||
visible = false,
|
||||
layout = wibox.layout.align.vertical,
|
||||
expand = 'none',
|
||||
nil,
|
||||
{
|
||||
layout = wibox.layout.align.horizontal,
|
||||
expand = 'none',
|
||||
nil,
|
||||
{
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
forced_width = dpi(240),
|
||||
spacing = dpi(10),
|
||||
{
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
spacing = dpi(10),
|
||||
record_tbl.screen_rec_back_button,
|
||||
record_tbl.screen_rec_back_txt,
|
||||
},
|
||||
record_tbl.screen_rec_res_txt,
|
||||
record_tbl.screen_rec_res_txtbox,
|
||||
record_tbl.screen_rec_offset_txt,
|
||||
record_tbl.screen_rec_offset_txtbox
|
||||
},
|
||||
nil
|
||||
|
||||
},
|
||||
nil
|
||||
}
|
||||
}
|
||||
|
||||
end)
|
||||
|
||||
return record_tbl
|