fastfetch
fastfetch copied to clipboard
[FEAT] Secondary key in modules
Wanted features:
The ability to set a secondary key in every module list.
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"padding": {
"top": 2
}
},
"display": { "separator": " ➜ " },
"modules": [
{ "type": "title", "keyWidth": 10 },
"break",
{ "type": "os", "key": "OS", "keyColor": "white" },
{ "type": "kernel", "key": "├ Kernel", "keyColor": "white" },
{ "type": "packages", "key": "├ Packages", "keyColor": "white" },
{ "type": "uptime", "key": "└ Uptime", "keyColor": "white" }
]
}
Example
"display": {
"separator": " ➜ "
},
"modules": [
{
"type": "kernel",
"key": "├",
"keyColor": "white",
"secondary": "kernel",
"keyColor": "blue"
},
],
Motivation:
I would like to migrate my old neofetch config, but i cannot reproduce it using the current configuration.
Currently, with available module settings
What i would like to reproduce
You may insert ANSI escape code directly in key
eg:
{
"type": "kernel",
"key": "├ \u001b[34mkernel"
}
Seems ugly though.
{ "type": "kernel", "key": "├ \u001b[34mkernel" }
I guess the following configuration error:
Error: failed to parse JSON config file `/home/sigmanificient/.config/fastfetch/config.jsonc` at pos 513: unexpected character
I may already by fixed, packages version is fastfetch 2.10.2 (x86_64) here.
It also does it on the latest vresion i just built (fastfetch 2.11.3 (x86_64))
It was weird. Can you upload your config file for investigation?
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"padding": {
"top": 2
}
},
"display": {
"separator": " ➜ "
},
"modules": [
{
"type": "title",
"keyWidth": 10
},
"break",
{
"type": "os",
"key": "OS",
"keyColor": "white"
},
{
"type": "kernel",
"key": "├ \u001b[34mkernel"
}
{
"type": "packages",
"key": "├ Packages",
"keyColor": "white"
},
{
"type": "uptime",
"key": "└ Uptime",
"keyColor": "white"
}
]
}
You missed a comma after { "type": "kernel", "key": "├ \u001b[34mkernel" }
You missed a comma after
{ "type": "kernel", "key": "├ \u001b[34mkernel" }
Oops my bad