39 |
--msgbox "${text}" "${height}" "${width}" |
--msgbox "${text}" "${height}" "${width}" |
40 |
} |
} |
41 |
|
|
42 |
|
infobox() |
43 |
|
{ |
44 |
|
local header |
45 |
|
local text |
46 |
|
local height |
47 |
|
local width |
48 |
|
|
49 |
|
# very basic getops |
50 |
|
local OPTIND opt |
51 |
|
while getopts ":h:y:x:" opt |
52 |
|
do |
53 |
|
case ${opt} in |
54 |
|
h) header="${OPTARG}" ;; |
55 |
|
y) height="${OPTARG}" ;; |
56 |
|
x) width="${OPTARG}" ;; |
57 |
|
esac |
58 |
|
done |
59 |
|
shift $((OPTIND-1)) |
60 |
|
text="$@" |
61 |
|
|
62 |
|
#[[ -z ${header} ]] && die "no header given" |
63 |
|
[[ -z ${text} ]] && die "no text given" |
64 |
|
[[ -z ${height} ]] && height=3 |
65 |
|
[[ -z ${width} ]] && width=70 |
66 |
|
|
67 |
|
dialog \ |
68 |
|
--colors \ |
69 |
|
--title "${header}" \ |
70 |
|
--backtitle "${TITLE}" \ |
71 |
|
--infobox "${text}" "${height}" "${width}" |
72 |
|
} |
73 |
|
|
74 |
inputbox() |
inputbox() |
75 |
{ |
{ |
76 |
local header |
local header |