-
Hey all, I have searched relentlessly for an answer, but every solution I've found doesn't seem to be working. I want to dynamically add spaces at the end of output, using the jsonc settings. The problem is, trying the padding options (ie <5 or >5) does not work properly when trying to apply it to the full format string, rather than just individual parts of it. I don't want to simply add whitespace at the end of one variable (ie {1<5}, which behaves as expected) but the end of the entire format string, as I am trying to draw a box around the entire fetch. Normally, this could be solved by manually adding in spaces, but some values change their length rather regularly (ie RAM usage). The trouble is, if a value were to change its length, it would break the entire table. Here, you can see in the packages module, that if flatpaks were set to 0 (or any single digit number), the table would break: Is there any way to do what I'm trying to do here? Have I missed something obvious? Attaching my config file, but keep in mind I call a few scripts that I wrote in commands (helper functions mostly). {
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"source": "/home/claire/.config/fastfetch/logos/trans_arch.txt",
"color": {
"1": "cyan",
"2": "magenta",
"3": "white"
},
"padding": {
"top": 10,
"left": 18,
},
},
"display": {
"color": {
"separator": "blue",
},
"separator": "",
"constants": ["│"]
},
"modules": [
"break",
"break",
{
"type": "version",
"key": " ",
"format": "┌───────────────┬─────{1}─{2}─────────────────────┐",
"outputColor": "blue"
},
{
"type": "kernel",
"key": "│ Arch │ ",
"format": "{1} {2} {#blue}│",
"keyColor": "blue",
},
{
"type": "datetime",
"key": "│ Fetched │ ",
"format": "{1}-{4}-{23} {14}:{18}:{20} {22} {#blue}│",
"keyColor": "blue"
},
{
"type": "locale",
"key": "│ Locale │ ",
"format": "{1} {#blue}│",
"keyColor": "blue"
},
{
"type": "custom",
"format": "{#blue}│{#cyan}┌──────────────┬────────Hardware─────────────────────────┐{#blue}│",
"outputColor": "cyan",
},
{
"type": "chassis",
"key": "{#blue}│{#cyan}│ Chassis │ ",
"format": "{1} {#cyan}│{#blue}│",
"keyColor": "cyan",
},
{
"type": "memory",
"key": "{#blue}│{#cyan}│ RAM │ ",
"format": "{1} \/ {2} ({3}) {#cyan}│{#blue}│",
"keyColor": "cyan",
},
{
"type": "cpu",
"key": "{#blue}│{#cyan}│ CPU │ ",
"format": "{1} ({4}) @ {7} {#cyan}│{#blue}│",
"showPeCoreCount": true,
"keyColor": "cyan",
},
{
"type": "gpu",
"key": "{#blue}│{#cyan}│ GPU │ ",
"format": "{1} {2} [{6}]{#cyan}│{#blue}│",
"keyColor": "cyan",
},
{
"type": "disk",
"folders": "/",
"key": "{#blue}│{#cyan}│ Disk │ ",
"format": "{1} \/ {2} ({3}) - {9} {#cyan}│{#blue}│",
"keyColor": "cyan",
},
{
"type": "disk",
"folders": "/run/media/claire/Storage",
"key": "{#blue}│{#cyan}│ Disk │ ",
"format": "{1} \/ {2} ({3}) - {9} {#cyan}│{#blue}│",
"keyColor": "cyan",
},
{
"type": "custom",
"format": "{#blue}│{#cyan}└──────────────┴─────────────────────────────────────────┘{#blue}│",
"outputColor": "cyan",
},
{
"type": "custom",
"format": "{#blue}│{#green}┌──────────────┬────────Desktop──────────────────────────┐{#blue}│",
"outputColor": "green",
},
{
"type": "de",
"key": "{#blue}│{#green}│ Desktop │ ",
"format": "{2} {3} {#green}│{#blue}│",
"keyColor": "green",
},
{
"type": "wm",
"key": "{#blue}│{#green}│ Session │ ",
"format": "{2} {5} ({3}) {#green}│{#blue}│",
"keyColor": "green",
},
{
"type": "gpu",
"key": "{#blue}│{#green}│ G-Driver │ ",
"format": "{3} {#green}│{#blue}│",
"keyColor": "green",
},
{
"type": "custom",
"format": "{#blue}│{#green}└──────────────┴─────────────────────────────────────────┘{#blue}│",
"outputColor": "green",
},
{
"type": "custom",
"format": "{#blue}│{#yellow}┌──────────────┬────────Terminal─────────────────────────┐{#blue}│",
"outputColor": "yellow",
},
{
"type": "shell",
"key": "{#blue}│{#yellow}│ Shell │ ",
"format": "{6} {4} {#yellow}│{#blue}│",
"keyColor": "yellow",
},
{
"type": "terminal",
"key": "{#blue}│{#yellow}│ Terminal │ ",
"format": "{5} {6} {#yellow}│{#blue}│",
"keyColor": "yellow",
},
{
"type": "command",
"shell": "/bin/zsh",
"key": "{#blue}│{#yellow}│ Font │ ",
"keyColor": "yellow",
"text": "/home/claire/.config/fastfetch/helpers/terminal_font_fastfetch",
"outputColor": "white",
},
{
"type": "terminaltheme",
"key": "{#blue}│{#yellow}│ Colors │ ",
"format": "{1} (FG) - {3} (BG) {#yellow}│{#blue}│",
"keyColor": "yellow"
},
{
"type": "packages",
"key": "{#blue}│{#yellow}│ Packages │ ",
"format": "{2} (pacman), {14} (flatpak) {#yellow}│{#blue}│",
"keyColor": "yellow",
},
{
"type": "custom",
"format": "{#blue}│{#yellow}└──────────────┴─────────────────────────────────────────┘{#blue}│",
"outputColor": "yellow",
},
{
"type": "custom",
"format": "{#blue}│{#red}┌──────────────┬──────────Dev────────────────────────────┐{#blue}│",
"outputColor": "red",
},
{
"type": "command",
"key": "{#blue}│{#red}│ Rust │ ",
"keyColor": "red",
"text": "/home/claire/.config/fastfetch/helpers/rust_version_fastfetch"
},
{
"type": "command",
"key": "{#blue}│{#red}│ Clang │ ",
"keyColor": "red",
"text": "echo -n 'clang '; /home/claire/.config/fastfetch/helpers/clang_version_fastfetch"
},
{
"type": "editor",
"key": "{#blue}│{#red}│ Editor │ ",
"format": "{2} {5} {#red}│{#blue}│",
"keyColor": "red",
},
{
"type": "font",
"key": "{#blue}│{#red}│ Interface │ ",
"format": "{1} {#red}│{#blue}│",
"keyColor": "red",
},
{
"type": "command",
"key": "{#blue}│{#red}│ Monospace │ ",
"keyColor": "red",
"text": "/home/claire/.config/fastfetch/helpers/monospace_font_fastfetch",
},
{
"type": "custom",
"format": "{#blue}│{#red}└──────────────┴─────────────────────────────────────────┘{#blue}│",
"outputColor": "red",
},
{
"type": "custom",
"format": "{#blue}│{#magenta}┌──────────────┬────────Uptime───────────────────────────┐{#blue}│",
"outputColor": "magenta",
},
{
"type": "uptime",
"key": "{#blue}│{#magenta}│ Uptime │ ",
"format": "{2} hours, {3} mins {#magenta}│{#blue}│",
"keyColor": "magenta",
},
{
"type": "command",
"key": "{#blue}│{#magenta}│ OS Age │ ",
"keyColor": "magenta",
"text": "/home/claire/.config/fastfetch/helpers/os_age",
},
{
"type": "custom",
"format": "{#blue}│{#magenta}└──────────────┴─────────────────────────────────────────┘{#blue}│",
"outputColor": "magenta",
},
{
"type": "custom",
"format": "└──────────────────────────────────────────────────────────┘",
"outputColor": "blue",
},
"break",
"colors",
"break",
"break",
],
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
FYI: https://github.com/fastfetch-cli/fastfetch/blob/dev/presets/examples/25.jsonc |
Beta Was this translation helpful? Give feedback.
FYI: https://github.com/fastfetch-cli/fastfetch/blob/dev/presets/examples/25.jsonc