-
yad > le sélecteur de fichier
GENERALITES
yad --file
Pré-sélection du fichier
yad --file --filename=/root/hello.txt --width=400
multi sélection
yad --file --multiple --width=600 --height=400
Utiliser
CTRLouSHIFTpour choisir les fichiers.Récupération de la sélection
CHOIXDESFICHIERS=`yad --file --width=600 --height=400`
Voici un exemple :
#!/bin/sh CHOIX=`yad --file --width=600 --height=400` viewnior $CHOIX
NE SÉLECTIONNER QUE CERTAINS FICHIERS
que des répertoires
yad --file --directory --width=600 --height=400
que certaines extensions
--file-filter=NAME | PATTERN1 PATTERN2 …yad --width=600 --height=400 --file --file-filter="Graphic files | *.jpg *.png"
SAUVEGARDER UN FICHIER
yad --file --directory --save --width=600 --height=400
--separator=SEPARATOR--confirm-overwrite=[TEXT]--multipleAllow selection of multiple filenames in file selection dialog.--directoryActivate directory-only selection.--saveActivate save mode.--separator=STRINGSpecify separator character when returning multiple filenames.--confirm-overwrite[=TEXT]Confirm file selection if filename already exists. Optional argument is a text for confirmation dialog.--quoted-outputOutput values will be shell-style quoted.