• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

bsdconfig/H05-Dec-2021-37,54430,712

bsdinstall/H03-May-2022-10,3287,124

examples_library/H05-Dec-2021-809479

examples_utility/H05-Dec-2021-27099

lib/H03-May-2022-5,2123,867

.gitignoreH A D05-Dec-2021500 2625

GNUMakefileH A D05-Dec-2021609 2918

LICENSEH A D05-Dec-20211.3 KiB2519

MakefileH A D03-May-20221 KiB5133

README.mdH A D05-Dec-20214.9 KiB174130

bsddialog.1H A D05-Dec-2021920 4342

bsddialog.cH A D05-Dec-202132.5 KiB1,2811,052

README.md

1# BSDDialog
2
3**Work In Progress!**
4
5This project provides **bsddialog** and **libbsddialog**, an utility and a
6library to build scripts and tools with *TUI Widgets*.
7
8Description:
9<https://www.freebsd.org/status/report-2021-04-2021-06/#_bsddialog_tui_widgets>
10
11
12## Getting Started
13
14FreeBSD:
15
16```
17% git clone https://gitlab.com/alfix/bsddialog.git
18% cd bsddialog
19% make
20% ./bsddialog --msgbox "Hello World!" 8 20
21```
22
23If you are using XFCE install
24[devel/ncurses](https://www.freshports.org/devel/ncurses/)
25
26```
27% sudo pkg install ncurses
28% git clone https://gitlab.com/alfix/bsddialog.git
29% cd bsddialog
30% make -DPORTNCURSES
31% ./bsddialog --msgbox "Hello World!" 8 20
32```
33
34Linux:
35
36```
37% git clone https://gitlab.com/alfix/bsddialog.git
38% cd bsddialog
39% make -GNUMakefile
40% ./bsddialog --msgbox "Hello World!" 8 20
41```
42
43Output:
44
45![screenshot](screenshot.png)
46
47
48Examples utility:
49```
50% ./bsddialog --title msgbox --msgbox "Hello World!" 5 30
51% ./bsddialog --theme default --title msgbox --msgbox "Hello World!" 5 30
52% ./bsddialog --begin-y 2 --title yesno --yesno "Hello World!" 5 30
53% ./bsddialog --ascii-lines --pause "Hello World!" 8 50 5
54% ./bsddialog --checklist "Space to select" 0 0 0 Name1 Desc1 off Name2 Desc2 on Name3 Desc3 off
55% ./bsddialog --backtitle "TITLE" --title yesno --hline "bsddialog" --yesno "Hello World!" 5 25
56% ./bsddialog --extra-button --help-button --defaultno --yesno "Hello World!" 0 0
57```
58and
59```
60% sh ./examples_utility/buildlist.sh
61% sh ./examples_utility/checklist.sh
62% sh ./examples_utility/form.sh
63% sh ./examples_utility/gauge.sh
64% sh ./examples_utility/infobox.sh
65% sh ./examples_utility/inputbox.sh
66% sh ./examples_utility/menu.sh
67% sh ./examples_utility/mixedform.sh
68% sh ./examples_utility/mixedgauge.sh
69% sh ./examples_utility/msgbox.sh
70% sh ./examples_utility/passwordbox.sh
71% sh ./examples_utility/passwordform.sh
72% sh ./examples_utility/radiolist.sh
73% sh ./examples_utility/treeview.sh
74% sh ./examples_utility/yesno.sh
75```
76
77Examples library:
78```
79% cd examples_library
80% sh compile
81% ./buildlist
82% ./compile
83% ./datebox
84% ./form
85% ./infobox
86% ./menu
87% ./mixedlist
88% ./msgbox
89% ./pause
90% ./radiolist
91% ./rangebox
92% ./sade
93% ./theme
94% ./timebox
95% ./treeview
96% ./yesno
97```
98
99Use Cases:
100
101 - [portconfig](https://gitlab.com/alfix/portconfig)
102
103
104## Features
105
106**Common Options:**
107
108--ascii-lines, --aspect *ratio* (for infobox, msgbox and yesno),
109--backtitle *backtitle*, --begin-x *x* (--begin *y y*),
110(--begin *y x*), --cancel-label *string*, -clear (test with multiple widgets),
111--colors, --date-format *format*, --default-button *string*, --defaultno,
112--default-item *string*,
113--exit-label *string*, --extra-button, --extra-label *string*,
114--hfile *filename* (for completed widgets), --help, --help-button,
115--help-label *string*, --help-status, --help-tags, --hline *string*, --ignore,
116--insecure, --item-help, --max-input *size*, --no-cancel, --nocancel,
117--no-label *string*, --no-items, --no-lines, --no-ok,
118--nook, --no-shadow, --no-tags, --ok-label *string*, --output-fd *fd*,
119--output-separator *string*, --print-version,
120--print-size (todo move lib -> utility), --quoted (quotes all != dialog),
121--print-maxsize, --shadow, --single-quoted (add --quote-with *ch*?),
122--separator *string* (alias --output-separator *string*),
123--separate-output (rename --separate-output-withnl?), --sleep *secs*, --stderr,
124--stdout, --theme *string* ("bsddialog", "dialog", "blackwhite"),
125--time-format *format*, --title *title*, --version, --yes-label *string*.
126
127**Widgets:**
128
129 infobox (do not clear the screen), msgbox,
130 yesno (dialog renames "yes/no" -> "ok/cancel" with --extra-button --help-button).
131 checklist, radiolist, menu, mixedlist, treeview, textbox, mixedgauge, datebox,
132 timebox, gauge, rangebox, pause.
133
134
135 Without resize:
136
137 form, inputbox, mixedform, passwordbox, passwordform.
138
139
140 Without autosize, resize, F1:
141
142 buildlist
143
144
145
146## TODO
147
148
149**Common Options:**
150
151|  Option                      | Status      | Note                            |
152| ---------------------------- | ----------- | ------------------------------- |
153| --cr-wrap                    | In progress | text                            |
154| --no-collapse                | In progress | text                            |
155| --no-nl-expand               | In progress | text                            |
156| --trim                       | In progress | text                            |
157
158
159To evaluate / Not planned in the short term / not in bsdinstall:
160
161--create-rc *file*, --iso-week, --no-mouse, --print-text-only *str h w*,
162--print-text-size *str h w*, --reorder, -scrollbar, --separate-widget *string*,
163--size-err, --timeout *secs*,--trace *filename*, --visit-items,
164--week-start *day*, --keep-tite, --keep-window, --last-key, --no-kill,
165--column-separator *string*, --input-fd *fd*, --tab-correct, --tab-len *n*
166
167
168**Widgets:**
169
170To evaluate / Not planned in the short term:
171
172tailbox (textbox/fseek), tailboxbg, dselect, fselect, inputmenu, editbox,
173calendar (use datebox), prgbox, programbox, progressbox.
174