Skip to content

Script for users to customize dietpi-banner formatting - #8253

Open
timjolson wants to merge 1 commit into
MichaIng:devfrom
timjolson:dietpi-cli
Open

timjolson wants to merge 1 commit into
MichaIng:devfrom
timjolson:dietpi-cli

Conversation

@timjolson

Copy link
Copy Markdown
Contributor

This script lets a user configure their dietpi-banner color codes interactively (displaying samples of different formats).

Future development could include word-wrap and related configurations in one place, offsetting CLI options so they can be sourced and used across other scripts. Something to look at is the CPU temp dietpi-banner output, which has hardcoded colors and formats, but is inside dietpi-globals so does not have user-customization.

@timjolson

Copy link
Copy Markdown
Contributor Author

@MichaIng are you okay with offsetting word-wrap and colors to their own preference file?
.dietpi-cli would hold the display preferences
dietpi-cli would be the config script, still using purely commandline interface. it could also be sourced for use in other scripts

I don't know if there is anything else that makes sense to combine

@MichaIng

Copy link
Copy Markdown
Owner

Since the word-wrap feature and awk script are tailored for dietpi-banner, I see not point to move those into an own config. It just makes things more complicated.

Same for colors, until they are actually used elsewhere. This is a goal, but they should stay in the banner config until really implemented elsewhere. We did already do a significant change to the config last release, hence we shouldn't do another one, unless really needed. If we split it out now, and then implement it into dietpi-globals and other scripts, we'd possibly need to change things in that new config again, causing additional needs for migration steps.

Also, dietpi-cli should be merged into dietpi-banner for now. This will also allow to remove a lot of duplicate code it currently has, which otherwise also causes duplicate maintenance efforts.

But this will moreless require another change in the banner, that I found to be needed already now, after #8172:

  • The parent checkbox dialog needs to become a menu, where selecting an entry toggles it, and applies that change to the config immediately.
  • Entries with a sub menu show that instead, with an on/off toggle at the top, and their options below.
  • The color preferences can then be another sub menu.
  • That way it is not necessary anymore to show all sub menus/options for all selected entries, when changing only one thing. This is currently a bit annoying: You just want to toggle one entry, and need to go through all the dialogs for all options again. And the disk usage entry is enabled by default.

I can do that in a separate preliminary PR.

@MichaIng MichaIng modified the milestones: v10.7, v10.8 Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dietpi-banner Visual 🌹 Issues affecting only the beauty of menus and output, but not the functionality

Projects

None yet

2 participants