Skip to content

fix(fastfetch): show only the product name on the Host line - #660

Merged
DevSecNinja merged 1 commit into
mainfrom
devsecninja-fastfetch-prompt-tweaks
Jul 30, 2026
Merged

fix(fastfetch): show only the product name on the Host line#660
DevSecNinja merged 1 commit into
mainfrom
devsecninja-fastfetch-prompt-tweaks

Conversation

@DevSecNinja

Copy link
Copy Markdown
Owner

Why

On OEM hardware the fastfetch Host line 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:

Host: Microsoft Surface Laptop, 7th Edition (124I:00108T:000M:0000000F:0B:10C:12M:04D:03U:04T:1R:21S:0A:0)

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 in config.jsonc.tmpl with an explicit { "type": "host", "format": "{name}" }, giving:

Host: Microsoft Surface Laptop, 7th Edition

{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.md explaining 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 Updates line 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 rendered updates file had no .src sibling yet, so it was cleaned up as an orphan while the refresh stamp was still fresh. A single status.ps1 refresh restored 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)
  • Rendered the real banner locally after chezmoi apply to confirm the Host and Updates lines

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
@DevSecNinja
DevSecNinja merged commit 8aece1b into main Jul 30, 2026
19 checks passed
@DevSecNinja
DevSecNinja deleted the devsecninja-fastfetch-prompt-tweaks branch July 30, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant