Somewhere I ran across the existence of portconfig which is a drop-in replacement for dialog4ports. I installed and I believe removed dialog4ports shortly after. What I did not do was investigate the manpage and that documentation already installed. I have now tried some of its options and saw how it is somewhat different. I never thought to look at the manpage for dialog4ports but looking at it shows me that its replacement has some improvements also. Portconfig is indeed a drop-in replacement, all that needs to be done to switch to it is remove the old and install the new.
This is more of an introduction than anything, so how about comparing the manpages.
DIALOG4PORTS(1) General Commands Manual DIALOG4PORTS(1) PORTCONFIG(1) FreeBSD General Commands Manual PORTCONFIG(1) NAME NAME dialog4ports -- a dialog for FreeBSD ports portconfig – port options SYNOPSIS SYNOPSIS Port environment variables dialog4ports. portconfig [-h | -v] DESCRIPTION DESCRIPTION dialog4ports is a utility for providing a dialog interface to configure The portconfig utility provides a TUI to customize the options to build a ports options port. The following options are available: ENVIRONMENT -h Display options, a short description and exit. The list of environment variables dialog4ports: -v Show version and exit. D4PHEIGHT Dialog height. (Default value: 0) The following user interface features are available: D4PMINHEIGHT F1 key General PORTS usage. Minimal dialog height, for example: if D4PMINHEIGHT 5 and count of options elements(1-4) less than Help button D4PMINHEIGHT, then height will extended to 5. (Default value: 0) Specific port help, if pkg-help exists. D4PWIDTH Space key Dialog width. (Default value: 80) Select/deselect an option. D4PFULLSCREEN ENVIRONMENT Dialog full screen mode. (Default: N) The following environment variables can customize portconfig: D4PALIGNCENTER NO_COLOR Text in dialog becomes to center. (Default: N) Disable colors if present and not an empty string (regardless of its value). D4PASCIILINES Use ASCII character for line drawing. (Default: N) PORTCONFIG_ALIGNCENTER Align options to center, “YES” to enable, default left. SEE ALSO dialog(3) PORTCONFIG_ASCIILINES Ascii characters to draw lines, “YES” to enable. AUTHORS The dialog4ports utility was written by: PORTCONFIG_FULLSCREEN Ilya A. Arkhipov <rum1cro@yandex.ru> Fullscreen mode, “YES” to enable. with help from: Eitan Adler <eadler@FreeBSD.org>, PORTCONFIG_HEIGHT Baptiste Daroussin <bapt@FreeBSD.org>, Fixed height, default autosize. Alexey Dokuchaev <danfe@FreeBSD.org> PORTCONFIG_MINHEIGHT FreeBSD 13.2 March 9, 2013 DIALOG4PORTS(1) Minimum height, takes effect only with autosize. PORTCONFIG_MINWIDTH Minimum width, takes effect only with autosize. PORTCONFIG_NOLINES Do not draw lines, “YES” to enable. PORTCONFIG_NOSHADOW “YES” to disable dialog shadow. PORTCONFIG_WIDTH Fixed width, default autosize. Compatibility The following environment variables are available for compatibility: D4PALIGNCENTER PORTCONFIG_ALIGNCENTER D4PASCIILINES PORTCONFIG_ASCIILINES D4PFULLSCREEN PORTCONFIG_FULLSCREEN D4PHEIGHT PORTCONFIG_HEIGHT D4PMINHEIGHT PORTCONFIG_MINHEIGHT D4PWIDTH PORTCONFIG_WIDTH EXIT STATUS The portconfig utility exits 0 on success, and >0 if an error occurs. SEE ALSO ports(7) AUTHORS The portconfig utility was written by Alfonso Sabato Siciliano <asiciliano@FreeBSD.org>. THANKS TO Baptiste Daroussin <bapt@FreeBSD.org> for suggestions, help, and testing. FreeBSD 14.0-STABLE August 4, 2023 FreeBSD 14.0-STABLE
There are some environment variables that are new. We are all accustomed to the dialog4ports config screen but below is a rather clean and crisp portconfig screen for my unofficial minetest-dev port.
The following is what I placed in my user's .xinitrc file so that I will get the result above regardless of defaults. I think I could use a different group of settings in the .cshrc file for root, which would function primarily if I were at console rather than in a terminal that I 'switched user' to root. I have decided that I need the lines and I prefer not fullscreen, and centered looks best. I can do either black and white like the image above or use the blue and white and black the way the former dialog4ports had.
##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~## ## Portconfig options via environment vars ## ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~## # Disable colors if present and not an empty string (regardless of its value) NO_COLOR="NO" export NO_COLOR # Align options to center, “YES” to enable, default left. PORTCONFIG_ALIGNCENTER="YES" export PORTCONFIG_ALIGNCENTER # Ascii characters to draw lines, “YES” to enable. PORTCONFIG_ASCIILINES="NO" export PORTCONFIG_ASCIILINES # Fullscreen mode, “YES” to enable. #PORTCONFIG_FULLSCREEN= #export PORTCONFIG_FULLSCREEN # Fixed height, default autosize. #PORTCONFIG_HEIGHT= #export PORTCONFIG_HEIGHT # Minimum height, takes effect only with autosize. #PORTCONFIG_MINHEIGHT= #export PORTCONFIG_MINHEIGHT # Minimum width, takes effect only with autosize. #PORTCONFIG_MINWIDTH= #export PORTCONFIG_MINWIDTH # Do not draw lines, “YES” to enable. PORTCONFIG_NOLINES="NO" export PORTCONFIG_NOLINES # “YES” to disable dialog shadow. PORTCONFIG_NOSHADOW="NO" export PORTCONFIG_NOSHADOW # Fixed width, default autosize. #PORTCONFIG_WIDTH= #export PORTCONFIG_WIDTH
Whether you define any of the variables above within your .cshrc or .xinitrc or another file, or at the moment directly on the commandline, you will still need to comply with the format and syntax for the shell that is used. How you decide which options to use or how to configure it may take a little exploration to understand. There do not seem to be shadows without color and it may be that you agree with me that lines are useful. One other thing to consider when using a terminal is whether the font used has the line characters and if you prefer a font that has none you may want the ascii lines instead.
WARNING: The NO_COLOR environment variable will also be interpreted by xterm to disable colors which may eliminate one way portclippy displays the differences needing adjustment.
If you like white text on a black background, want to be very specific about the dimensions of the dialog, or prefer color without shadows or lines, then this portconfig will be able to do all this. It may be that this would become the permanent replacement for dialog4ports but even if it does not, while it is maintained we have two options for our port configuration menu needs.
No comments:
Post a Comment
Thank you for your interest!