Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
|
yad_yet_another_dialog [Le 14/09/2022, 21:35] Amiralgaby [--notification] correction de code shell |
yad_yet_another_dialog [Le 22/09/2025, 15:39] (Version actuelle) 31.10.157.154 [Par compilation] |
||
|---|---|---|---|
| Ligne 27: | Ligne 27: | ||
| ==== Avec un ppa ==== | ==== Avec un ppa ==== | ||
| - | Pour installer une version récente de YAD, vous pouvez installer YAD avec le PPA de webupd8, en une ligne : | + | Pour installer une version récente de YAD, vous pouvez installer YAD avec le PPA de webupd8, en une ligne (obsolète : pas de version au delà de Vivid) : |
| <code>sudo add-apt-repository ppa:nilarimogard/webupd8 -y && sudo apt update && sudo apt install yad -y</code> | <code>sudo add-apt-repository ppa:nilarimogard/webupd8 -y && sudo apt update && sudo apt install yad -y</code> | ||
| Ligne 38: | Ligne 38: | ||
| Vous devrez peut-être installer gcc, libwebkitgtk-dev | Vous devrez peut-être installer gcc, libwebkitgtk-dev | ||
| - | Pour avoir la dernière version, télécharger l'archive sur [[https://sourceforge.net/projects/yad-dialog/|la page officielle de Yad]] | + | Pour avoir la dernière version, télécharger l'archive sur [[https://github.com/v1cont/yad/|la page officielle de Yad]] |
| Décompressez-la ou vous voulez. | Décompressez-la ou vous voulez. | ||
| Ouvrez un terminal | Ouvrez un terminal | ||
| Ligne 48: | Ligne 48: | ||
| </code> | </code> | ||
| <note> | <note> | ||
| - | L'auteur fourni une petite application qui permet de lister les icônes pouvant être utilisées. | + | L'auteur fournit une petite application qui permet de lister les icônes pouvant être utilisées. |
| Il vous faut également activer le widget %%--%%html. | Il vous faut également activer le widget %%--%%html. | ||
| - | Procèder comme suit pour les installer. | + | Procéder comme suit pour les installer. |
| </note> | </note> | ||
| <code> | <code> | ||
| Ligne 151: | Ligne 151: | ||
| recherche=$(yad --entry --title='Recherche web' --text='Tapez votre recherche' --text-align="center" --no-escape --mouse --undecorated --skip-taskbar --on-top) | recherche=$(yad --entry --title='Recherche web' --text='Tapez votre recherche' --text-align="center" --no-escape --mouse --undecorated --skip-taskbar --on-top) | ||
| recherche=${recherche// /+} | recherche=${recherche// /+} | ||
| - | xdg-open "https://www.google.fr/search?q="$recherche"&site=webhp&source=lnt&tbs=lr:lang_1fr&lr=lang_fr" | + | xdg-open "https://www.google.fr/search?q=$recherche&site=webhp&source=lnt&tbs=lr:lang_1fr&lr=lang_fr" |
| </code> | </code> | ||
| ====--form==== | ====--form==== | ||
| Ligne 179: | Ligne 179: | ||
| --field="recherche:" '' \ | --field="recherche:" '' \ | ||
| --field="Moteur:CB" 'Forum ubuntu!^Google fr') | --field="Moteur:CB" 'Forum ubuntu!^Google fr') | ||
| - | rech=$(echo $search | awk 'BEGIN {FS="|" } { print $1 }') | + | rech=$(echo "$search" | awk 'BEGIN {FS="|" } { print $1 }') |
| - | moteur=$(echo $search | awk 'BEGIN {FS="|" } { print $2 }') | + | moteur=$(echo "$search" | awk 'BEGIN {FS="|" } { print $2 }') |
| if [ "$moteur" = "Forum ubuntu" ] | if [ "$moteur" = "Forum ubuntu" ] | ||
| then | then | ||
| Ligne 237: | Ligne 237: | ||
| --field="recherche:" '' \ | --field="recherche:" '' \ | ||
| --field="Moteur:CB" 'Forum ubuntu!^Google fr') | --field="Moteur:CB" 'Forum ubuntu!^Google fr') | ||
| - | rech=$(echo $search | awk 'BEGIN {FS="|" } { print $1 }') | + | rech=$(echo "$search" | awk 'BEGIN {FS="|" } { print $1 }') |
| - | moteur=$(echo $search | awk 'BEGIN {FS="|" } { print $2 }') | + | moteur=$(echo "$search" | awk 'BEGIN {FS="|" } { print $2 }') |
| if [ "$moteur" = "Forum ubuntu" ] | if [ "$moteur" = "Forum ubuntu" ] | ||
| then | then | ||
| Ligne 258: | Ligne 258: | ||
| #!/bin/bash | #!/bin/bash | ||
| #####ID --KEY Création aléatoire de l'id | #####ID --KEY Création aléatoire de l'id | ||
| - | id=$(echo $[($RANDOM % ($[10000 - 32000] + 1)) + 10000] ) | + | id=$(($RANDOM % ($((10000 - 32000)) + 1) + 10000)) |
| ##########Onglet 1########## | ##########Onglet 1########## | ||
| #####Avec une colonne####### | #####Avec une colonne####### | ||
| Ligne 305: | Ligne 305: | ||
| else | else | ||
| retour=$(yad --title="Fichier à afficher" --width 800 --height 200 --text-align="center" --list --radiolist --column="Sélectionné" --column="Fichier" --column="Mis à jour" --column="Utillisé" False "$HOME/Documents/FichierUn" "Non" "Non" False "$HOME/Documents/FichierDEux" "Oui" "Non" True "$HOME/Documents/FichierTrois" "Oui" "Non") | retour=$(yad --title="Fichier à afficher" --width 800 --height 200 --text-align="center" --list --radiolist --column="Sélectionné" --column="Fichier" --column="Mis à jour" --column="Utillisé" False "$HOME/Documents/FichierUn" "Non" "Non" False "$HOME/Documents/FichierDEux" "Oui" "Non" True "$HOME/Documents/FichierTrois" "Oui" "Non") | ||
| - | cat $(echo "$retour" | cut -d'|' -f2) | + | cat "$(echo "$retour" | cut -d'|' -f2)" |
| fi | fi | ||
| - | exit 0; | ||
| </code> | </code> | ||
| {{ :yad_disco_00_radiolist.png?direct&800 |}} | {{ :yad_disco_00_radiolist.png?direct&800 |}} | ||