1

The title sets the question. If it can, what is the coding? Present coding is:- yad --center --on-top --text-align=center --buttons-layout=center --title ${0##*/} --width=150 --height=60 --text "Do you want tea?" --button=gtk-no:1 --button=gtk-yes:0 I want to make the yes button the default, so even if I just close the box the yes button is selected. Many thanks John

John_S
  • 53
  • 2
  • 8
  • Welcome to Stack Overflow. SO is a question and answer page for professional and enthusiastic programmers. Please add your own code to your question. You are expected to show at least the amount of research you have put into solving this question yourself. – Cyrus May 29 '20 at 19:37

2 Answers2

0

This snippet launch a default icon in the systray:

yad --notification xxx 
Gilles Quénot
  • 173,512
  • 41
  • 224
  • 223
0

Found out that $? for Yes=0, for No=1 and Close=252, so coding externally allowed to make the Yes button the default. :-

if [[ $? == 0 || $? == 252 ]]
then
echo "Default"
else
echo "No"
fi
Gilles Quénot
  • 173,512
  • 41
  • 224
  • 223
John_S
  • 53
  • 2
  • 8