From d21048c165cbaca0aab992d594a34f3af55e1dbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Fri, 21 Mar 2025 09:41:53 +0800 Subject: [PATCH] Presets: update examples/{24,26} [ci skip] --- presets/examples/24.jsonc | 22 ++--- presets/examples/26.jsonc | 165 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 176 insertions(+), 11 deletions(-) create mode 100644 presets/examples/26.jsonc diff --git a/presets/examples/24.jsonc b/presets/examples/24.jsonc index 37c27c4b2..b9f8fef65 100644 --- a/presets/examples/24.jsonc +++ b/presets/examples/24.jsonc @@ -28,38 +28,38 @@ { "type": "title", "key": "{#90}{$1}│ {#92}User {#90}│", - "format": "{$2}{$3}{user-name} {#2}[{home-dir}]" + "format": "{$2}{$3}{user-name} {#2}[{home-dir}]" }, { "type": "users", "key": "{#90}{$1}│ {#92}Users {#90}│", "myselfOnly": false, - "format": "{$2}{$3}{1}@{host-name}{/host-name}localhost{/}{?client-ip} {#2}[IP:{client-ip}]{?} {#2}[Login time: {login-time}]", + "format": "{$2}{$3}{1}@{host-name}{/host-name}localhost{/}{?client-ip} {#2}[IP:{client-ip}]{?} [Login time: {login-time}]" }, { "type": "datetime", "key": "{#90}{$1}│ {#92}Datetime {#90}│", - "format": "{$2}{$3}{year}-{month-pretty}-{day-in-month} {hour-pretty}:{minute-pretty}:{second-pretty} {#2}{weekday} {#2}[W{week}] {#2}[UTC{offset-from-utc}]" + "format": "{$2}{$3}{year}-{month-pretty}-{day-in-month} {hour-pretty}:{minute-pretty}:{second-pretty} [{weekday}] [W{week}] [UTC{offset-from-utc}]" }, { "type": "title", - "key": "{#90}{$1}│ {#93}Host: {#90}│", - "format": "{$2}{$3}{#1}{#36}{host-name}" + "key": "{#90}{$1}│ {#93}Host {#90}│", + "format": "{$2}{$3}{host-name}" }, { "type": "host", "key": "{#90}{$1}│ {#93}Machine {#90}│", - "format": "{$2}{$3}{name} {#2}{version}" + "format": "{$2}{$3}{name} {#2}{version}" }, { "type": "os", "key": "{#90}{$1}│ {#93}OS {#90}│", - "format": "{$2}{$3}{pretty-name} {codename} {#2}[v{version}] {#2}[{arch}]" + "format": "{$2}{$3}{?pretty-name}{pretty-name}{?}{/pretty-name}{name}{/} {codename} {#2}[v{version}] [{arch}]" }, { "type": "kernel", "key": "{#90}{$1}│ {#93}Kernel {#90}│", - "format": "{$2}{$3}{sysname} {#2}[v{release}]" + "format": "{$2}{$3}{sysname} {#2}[v{release}]" }, { "type": "uptime", @@ -71,14 +71,14 @@ "key": "{#90}{$1}│ {#91}CPU {#90}│", "showPeCoreCount": true, "temp": true, - "format": "{$2}{$3}{name} {#2}[C:{core-types}] {#2}[{freq-max}]" + "format": "{$2}{$3}{name} {#2}[C:{core-types}] [{freq-max}]" }, { "type": "gpu", "key": "{#90}{$1}│ {#91}GPU {#90}│", "detectionMethod": "auto", "driverSpecific": true, - "format": "{$2}{$3}{name} {#2}[C:{core-count}] {#2}[{type}]" + "format": "{$2}{$3}{name} {#2}[C:{core-count}]{?frequency} [{frequency}]{?} [{type}]" }, { "type": "memory", @@ -98,7 +98,7 @@ { "type": "terminal", "key": "{#90}{$1}│ {#95}Terminal {#90}│", - "format": "{$2}{$3}{pretty-name} {#2}[{version}] [PID:{pid}]" + "format": "{$2}{$3}{pretty-name} {#2}[{version}] [PID:{pid}]" }, { "type": "terminalfont", diff --git a/presets/examples/26.jsonc b/presets/examples/26.jsonc new file mode 100644 index 000000000..9029f5a5e --- /dev/null +++ b/presets/examples/26.jsonc @@ -0,0 +1,165 @@ +// Modified from: 24.jsonc +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "padding": { + "top": 2 + } + }, + "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 + { + "type": "custom", + "key": "{#90}╭ Keys ───────╮", + "format": "{#90}╭ Values ────────────────────────────────────────────────────╮", + }, + { + "type": "title", + "key": "{#90}│ {#92}User {#90}│", + "format": "{$1}{user-name} {#2}[{home-dir}]" + }, + { + "type": "users", + "key": "{#90}│ {#92}Users {#90}│", + "myselfOnly": false, + "format": "{$1}{1}@{host-name}{/host-name}localhost{/}{?client-ip} {#2}[IP:{client-ip}]{?} [Login time: {login-time}]" + }, + { + "type": "datetime", + "key": "{#90}│ {#92}Datetime {#90}│", + "format": "{$1}{year}-{month-pretty}-{day-in-month} {hour-pretty}:{minute-pretty}:{second-pretty} {#2}[{weekday}] [W{week}] [UTC{offset-from-utc}]" + }, + { + "type": "title", + "key": "{#90}│ {#93}Host {#90}│", + "format": "{$1}{host-name}" + }, + { + "type": "host", + "key": "{#90}│ {#93}Machine {#90}│", + "format": "{$1}{name} {#2}{version}" + }, + { + "type": "os", + "key": "{#90}│ {#93}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": "uptime", + "key": "{#90}│ {#93}Uptime {#90}│", + "format": "{$1}{?days}{days} Days + {?}{hours}:{minutes}:{seconds}" + }, + { + "type": "cpu", + "key": "{#90}│ {#91}CPU {#90}│", + "showPeCoreCount": true, + "temp": true, + "format": "{$1}{name} {#2}[C:{core-types}] [{freq-max}]" + }, + { + "type": "gpu", + "key": "{#90}│ {#91}GPU {#90}│", + "detectionMethod": "auto", + "driverSpecific": true, + "format": "{$1}{name} {#2}[C:{core-count}]{?frequency} [{frequency}]{?} {#2}[{type}]" + }, + { + "type": "memory", + "key": "{#90}│ {#91}Memory {#90}│", + "format": "{$1}{used} / {total} ({percentage})" + }, + { + "type": "disk", + "key": "{#90}│ {#91}Disk {#90}│", + "format": "{$1}{size-used} / {size-total} ({size-percentage})" + }, + { + "type": "poweradapter", + "key": "{#90}│ {#91}Power {#90}│", + "format": "{$1}{name}" + }, + { + "type": "terminal", + "key": "{#90}│ {#95}Terminal {#90}│", + "format": "{$1}{pretty-name} {#2}[{version}] [PID:{pid}]" + }, + { + "type": "terminalfont", + "key": "{#90}│ {#95}Font {#90}│", + "format": "{$1}{name} {#2}[{size}]" + }, + { + "type": "shell", + "key": "{#90}│ {#95}Shell {#90}│", + "format": "{$1}{pretty-name} {#2}[v{version}] [PID:{pid}]" + }, + { + // localip IPv4 + "type": "localip", + "key": "{#90}│ {#94}Local IPv4 {#90}│", + "showPrefixLen": true, + "showIpv4": true, + "showIpv6": false, + "showMtu": true, + "format": "{$1}{ifname}: {ipv4} {#2}[MTU:{mtu}]" + }, + { + // localip IPv6 + "type": "localip", + "key": "{#90}│ {#94}Local IPv6 {#90}│", + "showPrefixLen": true, + "showIpv4": false, + "showIpv6": true, + "showMtu": true, + "format": "{$1}{ifname}: {ipv6} {#2}[MTU:{mtu}]" + }, + { + "type": "publicip", + "key": "{#90}│ {#94}Public IPv4 {#90}│", + "ipv6": false, + "format": "{$1}{ip} {#2}[{location}]" + }, + { + "type": "publicip", + "key": "{#90}│ {#94}Public IPv6 {#90}│", + "ipv6": true, + "format": "{$1}{ip} {#2}[{location}]" + }, + // 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}╰───────────────────────────────────────────────────────────────────────────╯", + }, + ] + }