fix(fastfetch): show only the product name on the Host line - #660
Merged
Conversation
fastfetch's default host format appends the product version, which on OEM hardware is a firmware/SKU string (e.g. "124I:00108T:000M:...") that says nothing useful and pushes the actual model name off the line. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b03c4dbc-01c3-4a01-aad5-ccd67ba6ae79
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
On OEM hardware the fastfetch
Hostline is mostly noise. fastfetch's default host format appends the product version, which on a Surface Laptop is a firmware/SKU string, so the line reads:The useful part (the model name) gets pushed out of view by 60 characters that mean nothing to a human reading a login banner.
What changed
Replaces the bare
"host"module inconfig.jsonc.tmplwith an explicit{ "type": "host", "format": "{name}" }, giving:{name}is populated on Linux and macOS too (it is the DMI/SMBIOS product name), so this is not Windows specific and the module stays in the shared, non-templated part of the config.Also adds a short note in
docs/customization.mdexplaining the deviation from fastfetch's defaults, and a Pester assertion in the existing "fastfetch chezmoi wiring" block so the format is not silently dropped by a future edit.Notes for reviewers
While looking into this, the
Updatesline was also missing from the banner. That turned out to be a stale cache from the source/rendered split in #654 rather than a code defect: the renderedupdatesfile had no.srcsibling yet, so it was cleaned up as an orphan while the refresh stamp was still fresh. A singlestatus.ps1 refreshrestored it, and hourly refreshes keep it correct from here, so no code change was needed for it.Testing
Invoke-Pester -Path tests\powershell\FastfetchStatus.Tests.ps1(65 passed)chezmoi applyto confirm the Host and Updates lines