Have you ever used it in a script?
Code: Select all
#!/bin/sh
TOOLBAR="/root/.toolbar"
[ ! -d $TOOLBAR ] && mkdir $TOOLBAR
yad --title="Toolbar (double-click to run)" --center --icons --read-dir="$TOOLBAR" --button="gtk-add:0" --button="gtk-delete:2" --button="gtk-cancel:1"
CHOICE=$?
[ $CHOICE -eq 0 ] && SEL=`ls /usr/share/applications | cut -d. -f1 | yad --separator=" " --height=300 --list --multiple --column="files"` && for i in $SEL;do ln -s /usr/share/applications/$i.desktop $TOOLBAR/$i.desktop; done
[ $CHOICE -eq 1 ] && exit 0
[ $CHOICE -eq 2 ] && DEL=`ls $TOOLBAR | cut -d. -f1 | yad --separator=" " --height=300 --list --multiple --column="files"` && for i in $DEL;do rm -f $TOOLBAR/$i.desktop; done
exec $0