Yad

De drev
Aller à : navigation, rechercher

Permet de creer des interface utilisateur en bash.

Exemples

yad --text "Hello World !"
cmd=(
    yad --center --text="Click a button to see what happens"
      --button="One":"bash -c 'source /path/to/functions.sh; click_one'"
      --button="Two":2
      --button="Date":date
      --button="Exit":99
)

while true; do
    "${cmd[@]}"
    exval=$?
    echo $exval
    case $exval in
        2) click_two;;
        99) break;;
	252) break;;   #window closed
    esac
done

Sources

http://www.thelinuxrain.com/articles/the-buttons-of-yad