config.jsonc
· 3.5 KiB · Text
Sin formato
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"display": {
"separator": ": ",
"showErrors": false
},
"modules": [
"title",
"separator",
{
"type": "command",
"key": "OS Detail",
"text": "echo \"Debian GNU/Linux $(cat /etc/debian_version) ($( . /etc/os-release; printf '%s' \"$VERSION_CODENAME\" )) $(uname -m)\""
},
"host",
{
"type": "bios",
"key": "BIOS",
"format": "{vendor} {version} ({date})"
},
"kernel",
"uptime",
"packages",
"shell",
"terminal",
{
"type": "command",
"key": "User Accounts",
"text": "getent passwd | awk -F: '$3 >= 1000 && $3 < 65534 && $7 !~ /(nologin|false)$/ {printf \"%s%s\", sep, $1; sep=\", \"} END {if (sep == \"\") printf \"none\"; print \"\"}'"
},
"cpu",
"gpu",
"memory",
"swap",
{
"type": "disk",
"key": "Disk"
},
{
"type": "command",
"key": "Ethernet",
"text": "found=0; for p in /sys/class/net/*; do i=${p##*/}; [ \"$i\" = \"lo\" ] && continue; [ -d \"$p/wireless\" ] && continue; case \"$i\" in docker0|br-*|veth*|virbr*|vmnet*|tun*|tap*|wg*|tailscale*|podman*|cni*|flannel*|vxlan*) continue ;; esac; a=$(ip -o -4 addr show dev \"$i\" scope global | awk 'NR==1 {print $4}'); [ -z \"$a\" ] && a=\"no IPv4\"; s=$(cat \"$p/operstate\" 2>/dev/null || printf unknown); m=$(cat \"$p/address\" 2>/dev/null || printf unknown); [ \"$found\" -eq 1 ] && printf ' | '; printf '\\033[96m(%s)\\033[0m: %s [\\033[32m%s\\033[0m] - (%s)' \"$i\" \"$a\" \"$s\" \"$m\"; found=1; done; [ \"$found\" -eq 0 ] && printf 'No Ethernet device found'"
},
{
"type": "command",
"key": "Docker Bridge",
"text": "found=0; for p in /sys/class/net/docker0 /sys/class/net/br-*; do [ -e \"$p\" ] || continue; i=${p##*/}; a=$(ip -o -4 addr show dev \"$i\" scope global | awk 'NR==1 {print $4}'); [ -z \"$a\" ] && a=\"no IPv4\"; s=$(cat \"$p/operstate\" 2>/dev/null || printf unknown); m=$(cat \"$p/address\" 2>/dev/null || printf unknown); [ \"$found\" -eq 1 ] && printf ' | '; printf '\\033[96m(%s)\\033[0m: %s [\\033[32m%s\\033[0m] - (%s)' \"$i\" \"$a\" \"$s\" \"$m\"; found=1; done; [ \"$found\" -eq 0 ] && printf 'none'"
},
{
"type": "command",
"key": "Docker VETH",
"text": "n=0; for p in /sys/class/net/veth*; do [ -e \"$p\" ] || continue; n=$((n+1)); done; if [ \"$n\" -eq 1 ]; then printf '1 interface'; else printf '%s interfaces' \"$n\"; fi"
},
{
"type": "command",
"key": "Wi-Fi",
"text": "found=0; for p in /sys/class/net/*; do i=${p##*/}; [ -d \"$p/wireless\" ] || continue; a=$(ip -o -4 addr show dev \"$i\" scope global | awk 'NR==1 {print $4}'); [ -z \"$a\" ] && a=\"no IPv4\"; s=$(cat \"$p/operstate\" 2>/dev/null || printf unknown); m=$(cat \"$p/address\" 2>/dev/null || printf unknown); [ \"$found\" -eq 1 ] && printf ' | '; printf '\\033[96m(%s)\\033[0m: %s [%s] - (%s)' \"$i\" \"$a\" \"$s\" \"$m\"; found=1; done; [ \"$found\" -eq 0 ] && printf 'none'"
},
{
"type": "wifi",
"key": "SSID"
},
{
"type": "publicip",
"key": "Public IP"
},
{
"type": "bluetoothradio",
"key": "Bluetooth Radio",
"format": "{name} - {vendor} - Bluetooth {version}"
},
{
"type": "bluetooth",
"key": "Bluetooth Device",
"showDisconnected": true,
"format": "{name} [{address}] - connected: {connected}"
},
"locale",
"break",
"colors"
]
}
| 1 | { |
| 2 | "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", |
| 3 | |
| 4 | "display": { |
| 5 | "separator": ": ", |
| 6 | "showErrors": false |
| 7 | }, |
| 8 | |
| 9 | "modules": [ |
| 10 | "title", |
| 11 | "separator", |
| 12 | |
| 13 | { |
| 14 | "type": "command", |
| 15 | "key": "OS Detail", |
| 16 | "text": "echo \"Debian GNU/Linux $(cat /etc/debian_version) ($( . /etc/os-release; printf '%s' \"$VERSION_CODENAME\" )) $(uname -m)\"" |
| 17 | }, |
| 18 | |
| 19 | "host", |
| 20 | |
| 21 | { |
| 22 | "type": "bios", |
| 23 | "key": "BIOS", |
| 24 | "format": "{vendor} {version} ({date})" |
| 25 | }, |
| 26 | |
| 27 | "kernel", |
| 28 | "uptime", |
| 29 | "packages", |
| 30 | "shell", |
| 31 | "terminal", |
| 32 | |
| 33 | { |
| 34 | "type": "command", |
| 35 | "key": "User Accounts", |
| 36 | "text": "getent passwd | awk -F: '$3 >= 1000 && $3 < 65534 && $7 !~ /(nologin|false)$/ {printf \"%s%s\", sep, $1; sep=\", \"} END {if (sep == \"\") printf \"none\"; print \"\"}'" |
| 37 | }, |
| 38 | |
| 39 | "cpu", |
| 40 | "gpu", |
| 41 | "memory", |
| 42 | "swap", |
| 43 | |
| 44 | { |
| 45 | "type": "disk", |
| 46 | "key": "Disk" |
| 47 | }, |
| 48 | |
| 49 | { |
| 50 | "type": "command", |
| 51 | "key": "Ethernet", |
| 52 | "text": "found=0; for p in /sys/class/net/*; do i=${p##*/}; [ \"$i\" = \"lo\" ] && continue; [ -d \"$p/wireless\" ] && continue; case \"$i\" in docker0|br-*|veth*|virbr*|vmnet*|tun*|tap*|wg*|tailscale*|podman*|cni*|flannel*|vxlan*) continue ;; esac; a=$(ip -o -4 addr show dev \"$i\" scope global | awk 'NR==1 {print $4}'); [ -z \"$a\" ] && a=\"no IPv4\"; s=$(cat \"$p/operstate\" 2>/dev/null || printf unknown); m=$(cat \"$p/address\" 2>/dev/null || printf unknown); [ \"$found\" -eq 1 ] && printf ' | '; printf '\\033[96m(%s)\\033[0m: %s [\\033[32m%s\\033[0m] - (%s)' \"$i\" \"$a\" \"$s\" \"$m\"; found=1; done; [ \"$found\" -eq 0 ] && printf 'No Ethernet device found'" |
| 53 | }, |
| 54 | |
| 55 | { |
| 56 | "type": "command", |
| 57 | "key": "Docker Bridge", |
| 58 | "text": "found=0; for p in /sys/class/net/docker0 /sys/class/net/br-*; do [ -e \"$p\" ] || continue; i=${p##*/}; a=$(ip -o -4 addr show dev \"$i\" scope global | awk 'NR==1 {print $4}'); [ -z \"$a\" ] && a=\"no IPv4\"; s=$(cat \"$p/operstate\" 2>/dev/null || printf unknown); m=$(cat \"$p/address\" 2>/dev/null || printf unknown); [ \"$found\" -eq 1 ] && printf ' | '; printf '\\033[96m(%s)\\033[0m: %s [\\033[32m%s\\033[0m] - (%s)' \"$i\" \"$a\" \"$s\" \"$m\"; found=1; done; [ \"$found\" -eq 0 ] && printf 'none'" |
| 59 | }, |
| 60 | |
| 61 | { |
| 62 | "type": "command", |
| 63 | "key": "Docker VETH", |
| 64 | "text": "n=0; for p in /sys/class/net/veth*; do [ -e \"$p\" ] || continue; n=$((n+1)); done; if [ \"$n\" -eq 1 ]; then printf '1 interface'; else printf '%s interfaces' \"$n\"; fi" |
| 65 | }, |
| 66 | |
| 67 | { |
| 68 | "type": "command", |
| 69 | "key": "Wi-Fi", |
| 70 | "text": "found=0; for p in /sys/class/net/*; do i=${p##*/}; [ -d \"$p/wireless\" ] || continue; a=$(ip -o -4 addr show dev \"$i\" scope global | awk 'NR==1 {print $4}'); [ -z \"$a\" ] && a=\"no IPv4\"; s=$(cat \"$p/operstate\" 2>/dev/null || printf unknown); m=$(cat \"$p/address\" 2>/dev/null || printf unknown); [ \"$found\" -eq 1 ] && printf ' | '; printf '\\033[96m(%s)\\033[0m: %s [%s] - (%s)' \"$i\" \"$a\" \"$s\" \"$m\"; found=1; done; [ \"$found\" -eq 0 ] && printf 'none'" |
| 71 | }, |
| 72 | |
| 73 | { |
| 74 | "type": "wifi", |
| 75 | "key": "SSID" |
| 76 | }, |
| 77 | |
| 78 | { |
| 79 | "type": "publicip", |
| 80 | "key": "Public IP" |
| 81 | }, |
| 82 | |
| 83 | { |
| 84 | "type": "bluetoothradio", |
| 85 | "key": "Bluetooth Radio", |
| 86 | "format": "{name} - {vendor} - Bluetooth {version}" |
| 87 | }, |
| 88 | |
| 89 | { |
| 90 | "type": "bluetooth", |
| 91 | "key": "Bluetooth Device", |
| 92 | "showDisconnected": true, |
| 93 | "format": "{name} [{address}] - connected: {connected}" |
| 94 | }, |
| 95 | |
| 96 | "locale", |
| 97 | "break", |
| 98 | "colors" |
| 99 | ] |
| 100 | } |
| 101 |