Executor: work if just image given
This commit is contained in:
38
nwg_panel/executors/arch_updates.py
Executable file
38
nwg_panel/executors/arch_updates.py
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
# put your icons path here
|
||||||
|
icons_path = "/home/piotr/.config/nwg-panel/icons_light"
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
arch, aur = check_updates()
|
||||||
|
if arch and aur:
|
||||||
|
print("{}/arch-notification.svg".format(icons_path))
|
||||||
|
print("{}/{}".format(arch, aur))
|
||||||
|
elif arch:
|
||||||
|
print("{}/arch-notification.svg".format(icons_path))
|
||||||
|
print("{}".format(arch))
|
||||||
|
elif aur:
|
||||||
|
print("{}/arch-notification.svg".format(icons_path))
|
||||||
|
print("{}".format(aur))
|
||||||
|
else:
|
||||||
|
print("{}/arch-linux.svg".format(icons_path))
|
||||||
|
|
||||||
|
|
||||||
|
def check_updates():
|
||||||
|
arch, aur = 0, 0
|
||||||
|
try:
|
||||||
|
arch = len(subprocess.check_output(["pacman", "-Qqu"]).decode("utf-8").splitlines())
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
aur = len(subprocess.check_output(["trizen", "-Qqu", "-a"]).decode("utf-8").splitlines())
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
return arch, aur
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
175
nwg_panel/icons_dark/arch-linux.svg
Normal file
175
nwg_panel/icons_dark/arch-linux.svg
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
<?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:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
id="svg2424"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07, custom)"
|
||||||
|
version="1.0"
|
||||||
|
sodipodi:docname="arch-linux.svg"
|
||||||
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
|
inkscape:export-filename="/home/thayer/archlinux-logo-contest/archer-full-detail.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90">
|
||||||
|
<defs
|
||||||
|
id="defs2426">
|
||||||
|
<linearGradient
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="path1082_2_"
|
||||||
|
y2="129.3468"
|
||||||
|
x2="112.49853"
|
||||||
|
y1="6.1372099"
|
||||||
|
x1="112.49854"
|
||||||
|
gradientTransform="translate(287,-83)">
|
||||||
|
<stop
|
||||||
|
id="stop193"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#ffffff;stop-opacity:0" />
|
||||||
|
<stop
|
||||||
|
id="stop195"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#ffffff;stop-opacity:0.27450982;" />
|
||||||
|
<midPointStop
|
||||||
|
id="midPointStop197"
|
||||||
|
style="stop-color:#FFFFFF"
|
||||||
|
offset="0" />
|
||||||
|
<midPointStop
|
||||||
|
id="midPointStop199"
|
||||||
|
style="stop-color:#FFFFFF"
|
||||||
|
offset="0.5" />
|
||||||
|
<midPointStop
|
||||||
|
id="midPointStop201"
|
||||||
|
style="stop-color:#000000"
|
||||||
|
offset="1" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3388">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:0;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3390" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:0.37113401;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3392" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient4346">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#00bdec;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop4348" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#40bfde;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop4350" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4346"
|
||||||
|
id="linearGradient4352"
|
||||||
|
x1="400.6142"
|
||||||
|
y1="634.15063"
|
||||||
|
x2="616.48553"
|
||||||
|
y2="666.97791"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient5323">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#6e6e6e;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop5325" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#4d4d4d;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop5327" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5323"
|
||||||
|
id="linearGradient5329"
|
||||||
|
x1="291.83591"
|
||||||
|
y1="238.08237"
|
||||||
|
x2="650.81366"
|
||||||
|
y2="348.96875"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#path1082_2_"
|
||||||
|
id="linearGradient2216"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(-0.3937741,0,0,0.393752,978.34967,416.9815)"
|
||||||
|
x1="541.33502"
|
||||||
|
y1="104.50665"
|
||||||
|
x2="606.91248"
|
||||||
|
y2="303.14029" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
gridtolerance="10000"
|
||||||
|
guidetolerance="10"
|
||||||
|
objecttolerance="10"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="24.111144"
|
||||||
|
inkscape:cx="8.6210011"
|
||||||
|
inkscape:cy="8.4869326"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="g2210"
|
||||||
|
inkscape:window-width="1366"
|
||||||
|
inkscape:window-height="704"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:document-rotation="0" />
|
||||||
|
<metadata
|
||||||
|
id="metadata2429">
|
||||||
|
<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(-269.51781,-265.60124)">
|
||||||
|
<g
|
||||||
|
id="g2424"
|
||||||
|
transform="matrix(1.3473684,0,0,1.3473684,-632.88236,-513.34366)">
|
||||||
|
<g
|
||||||
|
id="g2210"
|
||||||
|
transform="matrix(0.25,0,0,0.25,502.3126,469.21738)">
|
||||||
|
<g
|
||||||
|
id="g28"
|
||||||
|
transform="matrix(0.29166667,0,0,0.29166667,477.3751,297.68101)"
|
||||||
|
style="opacity:1;fill:#444444;fill-opacity:1">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path2518"
|
||||||
|
d="m 741.00015,483.12318 c -6.34282,15.5509 -10.19396,25.73748 -17.25586,40.82611 4.32983,4.58962 9.65118,9.91474 18.28217,15.95123 -9.27916,-3.81832 -15.60463,-7.64184 -20.33478,-11.61987 -9.03787,18.85892 -23.20682,45.7121 -51.94153,97.34253 22.57885,-13.03517 40.08235,-21.07534 56.39465,-24.14429 -0.69789,-3.00828 -1.0707,-6.27752 -1.0437,-9.67163 l 0.0174,-0.71319 c 0.35836,-14.46931 7.88723,-25.59559 16.80359,-24.84009 8.91635,0.75549 15.85732,13.1018 15.49896,27.5711 -0.0675,2.72544 -0.38436,5.34421 -0.92194,7.77558 16.13675,3.15791 33.47519,11.16227 55.75104,24.02252 -4.39297,-8.08778 -8.32763,-15.37432 -12.07214,-22.31781 -5.89822,-4.57152 -12.04738,-10.51908 -24.59656,-16.96014 8.62559,2.24128 14.80767,4.83303 19.62158,7.72338 -38.07152,-70.88252 -41.14731,-80.30772 -54.20288,-110.94543 z"
|
||||||
|
style="fill:#444444;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.556641;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.9 KiB |
180
nwg_panel/icons_dark/arch-notification.svg
Normal file
180
nwg_panel/icons_dark/arch-notification.svg
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
<?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:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
id="svg2424"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07, custom)"
|
||||||
|
version="1.0"
|
||||||
|
sodipodi:docname="arch-notification.svg"
|
||||||
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
|
inkscape:export-filename="/home/thayer/archlinux-logo-contest/archer-full-detail.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90">
|
||||||
|
<defs
|
||||||
|
id="defs2426">
|
||||||
|
<linearGradient
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="path1082_2_"
|
||||||
|
y2="129.3468"
|
||||||
|
x2="112.49853"
|
||||||
|
y1="6.1372099"
|
||||||
|
x1="112.49854"
|
||||||
|
gradientTransform="translate(287,-83)">
|
||||||
|
<stop
|
||||||
|
id="stop193"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#ffffff;stop-opacity:0" />
|
||||||
|
<stop
|
||||||
|
id="stop195"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#ffffff;stop-opacity:0.27450982;" />
|
||||||
|
<midPointStop
|
||||||
|
id="midPointStop197"
|
||||||
|
style="stop-color:#FFFFFF"
|
||||||
|
offset="0" />
|
||||||
|
<midPointStop
|
||||||
|
id="midPointStop199"
|
||||||
|
style="stop-color:#FFFFFF"
|
||||||
|
offset="0.5" />
|
||||||
|
<midPointStop
|
||||||
|
id="midPointStop201"
|
||||||
|
style="stop-color:#000000"
|
||||||
|
offset="1" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3388">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:0;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3390" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:0.37113401;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3392" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient4346">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#00bdec;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop4348" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#40bfde;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop4350" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4346"
|
||||||
|
id="linearGradient4352"
|
||||||
|
x1="400.6142"
|
||||||
|
y1="634.15063"
|
||||||
|
x2="616.48553"
|
||||||
|
y2="666.97791"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient5323">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#6e6e6e;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop5325" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#4d4d4d;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop5327" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5323"
|
||||||
|
id="linearGradient5329"
|
||||||
|
x1="291.83591"
|
||||||
|
y1="238.08237"
|
||||||
|
x2="650.81366"
|
||||||
|
y2="348.96875"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#path1082_2_"
|
||||||
|
id="linearGradient2216"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(-0.3937741,0,0,0.393752,978.34967,416.9815)"
|
||||||
|
x1="541.33502"
|
||||||
|
y1="104.50665"
|
||||||
|
x2="606.91248"
|
||||||
|
y2="303.14029" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
gridtolerance="10000"
|
||||||
|
guidetolerance="10"
|
||||||
|
objecttolerance="10"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="19.264932"
|
||||||
|
inkscape:cx="8.4073787"
|
||||||
|
inkscape:cy="8.7043899"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="g2210"
|
||||||
|
inkscape:window-width="1366"
|
||||||
|
inkscape:window-height="704"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:document-rotation="0" />
|
||||||
|
<metadata
|
||||||
|
id="metadata2429">
|
||||||
|
<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(-269.51781,-265.60124)">
|
||||||
|
<g
|
||||||
|
id="g2424"
|
||||||
|
transform="matrix(1.3473684,0,0,1.3473684,-632.88236,-513.34366)">
|
||||||
|
<g
|
||||||
|
id="g2210"
|
||||||
|
transform="matrix(0.25,0,0,0.25,502.3126,469.21738)">
|
||||||
|
<g
|
||||||
|
id="g28"
|
||||||
|
transform="matrix(0.29166667,0,0,0.29166667,477.3751,297.68101)">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path2518"
|
||||||
|
d="m 741.00015,483.12318 c -6.34282,15.5509 -10.19396,25.73748 -17.25586,40.82611 4.32983,4.58962 9.65118,9.91474 18.28217,15.95123 -9.27916,-3.81832 -15.60463,-7.64184 -20.33478,-11.61987 -9.03787,18.85892 -23.20682,45.7121 -51.94153,97.34253 22.57885,-13.03517 40.08235,-21.07534 56.39465,-24.14429 -0.69789,-3.00828 -1.0707,-6.27752 -1.0437,-9.67163 l 0.0174,-0.71319 c 0.35836,-14.46931 7.88723,-25.59559 16.80359,-24.84009 8.91635,0.75549 15.85732,13.1018 15.49896,27.5711 -0.0675,2.72544 -0.38436,5.34421 -0.92194,7.77558 16.13675,3.15791 33.47519,11.16227 55.75104,24.02252 -4.39297,-8.08778 -8.32763,-15.37432 -12.07214,-22.31781 -5.89822,-4.57152 -12.04738,-10.51908 -24.59656,-16.96014 8.62559,2.24128 14.80767,4.83303 19.62158,7.72338 -38.07152,-70.88252 -41.14731,-80.30772 -54.20288,-110.94543 z"
|
||||||
|
style="fill:#444444;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.556641;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<circle
|
||||||
|
r="15.029297"
|
||||||
|
cy="509.56363"
|
||||||
|
cx="787.47961"
|
||||||
|
id="path3731"
|
||||||
|
style="fill:#ff6400;fill-opacity:1;stroke-width:1.87866" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.1 KiB |
175
nwg_panel/icons_light/arch-linux.svg
Normal file
175
nwg_panel/icons_light/arch-linux.svg
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
<?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:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
id="svg2424"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07, custom)"
|
||||||
|
version="1.0"
|
||||||
|
sodipodi:docname="arch-linux.svg"
|
||||||
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
|
inkscape:export-filename="/home/thayer/archlinux-logo-contest/archer-full-detail.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90">
|
||||||
|
<defs
|
||||||
|
id="defs2426">
|
||||||
|
<linearGradient
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="path1082_2_"
|
||||||
|
y2="129.3468"
|
||||||
|
x2="112.49853"
|
||||||
|
y1="6.1372099"
|
||||||
|
x1="112.49854"
|
||||||
|
gradientTransform="translate(287,-83)">
|
||||||
|
<stop
|
||||||
|
id="stop193"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#ffffff;stop-opacity:0" />
|
||||||
|
<stop
|
||||||
|
id="stop195"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#ffffff;stop-opacity:0.27450982;" />
|
||||||
|
<midPointStop
|
||||||
|
id="midPointStop197"
|
||||||
|
style="stop-color:#FFFFFF"
|
||||||
|
offset="0" />
|
||||||
|
<midPointStop
|
||||||
|
id="midPointStop199"
|
||||||
|
style="stop-color:#FFFFFF"
|
||||||
|
offset="0.5" />
|
||||||
|
<midPointStop
|
||||||
|
id="midPointStop201"
|
||||||
|
style="stop-color:#000000"
|
||||||
|
offset="1" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3388">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:0;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3390" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:0.37113401;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3392" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient4346">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#00bdec;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop4348" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#40bfde;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop4350" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4346"
|
||||||
|
id="linearGradient4352"
|
||||||
|
x1="400.6142"
|
||||||
|
y1="634.15063"
|
||||||
|
x2="616.48553"
|
||||||
|
y2="666.97791"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient5323">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#6e6e6e;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop5325" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#4d4d4d;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop5327" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5323"
|
||||||
|
id="linearGradient5329"
|
||||||
|
x1="291.83591"
|
||||||
|
y1="238.08237"
|
||||||
|
x2="650.81366"
|
||||||
|
y2="348.96875"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#path1082_2_"
|
||||||
|
id="linearGradient2216"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(-0.3937741,0,0,0.393752,978.34967,416.9815)"
|
||||||
|
x1="541.33502"
|
||||||
|
y1="104.50665"
|
||||||
|
x2="606.91248"
|
||||||
|
y2="303.14029" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
gridtolerance="10000"
|
||||||
|
guidetolerance="10"
|
||||||
|
objecttolerance="10"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="24.111144"
|
||||||
|
inkscape:cx="8.6210011"
|
||||||
|
inkscape:cy="8.4869326"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="g2210"
|
||||||
|
inkscape:window-width="1366"
|
||||||
|
inkscape:window-height="704"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:document-rotation="0" />
|
||||||
|
<metadata
|
||||||
|
id="metadata2429">
|
||||||
|
<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(-269.51781,-265.60124)">
|
||||||
|
<g
|
||||||
|
id="g2424"
|
||||||
|
transform="matrix(1.3473684,0,0,1.3473684,-632.88236,-513.34366)">
|
||||||
|
<g
|
||||||
|
id="g2210"
|
||||||
|
transform="matrix(0.25,0,0,0.25,502.3126,469.21738)">
|
||||||
|
<g
|
||||||
|
id="g28"
|
||||||
|
transform="matrix(0.29166667,0,0,0.29166667,477.3751,297.68101)"
|
||||||
|
style="opacity:1;fill:#eeeeee;fill-opacity:1">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path2518"
|
||||||
|
d="m 741.00015,483.12318 c -6.34282,15.5509 -10.19396,25.73748 -17.25586,40.82611 4.32983,4.58962 9.65118,9.91474 18.28217,15.95123 -9.27916,-3.81832 -15.60463,-7.64184 -20.33478,-11.61987 -9.03787,18.85892 -23.20682,45.7121 -51.94153,97.34253 22.57885,-13.03517 40.08235,-21.07534 56.39465,-24.14429 -0.69789,-3.00828 -1.0707,-6.27752 -1.0437,-9.67163 l 0.0174,-0.71319 c 0.35836,-14.46931 7.88723,-25.59559 16.80359,-24.84009 8.91635,0.75549 15.85732,13.1018 15.49896,27.5711 -0.0675,2.72544 -0.38436,5.34421 -0.92194,7.77558 16.13675,3.15791 33.47519,11.16227 55.75104,24.02252 -4.39297,-8.08778 -8.32763,-15.37432 -12.07214,-22.31781 -5.89822,-4.57152 -12.04738,-10.51908 -24.59656,-16.96014 8.62559,2.24128 14.80767,4.83303 19.62158,7.72338 -38.07152,-70.88252 -41.14731,-80.30772 -54.20288,-110.94543 z"
|
||||||
|
style="fill:#eeeeee;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.556641;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.9 KiB |
180
nwg_panel/icons_light/arch-notification.svg
Normal file
180
nwg_panel/icons_light/arch-notification.svg
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
<?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:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
id="svg2424"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07, custom)"
|
||||||
|
version="1.0"
|
||||||
|
sodipodi:docname="arch-notification.svg"
|
||||||
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
|
inkscape:export-filename="/home/thayer/archlinux-logo-contest/archer-full-detail.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90">
|
||||||
|
<defs
|
||||||
|
id="defs2426">
|
||||||
|
<linearGradient
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="path1082_2_"
|
||||||
|
y2="129.3468"
|
||||||
|
x2="112.49853"
|
||||||
|
y1="6.1372099"
|
||||||
|
x1="112.49854"
|
||||||
|
gradientTransform="translate(287,-83)">
|
||||||
|
<stop
|
||||||
|
id="stop193"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#ffffff;stop-opacity:0" />
|
||||||
|
<stop
|
||||||
|
id="stop195"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#ffffff;stop-opacity:0.27450982;" />
|
||||||
|
<midPointStop
|
||||||
|
id="midPointStop197"
|
||||||
|
style="stop-color:#FFFFFF"
|
||||||
|
offset="0" />
|
||||||
|
<midPointStop
|
||||||
|
id="midPointStop199"
|
||||||
|
style="stop-color:#FFFFFF"
|
||||||
|
offset="0.5" />
|
||||||
|
<midPointStop
|
||||||
|
id="midPointStop201"
|
||||||
|
style="stop-color:#000000"
|
||||||
|
offset="1" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3388">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:0;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3390" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:0.37113401;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3392" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient4346">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#00bdec;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop4348" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#40bfde;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop4350" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4346"
|
||||||
|
id="linearGradient4352"
|
||||||
|
x1="400.6142"
|
||||||
|
y1="634.15063"
|
||||||
|
x2="616.48553"
|
||||||
|
y2="666.97791"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient5323">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#6e6e6e;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop5325" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#4d4d4d;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop5327" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5323"
|
||||||
|
id="linearGradient5329"
|
||||||
|
x1="291.83591"
|
||||||
|
y1="238.08237"
|
||||||
|
x2="650.81366"
|
||||||
|
y2="348.96875"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#path1082_2_"
|
||||||
|
id="linearGradient2216"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(-0.3937741,0,0,0.393752,978.34967,416.9815)"
|
||||||
|
x1="541.33502"
|
||||||
|
y1="104.50665"
|
||||||
|
x2="606.91248"
|
||||||
|
y2="303.14029" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
gridtolerance="10000"
|
||||||
|
guidetolerance="10"
|
||||||
|
objecttolerance="10"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="19.264932"
|
||||||
|
inkscape:cx="8.4073787"
|
||||||
|
inkscape:cy="8.7043899"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="g2210"
|
||||||
|
inkscape:window-width="1366"
|
||||||
|
inkscape:window-height="704"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:document-rotation="0" />
|
||||||
|
<metadata
|
||||||
|
id="metadata2429">
|
||||||
|
<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(-269.51781,-265.60124)">
|
||||||
|
<g
|
||||||
|
id="g2424"
|
||||||
|
transform="matrix(1.3473684,0,0,1.3473684,-632.88236,-513.34366)">
|
||||||
|
<g
|
||||||
|
id="g2210"
|
||||||
|
transform="matrix(0.25,0,0,0.25,502.3126,469.21738)">
|
||||||
|
<g
|
||||||
|
id="g28"
|
||||||
|
transform="matrix(0.29166667,0,0,0.29166667,477.3751,297.68101)">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path2518"
|
||||||
|
d="m 741.00015,483.12318 c -6.34282,15.5509 -10.19396,25.73748 -17.25586,40.82611 4.32983,4.58962 9.65118,9.91474 18.28217,15.95123 -9.27916,-3.81832 -15.60463,-7.64184 -20.33478,-11.61987 -9.03787,18.85892 -23.20682,45.7121 -51.94153,97.34253 22.57885,-13.03517 40.08235,-21.07534 56.39465,-24.14429 -0.69789,-3.00828 -1.0707,-6.27752 -1.0437,-9.67163 l 0.0174,-0.71319 c 0.35836,-14.46931 7.88723,-25.59559 16.80359,-24.84009 8.91635,0.75549 15.85732,13.1018 15.49896,27.5711 -0.0675,2.72544 -0.38436,5.34421 -0.92194,7.77558 16.13675,3.15791 33.47519,11.16227 55.75104,24.02252 -4.39297,-8.08778 -8.32763,-15.37432 -12.07214,-22.31781 -5.89822,-4.57152 -12.04738,-10.51908 -24.59656,-16.96014 8.62559,2.24128 14.80767,4.83303 19.62158,7.72338 -38.07152,-70.88252 -41.14731,-80.30772 -54.20288,-110.94543 z"
|
||||||
|
style="fill:#eeeeee;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.556641;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<circle
|
||||||
|
r="15.029297"
|
||||||
|
cy="509.56363"
|
||||||
|
cx="787.47961"
|
||||||
|
id="path3731"
|
||||||
|
style="fill:#ff6400;fill-opacity:1;stroke-width:1.87866" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.1 KiB |
@@ -63,9 +63,27 @@ class Executor(Gtk.EventBox):
|
|||||||
|
|
||||||
def update_widget(self, output):
|
def update_widget(self, output):
|
||||||
if len(output) == 1:
|
if len(output) == 1:
|
||||||
if self.image.get_visible():
|
if output[0].endswith(".svg") or output[0].endswith(".png"):
|
||||||
self.image.hide()
|
new_path = output[0].strip()
|
||||||
self.label.set_text(output[0].strip())
|
if new_path != self.icon_path:
|
||||||
|
try:
|
||||||
|
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
|
||||||
|
new_path, self.settings["icon-size"], self.settings["icon-size"])
|
||||||
|
self.image.set_from_pixbuf(pixbuf)
|
||||||
|
self.icon_path = new_path
|
||||||
|
except:
|
||||||
|
print("Failed setting image from {}".format(output[0].strip()))
|
||||||
|
if not self.image.get_visible():
|
||||||
|
self.image.show()
|
||||||
|
if self.label.get_visible():
|
||||||
|
self.label.hide()
|
||||||
|
else:
|
||||||
|
if self.image.get_visible():
|
||||||
|
self.image.hide()
|
||||||
|
self.label.set_text(output[0].strip())
|
||||||
|
if not self.label.get_visible():
|
||||||
|
self.label.show()
|
||||||
|
|
||||||
elif len(output) == 2:
|
elif len(output) == 2:
|
||||||
new_path = output[0].strip()
|
new_path = output[0].strip()
|
||||||
if new_path != self.icon_path:
|
if new_path != self.icon_path:
|
||||||
@@ -100,7 +118,6 @@ class Executor(Gtk.EventBox):
|
|||||||
def build_box(self):
|
def build_box(self):
|
||||||
self.box.pack_start(self.image, False, False, 2)
|
self.box.pack_start(self.image, False, False, 2)
|
||||||
self.box.pack_start(self.label, False, False, 2)
|
self.box.pack_start(self.label, False, False, 2)
|
||||||
self.label.show()
|
|
||||||
|
|
||||||
def on_enter_notify_event(self, widget, event):
|
def on_enter_notify_event(self, widget, event):
|
||||||
self.get_style_context().set_state(Gtk.StateFlags.SELECTED)
|
self.get_style_context().set_state(Gtk.StateFlags.SELECTED)
|
||||||
@@ -109,11 +126,11 @@ class Executor(Gtk.EventBox):
|
|||||||
self.get_style_context().set_state(Gtk.StateFlags.NORMAL)
|
self.get_style_context().set_state(Gtk.StateFlags.NORMAL)
|
||||||
|
|
||||||
def on_button_press(self, widget, event):
|
def on_button_press(self, widget, event):
|
||||||
if event.button == 3 and self.settings["on-left-click"]:
|
if event.button == 1 and self.settings["on-left-click"]:
|
||||||
self.launch(self.settings["on-left-click"])
|
self.launch(self.settings["on-left-click"])
|
||||||
elif event.button == 2 and self.settings["on-middle-click"]:
|
elif event.button == 2 and self.settings["on-middle-click"]:
|
||||||
self.launch(self.settings["on-middle-click"])
|
self.launch(self.settings["on-middle-click"])
|
||||||
elif event.button == 1 and self.settings["on-right-click"]:
|
elif event.button == 3 and self.settings["on-right-click"]:
|
||||||
self.launch(self.settings["on-right-click"])
|
self.launch(self.settings["on-right-click"])
|
||||||
|
|
||||||
def on_scroll(self, widget, event):
|
def on_scroll(self, widget, event):
|
||||||
|
Reference in New Issue
Block a user