freebsd-nq/contrib/bsddialog
Alfonso Siciliano 8ea2d22e6d bsddialog: Fix for terminals without colours
When running the installer, in particular disextract (which is so far
the only part converted to bsddialog), on serial console or vt100 or
actually any terminal without color support, it failed to start.

This change makes bsddialog fallback on the black and white theme.

This is incorporated in newer version of bsddialog which will be
imported soon.

PR:		261272
Reported by:	thj
Differential Revision:	https://reviews.freebsd.org/D33920
2022-01-19 09:28:42 +01:00
..
examples_library bsddialog: import version 0.0.2 2021-12-21 16:13:00 +01:00
examples_utility bsddialog: import version 0.0.2 2021-12-21 16:13:00 +01:00
lib bsddialog: Fix for terminals without colours 2022-01-19 09:28:42 +01:00
.gitignore bsddialog: import version 0.0.2 2021-12-21 16:13:00 +01:00
bsddialog.1 bsddialog: import version 0.0.2 2021-12-21 16:13:00 +01:00
bsddialog.c bsddialog: import version 0.0.2 2021-12-21 16:13:00 +01:00
GNUMakefile
LICENSE
Makefile
README.md bsddialog: import version 0.0.1 2021-12-13 09:01:39 +01:00
screenshot.png

BSDDialog

Work In Progress!

This project provides bsddialog and libbsddialog, an utility and a library to build scripts and tools with TUI Widgets.

Description: https://www.freebsd.org/status/report-2021-04-2021-06/#_bsddialog_tui_widgets

Screenshots: https://www.flickr.com/photos/alfonsosiciliano/albums/72157720215006074

Getting Started

FreeBSD:

% git clone https://gitlab.com/alfix/bsddialog.git
% cd bsddialog
% make
% ./bsddialog --msgbox "Hello World!" 8 20

If you are using XFCE install devel/ncurses

% sudo pkg install ncurses
% git clone https://gitlab.com/alfix/bsddialog.git
% cd bsddialog
% make -DPORTNCURSES
% ./bsddialog --msgbox "Hello World!" 8 20

Output:

screenshot

Examples utility:

% ./bsddialog --title msgbox --msgbox "Hello World!" 5 30
% ./bsddialog --theme default --title msgbox --msgbox "Hello World!" 5 30
% ./bsddialog --begin-y 2 --title yesno --yesno "Hello World!" 5 30
% ./bsddialog --ascii-lines --pause "Hello World!" 8 50 5
% ./bsddialog --checklist "Space to select" 0 0 0 Name1 Desc1 off Name2 Desc2 on Name3 Desc3 off
% ./bsddialog --backtitle "TITLE" --title yesno --hline "bsddialog" --yesno "Hello World!" 5 25
% ./bsddialog --extra-button --help-button --defaultno --yesno "Hello World!" 0 0

and

% sh ./examples_utility/buildlist.sh
% sh ./examples_utility/checklist.sh
% sh ./examples_utility/form.sh
% sh ./examples_utility/gauge.sh
% sh ./examples_utility/infobox.sh
% sh ./examples_utility/inputbox.sh
% sh ./examples_utility/menu.sh
% sh ./examples_utility/mixedform.sh
% sh ./examples_utility/mixedgauge.sh
% sh ./examples_utility/msgbox.sh
% sh ./examples_utility/passwordbox.sh
% sh ./examples_utility/passwordform.sh
% sh ./examples_utility/radiolist.sh
% sh ./examples_utility/treeview.sh
% sh ./examples_utility/yesno.sh

Examples library:

% cd examples_library
% sh compile
% ./buildlist
% ./compile
% ./datebox
% ./form
% ./infobox
% ./menu
% ./mixedlist
% ./msgbox
% ./pause
% ./radiolist
% ./rangebox
% ./sade
% ./theme
% ./timebox
% ./treeview
% ./yesno

Use Cases:

Features

Common Options:

--ascii-lines, --aspect ratio (for infobox, msgbox and yesno), --backtitle backtitle, --begin-x x (--begin y y), (--begin y x), --cancel-label string, -clear (test with multiple widgets), --colors, --date-format format, --default-button string, --defaultno, --default-item string, --exit-label string, --extra-button, --extra-label string, --hfile filename (for completed widgets), --help, --help-button, --help-label string, --help-status, --help-tags, --hline string, --ignore, --insecure, --item-help, --max-input size, --no-cancel, --nocancel, --no-label string, --no-items, --no-lines, --no-ok, --nook, --no-shadow, --no-tags, --ok-label string, --output-fd fd, --output-separator string, --print-version, --print-size (todo move lib -> utility), --quoted (quotes all != dialog), --print-maxsize, --shadow, --single-quoted (add --quote-with ch?), --separator string (alias --output-separator string), --separate-output (rename --separate-output-withnl?), --sleep secs, --stderr, --stdout, --theme string ("bsddialog", "dialog", "blackwhite"), --time-format format, --title title, --version, --yes-label string.

Widgets:

infobox (do not clear the screen), msgbox, yesno (dialog renames "yes/no" -> "ok/cancel" with --extra-button --help-button). checklist, radiolist, menu, mixedlist, treeview, textbox, mixedgauge, datebox, timebox, gauge, rangebox, pause.

Without resize:

form, inputbox, mixedform, passwordbox, passwordform.

Without autosize, resize, F1:

buildlist

TODO

Common Options:

Option Status Note
--cr-wrap In progress text
--no-collapse In progress text
--no-nl-expand In progress text
--trim In progress text

To evaluate / Not planned in the short term / not in bsdinstall:

--create-rc file, --iso-week, --no-mouse, --print-text-only str h w, --print-text-size str h w, --reorder, -scrollbar, --separate-widget string, --size-err, --timeout secs,--trace filename, --visit-items, --week-start day, --keep-tite, --keep-window, --last-key, --no-kill, --column-separator string, --input-fd fd, --tab-correct, --tab-len n

Widgets:

To evaluate / Not planned in the short term:

tailbox (textbox/fseek), tailboxbg, dselect, fselect, inputmenu, editbox, calendar (use datebox), prgbox, programbox, progressbox.