I want to generate the graphic below, from the (Linux) command-line.
I can get pretty close to that by invoking:
dialog --title "fsfe" --msgbox "This computer\nis not old,\nit is sustainable" 10 22
But that only gives me an OK
button; I need OK
/Cancel
. Can I do that with the dialog
program?
I want to generate the graphic below, from the (Linux) command-line.
I can get pretty close to that by invoking:
dialog --title "fsfe." --msgbox "This computer\nis not old,\nit is sustainable" 10 22
But that only gives me an OK
button; I need OK
/Cancel
. Can I do that with the dialog
program?
2 Answers
Reset to default 1You can do it also in dialog:
You need to add an extra button to the box.
$ dialog \
--ok-label 'OK' \
--extra-button --extra-label 'Cancel' \
--title 'fsfe.' \
--msgbox 'This computer\nis not old,\nit is sustainable' \
8 30
Try:
whiptail \
--title "fsfe." \
--yesno "This computer\nis not old,\nit is sustainable." \
--yes-button "OK" --no-button "Cancel" \
10 26
this will not give you exactly what you want - There will be no separation between the main text area and the two buttons - but it's very close. Exact colors may depend on your specific distribution and various settings.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744307812a4567803.html
评论列表(0条)