Closed sudoshindo closed 7 months ago
Maybe
{
"type": "title",
"format": "bob{7}{8}"
}
See fastfetch --help title-format
for detail
Okay, that does seem to work, but I guess fastfetch won't use the appropriate color on the custom string you specify.
You should use \u001b
in JSON. Try \u001b[38;5;39m
Okay, I got what I wanted with this "format": "\u001b[38;5;39m\u001b[1mbob\u001b[0m{7}{8}"
.
Sets the color, makes it bold, undo the formatting before printing @
.
I want to ask this though, would you be opposed to implementing config overrides for the user and host strings? Would that be too niche of a use-case since I'm the only one you encountered that tried to do this?
I would imagine it would look something like this:
{
"modules": [
{
"type": "title",
"overrides": {
"host": "windows",
"user": "bob"
},
"format": "{6}{7}{8}"
}
]
}
If I had to think of a reason why other people would use this option, it's just to customize the presentation of their outputs. These fetch utilities are mostly seen in unixporn screenshots after all, and those guys love presentation.
My personal reason for doing this is privacy, sometimes I don't want to show the default username that's set on my system.
No, I don't like the idea.
If you really want to change the username that fastfetch detected, you may use USER=bob fastfetch
.
No, I don't like the idea.
Very understandable.
you may use
USER=bob fastfetch
This is way simpler, thanks. I could put this in an alias or function that overrides fastfetch.
I recently migrated my old conf file using the
--migrate-config
flag.In the old config I remember that I was able to override the
user@host
part of the output with my own specified string.Like for example changing
john@linux
tobob@linux
.I'm still not used to the new config and unsure how to do that.
My current config.jsonc, v2.2.3 (latest available version on Fedora 39)