Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 15/01/2022, à 13:36

Zococo

Un lanceur en ligne de commande pour Shortwave

Bonjour,
Utilisateur très régulier de Shortwave, je rencontre des difficultés pour épingler le lanceur dans Kubuntu. Je me suis donc amusé à écrire un script sans prétention pour créer le lanceur. Ce n'est pas suffisamment fondamental pour que je place ce post dans la section multimédia. Certainement pefectible mais j'ai le plaisir de constater qu'il fonctionne, ce qui suffit à mon bonheur et me donne envie de le partager à qui s'y intéresse.
L'objet du script :
- créer si nécessaire les répertoires ~/.local/share/pixmaps at ~/.local/share/applications
- créer l'icone dans pixmaps
- créer le lanceur dans applications.

# Vérification des répertoires
if [[ ! -d ~/.local/share/pixmaps ]]; then mkdir "~/.local/share/pixmaps"; fi; if [[ ! -d ~/.local/share/applications ]]; then mkdir "~/.local/share/applications"; fi

# Création de l’icône svg
echo -e '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<!-- Created with Inkscape (http://www.inkscape.org/) -->\n<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="128" height="128" id="svg11300" version="1.0" style="display:inline;enable-background:new" viewBox="0 0 128 128">\n  <title id="title4162">Adwaita Icon Template</title>\n  <defs id="defs3">\n    <linearGradient id="linearGradient2544">\n      <stop style="stop-color:#ab7007;stop-opacity:1" offset="0" id="stop2532"/>\n      <stop id="stop2534" offset="0.03571429" style="stop-color:#f5b918;stop-opacity:1"/>\n      <stop style="stop-color:#3d2b1b;stop-opacity:1" offset="0.07136531" id="stop2536"/>\n      <stop id="stop2538" offset="0.9285714" style="stop-color:#3d2b1b;stop-opacity:1"/>\n      <stop style="stop-color:#765335;stop-opacity:1" offset="0.96428573" id="stop2540"/>\n      <stop style="stop-color:#3d2b1b;stop-opacity:1" offset="1" id="stop2542"/>\n    </linearGradient>\n    <linearGradient id="linearGradient2530">\n      <stop id="stop2518" offset="0" style="stop-color:#ab7007;stop-opacity:1"/>\n      <stop style="stop-color:#f5b918;stop-opacity:1" offset="0.03571429" id="stop2520"/>\n      <stop id="stop2522" offset="0.07136531" style="stop-color:#bd7b08;stop-opacity:1"/>\n      <stop style="stop-color:#bd7b08;stop-opacity:1" offset="0.9285714" id="stop2524"/>\n      <stop id="stop2526" offset="0.96428573" style="stop-color:#63452c;stop-opacity:1"/>\n      <stop id="stop2528" offset="1" style="stop-color:#ab7007;stop-opacity:1"/>\n    </linearGradient>\n    <linearGradient id="linearGradient2446">\n      <stop style="stop-color:#77767b;stop-opacity:1" offset="0" id="stop2438"/>\n      <stop id="stop2440" offset="0.075" style="stop-color:#9a9996;stop-opacity:1"/>\n      <stop style="stop-color:#c1bfb9;stop-opacity:1" offset="0.35249999" id="stop2442"/>\n      <stop style="stop-color:#77767b;stop-opacity:1" offset="1" id="stop2444"/>\n    </linearGradient>\n    <linearGradient id="linearGradient2436">\n      <stop style="stop-color:#77767b;stop-opacity:1" offset="0" id="stop2428"/>\n      <stop id="stop2430" offset="0.075" style="stop-color:#9a9996;stop-opacity:1"/>\n      <stop style="stop-color:#deddda;stop-opacity:1" offset="0.35249999" id="stop2432"/>\n      <stop style="stop-color:#77767b;stop-opacity:1" offset="1" id="stop2434"/>\n    </linearGradient>\n    <linearGradient id="linearGradient2386">\n      <stop id="stop2374" offset="0" style="stop-color:#fefefe;stop-opacity:1"/>\n      <stop style="stop-color:#bbbab7;stop-opacity:1;" offset="0.60000002" id="stop2382"/>\n      <stop id="stop2384" offset="1" style="stop-color:#5e5c64;stop-opacity:1"/>\n    </linearGradient>\n    <linearGradient y2="236" x2="96" y1="236" x1="32" gradientTransform="translate(604.81684,170.58641)" gradientUnits="userSpaceOnUse" id="linearGradient1099" xlink:href="#linearGradient1036"/>\n    <linearGradient id="linearGradient1036">\n      <stop id="stop1032" offset="0" style="stop-color:#d5d3cf;stop-opacity:1;"/>\n      <stop id="stop1034" offset="1" style="stop-color:#f6f5f4;stop-opacity:1"/>\n    </linearGradient>\n    <radialGradient r="32" fy="-76" fx="-244" cy="-76" cx="-244" gradientTransform="matrix(0.88333331,0,0,0.88333331,-460.35018,463.11973)" gradientUnits="userSpaceOnUse" id="radialGradient1103" xlink:href="#linearGradient1069"/>\n    <linearGradient id="linearGradient1069">\n      <stop id="stop1065" offset="0" style="stop-color:#d5d3cf;stop-opacity:1"/>\n      <stop id="stop1067-1" offset="1" style="stop-color:#949390;stop-opacity:1"/>\n    </linearGradient>\n    <linearGradient gradientUnits="userSpaceOnUse" y2="232" x2="64" y1="262.5" x1="64" id="linearGradient1027" xlink:href="#linearGradient1025" gradientTransform="translate(-470.5864,432.81685)"/>\n    <linearGradient id="linearGradient1025">\n      <stop id="stop1021" offset="0" style="stop-color:#9a9996;stop-opacity:1"/>\n      <stop id="stop1023" offset="1" style="stop-color:#77767b;stop-opacity:1"/>\n    </linearGradient>\n    \n    <clipPath clipPathUnits="userSpaceOnUse" id="clipPath1440">\n      <circle style="display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" id="circle1442" cx="-134.35028" cy="193.74727" r="24" transform="rotate(-45)"/>\n    </clipPath>\n    <clipPath clipPathUnits="userSpaceOnUse" id="clipPath1430">\n      <circle style="display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" id="circle1432" cx="12" cy="232" r="24"/>\n    </clipPath>\n    <clipPath clipPathUnits="userSpaceOnUse" id="clipPath1440-9">\n      <circle style="display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" id="circle1442-5" cx="-134.35028" cy="193.74727" r="24" transform="rotate(-45)"/>\n    </clipPath>\n    <clipPath clipPathUnits="userSpaceOnUse" id="clipPath1430-1">\n      <circle style="display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" id="circle1432-8" cx="12" cy="232" r="24"/>\n    </clipPath>\n    <linearGradient xlink:href="#linearGradient2530" id="linearGradient1660" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.25,0,0,0.25,-14.14897,400.34849)" x1="88.595886" y1="-449.39401" x2="536.59589" y2="-449.39401"/>\n    <linearGradient xlink:href="#linearGradient2544" id="linearGradient1891" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.25,0,0,0.25,-14.14897,228.34849)" x1="88.595886" y1="-449.39401" x2="536.59589" y2="-449.39401"/>\n    <clipPath clipPathUnits="userSpaceOnUse" id="clipPath2024">\n      <rect style="opacity:1;vector-effect:none;fill:#63452c;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="rect2026" width="74" height="98" x="6" y="196"/>\n    </clipPath>\n    <linearGradient id="linearGradient914">\n      <stop id="stop910" offset="0" style="stop-color:#f6f5f4;stop-opacity:0.43700787"/>\n      <stop id="stop912" offset="1" style="stop-color:#deddda;stop-opacity:0;"/>\n    </linearGradient>\n    <radialGradient gradientTransform="matrix(2.6086955,0,0,1.8410361,-102.95652,-748.94671)" gradientUnits="userSpaceOnUse" r="46" fy="296" fx="64.000008" cy="296" cx="64.000008" id="radialGradient916" xlink:href="#linearGradient914"/>\n    <linearGradient id="linearGradient1150">\n      <stop style="stop-color:#9a9996;stop-opacity:1" offset="0" id="stop1142"/>\n      <stop id="stop1144" offset="0.11949085" style="stop-color:#c0bfbc;stop-opacity:1"/>\n      <stop style="stop-color:#deddda;stop-opacity:1" offset="0.35090223" id="stop1146"/>\n      <stop id="stop1153" offset="0.60180056" style="stop-color:#d2d1ce;stop-opacity:1;"/>\n      <stop id="stop1151" offset="0.85269886" style="stop-color:#bbbab7;stop-opacity:1;"/>\n      <stop style="stop-color:#9a9996;stop-opacity:1" offset="1" id="stop1148"/>\n    </linearGradient>\n    <linearGradient xlink:href="#linearGradient1150" id="linearGradient2320" x1="27.9998" y1="203" x2="32.000202" y2="203" gradientUnits="userSpaceOnUse"/>\n    <linearGradient xlink:href="#linearGradient2436" id="linearGradient2330" gradientUnits="userSpaceOnUse" x1="37.047253" y1="180.89714" x2="37.047253" y2="186.89714"/>\n    <linearGradient xlink:href="#linearGradient2446" id="linearGradient2340" gradientUnits="userSpaceOnUse" x1="71.047256" y1="181.89714" x2="71.047256" y2="185.89714"/>\n    <radialGradient xlink:href="#linearGradient2386" id="radialGradient2372" cx="183.21709" cy="-92.151802" fx="183.21709" fy="-92.151802" r="3" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.94529382,0.25329072,-0.26736589,0.99782308,-14.508154,-46.647674)"/>\n  </defs>\n  \n  <metadata id="metadata4">\n    \n  </metadata>\n  <g id="layer1" style="display:inline" transform="translate(0,-172)">\n    <g id="layer9" style="display:inline">\n      <g id="g1513" transform="rotate(-15,90.680272,188.33016)">\n        <path id="path2055" d="M 29.047254,183.89715 H 92.047253" style="fill:none;stroke:url(#linearGradient2340);stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>\n        <path style="fill:none;stroke:url(#linearGradient2330);stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 29.047253,183.89714 H 61.047251" id="path2057"/>\n        <rect y="181.89716" x="61.047253" height="4" width="1" id="rect1493" style="opacity:0.2;vector-effect:none;fill:#000000;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>\n        <circle cy="-92.047256" cx="183.89716" id="circle1504" style="opacity:1;vector-effect:none;fill:url(#radialGradient2372);fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" r="3" transform="rotate(90)"/>\n      </g>\n      <circle style="opacity:1;vector-effect:none;fill:#77767b;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="path2053" cx="30" cy="200" r="4"/>\n      <circle r="4" cy="200" cx="30" id="circle1502" style="opacity:1;vector-effect:none;fill:#3d3846;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>\n      <path style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;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;vector-effect:none;fill:url(#linearGradient2320);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;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 29.970703,197.97266 A 2.0002,2.0002 0 0 0 28,200 v 6 a 2.0002,2.0002 0 1 0 4,0 v -6 a 2.0002,2.0002 0 0 0 -2.029297,-2.02734 z" id="path1500"/>\n      <rect style="opacity:1;vector-effect:none;fill:#63452c;fill-opacity:1;stroke:none;stroke-width:2.35339355;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="rect2051" width="12" height="6" x="24" y="204" rx="2" ry="2"/>\n      <g id="g2022" clip-path="url(#clipPath2024)">\n        <rect style="display:inline;opacity:1;vector-effect:none;fill:url(#linearGradient1660);fill-opacity:1;stroke:none;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" id="rect1654" width="112.00001" height="76" x="7.9999933" y="212" rx="7.9999995" ry="8"/>\n        <rect ry="7.9999995" rx="7.9999995" y="208" x="7.9999933" height="72" width="112.00001" id="rect1656" style="display:inline;opacity:1;vector-effect:none;fill:#e5a50a;fill-opacity:1;stroke:none;stroke-width:0.24999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new"/>\n      </g>\n      <path style="display:inline;opacity:1;vector-effect:none;fill:url(#linearGradient1891);fill-opacity:1;stroke:none;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" d="M 80 46.021484 L 80 116 L 112 116 C 116.432 116 120 112.432 120 108 L 120 54.021484 C 120 49.589484 116.432 46.021484 112 46.021484 L 80 46.021484 z " transform="translate(0,172)" id="rect1889"/>\n      <path style="display:inline;opacity:1;vector-effect:none;fill:#63452c;fill-opacity:1;stroke:none;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" d="m 80,36 v 72 h 32 c 4.432,0 8,-3.568 8,-8 V 44 c 0,-4.432 -3.568,-8 -8,-8 z" transform="translate(0,172)" id="rect1877"/>\n      <g id="g1592" transform="translate(7.6e-6,-22)">\n        <rect style="display:inline;opacity:1;vector-effect:none;fill:#bd7b08;fill-opacity:1;stroke:none;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" id="rect1751" width="16" height="18" x="91.999992" y="246" rx="8" ry="8"/>\n        <circle style="display:inline;opacity:1;vector-effect:none;fill:#e5a50a;fill-opacity:1;stroke:none;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" id="circle1753" cx="99.999992" cy="254" r="8"/>\n        <circle style="display:inline;opacity:1;vector-effect:none;fill:#63452c;fill-opacity:1;stroke:none;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" id="circle1759" cx="96.999992" cy="249" r="1.3125"/>\n      </g>\n      <rect ry="2" rx="2" y="248" x="92" height="6" width="6" id="rect1709" style="opacity:1;vector-effect:none;fill:#bd7b08;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>\n      <rect style="opacity:1;vector-effect:none;fill:#e5a50a;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="rect1707" width="6" height="4" x="92" y="248" rx="2" ry="2"/>\n      <rect style="opacity:1;vector-effect:none;fill:#bd7b08;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="rect1711" width="6" height="6" x="102" y="248" rx="2" ry="2"/>\n      <rect ry="2" rx="2" y="248" x="102" height="4" width="6" id="rect1713" style="opacity:1;vector-effect:none;fill:#e5a50a;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>\n      <rect style="opacity:1;vector-effect:none;fill:#bd7b08;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="rect1776" width="6" height="6" x="92" y="258" rx="2" ry="2"/>\n      <rect ry="2" rx="2" y="258" x="92" height="4" width="6" id="rect1778" style="opacity:1;vector-effect:none;fill:#e5a50a;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>\n      <rect ry="2" rx="2" y="258" x="102" height="6" width="6" id="rect1780" style="opacity:1;vector-effect:none;fill:#bd7b08;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>\n      <rect style="opacity:1;vector-effect:none;fill:#e5a50a;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="rect1782" width="6" height="4" x="102" y="258" rx="2" ry="2"/>\n    </g>\n    <path id="path1882-7" d="m 43.999997,222 a 22,22 0 0 0 -12.601562,4 h 25.230468 a 22,22 0 0 0 -12.628906,-4 z m -16.957031,8 a 22,22 0 0 0 -2.613281,4 H 63.5957 a 22,22 0 0 0 -2.648437,-4 z m -4.1875,8 a 22,22 0 0 0 -0.75586,4 h 43.791016 a 22,22 0 0 0 -0.730469,-4 z m -0.746094,8 a 22,22 0 0 0 0.730469,4 h 42.304687 a 22,22 0 0 0 0.75586,-4 z m 2.294922,8 a 22,22 0 0 0 2.648437,4 h 33.904297 a 22,22 0 0 0 2.613281,-4 z m 6.966797,8 a 22,22 0 0 0 12.628906,4 22,22 0 0 0 12.601562,-4 z" style="display:inline;opacity:1;vector-effect:none;fill:#63452c;fill-opacity:1;stroke:none;stroke-width:1.51185787;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new"/>\n  </g>\n</svg>' > ~/.local/share/pixmaps/shortwave_icone.svg

# Création du lanceur
echo -e '[Desktop Entry]\nName[fr]=Shortwave\nName=Shortwave\n# Translators: Do NOT translate or transliterate this text (this is an icon file name)!\nIcon=~/.local/share/pixmaps/shortwave_icone.svg\nExec=flatpak run de.haeckerfelix.Shortwave\nTerminal=false\nType=Application\nStartupNotify=true\nCategories=GNOME;GTK;Audio;AudioVideo;\n# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!\nKeywords[fr]=Gradio;radio;stream;flux;wave;diffusion;\nKeywords=Gradio;Radio;Stream;Wave;\nDBusActivatable=true\n# Translators: Do NOT translate or transliterate this text (these are enum types)!\nX-Purism-FormFactor=Workstation;Mobile;' > ~/.local/share/applications/shortwave.desktop

# Ajout de la propriété exécutable au lanceur
chmod +x ~/.local/share/applications/shortwave.desktop

Ubuntu 23.04 (64 bits) - Gigabyte B250M-DS3H / Core i5-7600K (Kaby lake) - Microsoft surface Go 3

Hors ligne

#2 Le 16/01/2022, à 12:18

kamaris

Re : Un lanceur en ligne de commande pour Shortwave

L'utilisation d'heredocs serait préférable pour les fichiers à créer :

cat<<EOF >fichier
contenu du fichier
EOF

Tu peux aussi remplacer la première ligne par

mkdir -p "~/.local/share/pixmaps" "~/.local/share/applications"

Hors ligne

#3 Le 16/01/2022, à 12:29

ar barzh paour

Re : Un lanceur en ligne de commande pour Shortwave

kamaris a écrit :

L'utilisation d'heredocs serait préférable pour les fichiers à créer :

# Création de l’icône svg

echo -e '<?xml version="1.0" etc 

effectivement une ligne de code de 19029 caractères  c'est pas fréquent !!!!!

Dernière modification par ar barzh paour (Le 16/01/2022, à 12:32)


PC          : B760M DS3H DDR4,  12th Gen Intel(R) Core(TM) i3-12100, RAM DDR4 8GiB -2400 Ubuntu 20.04, 22.04, 24.04 (en test )
Portable1 : ThinkPad P50 I7-6820HQ, 16G0 Ram Ubuntu 22.04 Ubuntu 24.04 , W10-PRO( en voyage )
Portable2 : T5750  @ 2.00GHz RAM 1GiB DDR2 667 Mhz Ubuntu 20.04 ( batterie HS )
stourm a ran war bep tachenn (Angela Duval) ( Je combats sur tous les fronts )

Hors ligne

#4 Le 02/04/2022, à 14:08

Zococo

Re : Un lanceur en ligne de commande pour Shortwave

3 mois après ;-)
merci pour les conseils. ça me sera utile.


Ubuntu 23.04 (64 bits) - Gigabyte B250M-DS3H / Core i5-7600K (Kaby lake) - Microsoft surface Go 3

Hors ligne