Latest fastfetch version struggles with "packages"

I know I should probably report that to fastfetch, but I just donโ€™t feel like :grin:

Just wanted to let you people know that what worked in fastfetch for more than a year fails in version 2.65.1-1.1.

This config.jsonc snippet:

      {
        "type": "packages",
        "key": "{#90}โ”‚ {#91}Packages    {#90}โ”‚",
        "format": "{$1}{1}"
      },

displayed this until yesterday:

โ”‚ Packages โ”‚โ”‚ 1467 โ”‚

but now it says:

โ”‚ Packages โ”‚โ”‚ 0 โ”‚

If I remove the format, the correct number shows again, but I lose my beloved formatting:

โ”‚ Packages โ”‚1467 (pacman)

Not a real dealbreaker, just a sad little nuisance.

If anyone has an idea, let me know. LLMs were not helpful there.

The complete config looks like this:

show me
// Modified from: examples 26.jsonc
{
    "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
// Show logo:
//    "logo": {
//      "padding": {
//        "top": 2
//      }
//    },

    "logo": {
      "source": "none"
    },

    "display": {
      "separator": "",
      "constants": [
        // CONSTANT {$1} - VERTICAL BARS AT START AND 75th CHARACTERS FORWARD AND BACKWARD
        "\u001b[90mโ”‚                                                            โ”‚\u001b[60D\u001b[39m"
      ]
    },
    "modules": [
      // CUSTOM - Top UI bar
      {
       //EMPTY ROW FIRST
        "type": "custom",
        "key": " ",
        "format": " "
      },
      {
        "type": "custom",
        "key": "{#90}โ•ญ Keys โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ",
        "format": "{#90}โ•ญ Values โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ"
      },
//      {
//        "type": "title",
//        "key": "{#90}โ”‚ {#92}User        {#90}โ”‚",
//        "format": "{$1}{user-name}@{host-name}  {#2}[{home-dir}]"
//      },
//      {
//        "type": "title",
//        "key": "{#90}โ”‚ {#92}Host        {#90}โ”‚",
//        "format": "{$1}{host-name}"
//      },
      {
        "type": "host",
        "key": "{#90}โ”‚ {#92}Machine     {#90}โ”‚",
        "format": "{$1}{name} {#2}{version}"
      },
      {
        "type": "os",
        "key": "{#90}โ”‚ {#92}OS          {#90}โ”‚",
        "format": "{$1}{?pretty-name}{pretty-name}{?}{/pretty-name}{name}{/}{codename} {#2}[v{version}] [{arch}]"
      },
      {
        "type": "kernel",
        "key": "{#90}โ”‚ {#93}Kernel      {#90}โ”‚",
        "format": "{$1}{sysname} {#2}[v{release}]"
      },
      {
      "type": "de",
        "key": "{#90}โ”‚ {#93}DE       {#90}   โ”‚",
        "format": "{$1}{2} {#2}[v{3}]"
      },

//      {
//        "type": "uptime",
//        "key": "{#90}โ”‚ {#93}Uptime      {#90}โ”‚",
//        "format": "{$1}{?days}{days} Days + {?}{hours}:{minutes}:{seconds}"
//      },
      {
        "type": "command",
        "key": "{#90}โ”‚ {#91}Running     {#90}โ”‚",
        "text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); years=$((days_difference / 365)); rem_days=$((days_difference % 365)); months=$((rem_days / 30)); rem_days=$((rem_days % 30)); weeks=$((rem_days / 7)); days=$((rem_days % 7)); plural() { local n=$1; local word=$2; if [ \"$n\" -eq 1 ]; then echo \"$n $word\"; else echo \"$n ${word}s\"; fi; }; out=\"\"; [ \"$years\" -gt 0 ] && out=\"$(plural \"$years\" year)\"; [ \"$months\" -gt 0 ] && out=\"${out}${out:+, }$(plural \"$months\" month)\"; [ \"$weeks\" -gt 0 ] && out=\"${out}${out:+, }$(plural \"$weeks\" week)\"; [ \"$days\" -gt 0 ] && out=\"${out}${out:+ and }$(plural \"$days\" day)\"; echo \"$out\"",
        "format": "{$1}{1}"
      },
      {
        "type": "packages",
        "key": "{#90}โ”‚ {#91}Packages    {#90}โ”‚",
        "format": "{$1}{1}"
      },
      {
        "type": "cpu",
        "key": "{#90}โ”‚ {#96}CPU         {#90}โ”‚",
        "showPerCoreCount": true,
        "temp": true,
        "format": "{$1}{name} {#2}[C:{core-types}] [{freq-max}]"
      },
      {
        "type": "gpu",
        "key": "{#90}โ”‚ {#96}GPU         {#90}โ”‚",
        "detectionMethod": "auto",
        "driverSpecific": true,
        "format": "{$1}{name} {#2}[C:{core-count}]{?frequency} [{frequency}]{?} {#2}[{type}]"
      },
      {
        "type": "memory",
        "key": "{#90}โ”‚ {#97}Memory      {#90}โ”‚",
        "format": "{$1}{used} / {total} ({percentage})"
      },
      ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      // DISK hangs very often and completely freezes fastfetch, so bye bye disk, hello disk for single partitions:
      //      {
      //        "type": "disk",
      //        "key": "{#90}โ”‚ {#97}Disk        {#90}โ”‚",
      //        "format": "{$1}{size-used} / {size-total} ({size-percentage})"
      //      },
       {
        "type": "command",
        "key": "{#90}โ”‚ {#95}Boot        {#90}โ”‚",
        "text": "df -h /boot | awk 'NR==2 {used=$3; total=$2; pct=$5; gsub(/[%\\)]/, \"\", pct); print used \" / \" total \" (\" pct \"%)\"}'",
        "format": "{$1}{1}"
      },
      {
        "key": "{#90}โ”‚ {#95}Root        {#90}โ”‚",
        "type": "disk",
        "folders": "/",
        "format": "{$1}{size-used} / {size-total} ({size-percentage})"
      },
      {
        "key": "{#90}โ”‚ {#95}Home        {#90}โ”‚",
        "type": "disk",
        "folders": "/home",
        "format": "{$1}{size-used} / {size-total} ({size-percentage})"
      },
      {
        "key": "{#90}โ”‚ {#95}Apps        {#90}โ”‚",
        "type": "disk",
        "folders": "/apps",
        "format": "{$1}{size-used} / {size-total} ({size-percentage})"
      },
      {
        "key": "{#90}โ”‚ {#95}Rootbackup  {#90}โ”‚",
        "type": "disk",
        "folders": "/mnt/rootbackup",
        "format": "{$1}{size-used} / {size-total} ({size-percentage})"
      },
      {
        "key": "{#90}โ”‚ {#95}Databackup  {#90}โ”‚",
        "type": "disk",
        "folders": "/mnt/databackup",
        "format": "{$1}{size-used} / {size-total} ({size-percentage})"
      },
      ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      {
        "type": "poweradapter",
        "key": "{#90}โ”‚ {#91}Power       {#90}โ”‚",
        "format": "{$1}{name}"
      },
      {
        "type": "terminal",
        "key": "{#90}โ”‚ {#94}Terminal    {#90}โ”‚",
        "format": "{$1}{pretty-name} {#2}[{version}] [PID:{pid}]"
      },
      {
        "type": "shell",
        "key": "{#90}โ”‚ {#94}Shell       {#90}โ”‚",
        "format": "{$1}{pretty-name} {#2}[v{version}] [PID:{pid}]"
      },
      {
        "type": "terminalfont",
        "key": "{#90}โ”‚ {#94}Font        {#90}โ”‚",
        "format": "{$1}{name} {#2}[{size}]"
      },
      {
        // localip IPv4
        "type": "localip",
        "key": "{#90}โ”‚ {#90}Local IPv4  {#90}โ”‚",
        "showPrefixLen": true,
        "showIpv4": true,
        "showIpv6": false,
        "showMtu": true,
        "format": "{$1}{ifname}: {ipv4} {#2}[MTU:{mtu}]"
      },
      {
        // localip IPv6
        "type": "localip",
        "key": "{#90}โ”‚ {#90}Local IPv6  {#90}โ”‚",
        "showPrefixLen": true,
        "showIpv4": false,
        "showIpv6": true,
        "showMtu": true,
        "format": "{$1}{ifname}: {ipv6} {#2}[MTU:{mtu}]"
      },
      // CUSTOM - Button UI bar

      {
        "type": "custom",
        "key": "{#90}โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ",
        "format": "{#90}โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ",
      },
      /*
      "break",
      {
        "type": "custom",
        "key": " ",
        "format": "{#90}โ•ญ Colors โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ",
      },
      {
        "type": "custom",
        "format": "{#90}โ”‚ {#40}   {#41}   {#42}   {#43}   {#44}   {#45}   {#46}   {#47}   {#}                                                  {#90}โ”‚",
      },
      {
        "type": "custom",
        "format": "{#90}โ”‚ {#100}   {#101}   {#102}   {#103}   {#104}   {#105}   {#106}   {#107}   {#}                                                  {#90}โ”‚",
      },
      {
        "type": "custom",
        "format": "{#90}โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ",
      },
      */
    ]
  }

It works on my system :grin: . All up to date. (LLMโ€™s are hardly ever helpful, just a huge waste of energy :wink: )

Really? You tried exactly my config code and it gave you:

โ”‚ Packages โ”‚โ”‚ xxxx โ”‚

including the trailing โ”‚?

How can this be?

It shows 0 packages on two completely different systems here (Cachy and Endeavour) as soon as I add the format":"{$1}{1}"

o.0

I reproduced the problem, but I think the dev just added more options and forgot/borked the old defaults.

According to this: fastfetch-wiki/Json-Schema.md at master ยท fastfetch-cli/fastfetch-wiki ยท GitHub

instead of
format":"{$1}{1}"
try
format":"{$1}{pacman}"

That worked perfectly, thank you very much!

I guess Iโ€™ll never understand that strange config language because Iโ€™m unable to understand these schema tables :confounded_face:

Itโ€™s people like you that make me want to stick to Linux despite its quirks. :+1:

Good grabbing.

Their docs are a nightmare.

But I had a similar conclusion of sorts while looking through the module things.

That is going through

I could not find how the {1} should be functional but I could find reference to using the name itself (with various examples including our pacman).

And being unfamiliar with FastFetch I thought I was just not seeing the necessary bits, so could not be helpful, and moved on. :sweat_smile:

Honestly, with these fastfetch configs, I just go:

and randomly copy/paste snippets from the web until it looks okay :grin:

You certainly have a sense of humor. But itโ€™s good that you label satire as such :grin:

I just happened to be messing with fastfetch last week and gave up in figuring out my bug, but had an idea of where to look. 99% of those formatting commands are a mystery to me.

Iโ€™ve only been daily driving Linux for less than a year, so Iโ€™m happy to help where I can. Itโ€™s been refreshing to troubleshoot through communities like in the โ€˜old daysโ€™, rather than dodging endless clickbait and shovelware promos.