From 773c5b04c79d19be0fb61b72b9b1ff285438a58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sun, 25 Jun 2023 20:53:27 +0800 Subject: [PATCH] Presets: convert some `.conf` files to `.jsonc` files --- presets/all.jsonc | 55 ++++++++++++++++++++++++++++++ presets/btw.jsonc | 42 +++++++++++++++++++++++ presets/devinfo.jsonc | 49 +++++++++++++++++++++++++++ presets/examples/2.jsonc | 73 ++++++++++++++++++++++++++++++++++++++++ presets/examples/3.jsonc | 22 ++++++++++++ presets/examples/4.jsonc | 31 +++++++++++++++++ presets/examples/5.jsonc | 31 +++++++++++++++++ presets/hardware.jsonc | 25 ++++++++++++++ presets/neofetch | 5 ++- presets/neofetch.jsonc | 48 ++++++++++++++++++++++++++ presets/paleofetch.jsonc | 35 +++++++++++++++++++ presets/software.jsonc | 17 ++++++++++ 12 files changed, 430 insertions(+), 3 deletions(-) create mode 100644 presets/all.jsonc create mode 100644 presets/btw.jsonc create mode 100644 presets/devinfo.jsonc create mode 100644 presets/examples/2.jsonc create mode 100644 presets/examples/3.jsonc create mode 100644 presets/examples/4.jsonc create mode 100644 presets/examples/5.jsonc create mode 100644 presets/hardware.jsonc create mode 100644 presets/neofetch.jsonc create mode 100644 presets/paleofetch.jsonc create mode 100644 presets/software.jsonc diff --git a/presets/all.jsonc b/presets/all.jsonc new file mode 100644 index 000000000..b25c8baa8 --- /dev/null +++ b/presets/all.jsonc @@ -0,0 +1,55 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "modules": [ + "title", + "separator", + "os", + "host", + "bios", + "board", + "chassis", + "kernel", + "uptime", + "processes", + "packages", + "shell", + "display", + "brightness", + "lm", + "de", + "wm", + "wmtheme", + "theme", + "icons", + "font", + "cursor", + "wallpaper", + "terminal", + "terminalfont", + "cpu", + "cpuusage", + "gpu", + "memory", + "swap", + "disk", + "battery", + "poweradapter", + "player", + "media", + "publicip", + "localip", + "wifi", + "datetime", + "locale", + "vulkan", + "opengl", + "opencl", + "users", + "bluetooth", + "sound", + "gamepad", + "weather", + "break", + "colors" + ] +} diff --git a/presets/btw.jsonc b/presets/btw.jsonc new file mode 100644 index 000000000..8ad31e61a --- /dev/null +++ b/presets/btw.jsonc @@ -0,0 +1,42 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "type": "builtin", + "source": "arch" + }, + "modules": [ + "title", + "separator", + { + "type": "os", + "format": "Arch Linux ({12})" + }, + "host", + "kernel", + "uptime", + { + "type": "packages", + "format": "{} (pacman)" + }, + "shell", + "display", + "de", + "wm", + "wmtheme", + "theme", + "icons", + "font", + "cursor", + "terminal", + "terminalfont", + "cpu", + "gpu", + "memory", + "disk", + "battery", + "poweradapter", + "locale", + "break", + "colors" + ] +} diff --git a/presets/devinfo.jsonc b/presets/devinfo.jsonc new file mode 100644 index 000000000..450adb926 --- /dev/null +++ b/presets/devinfo.jsonc @@ -0,0 +1,49 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "type": "builtin", + "source": "arch" + }, + "display": { + "disableLinewrap": false, + "showErrors": true + }, + "general": { + "multithreading": false + }, + "modules": [ + "title", + "separator", + { + "type": "os", + "format": "Arch Linux ({12})" + }, + "host", + "kernel", + "uptime", + { + "type": "packages", + "format": "{} (pacman)" + }, + "shell", + "display", + "de", + "wm", + "wmtheme", + "theme", + "icons", + "font", + "cursor", + "terminal", + "terminalfont", + "cpu", + "gpu", + "memory", + "disk", + "battery", + "poweradapter", + "locale", + "break", + "colors" + ] +} diff --git a/presets/examples/2.jsonc b/presets/examples/2.jsonc new file mode 100644 index 000000000..d0e0814c6 --- /dev/null +++ b/presets/examples/2.jsonc @@ -0,0 +1,73 @@ +// Load with --load-config examples/2.jsonc +// Note that you must replace the image path to an existing image to display it. + +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "type": "kitty", + "source": "/home/linus/Bilder/Gentoo.png", + "width": 28 + }, + "display": { + "separator": "  " + }, + "modules": [ + { + "type": "custom", // HardwareStart + "format": "┌───────── \u001b[1mHardware Information\u001b[0m ─────────┐" // `\u001b` is `\033`, or `\e` + }, + { + "type": "host", + "key": " " + }, + { + "type": "cpu", + "key": " " + }, + { + "type": "gpu", + "key": " ﬙" + }, + { + "type": "custom", // SoftwareStart + "format": "├───────── \u001b[1mSoftware Information\u001b[0m ─────────┤" + }, + { + "type": "os", + "key": " " + }, + { + "type": "kernel", + "key": " " + }, + { + "type": "wm", + "key": " " + }, + { + "type": "shell", + "key": " " + }, + { + "type": "terminal", + "key": " " + }, + { + "type": "terminalfont", + "key": " " + }, + { + "type": "packages", + "key": " " + }, + { + "type": "custom", // InformationEnd + "format": "└────────────────────────────────────────┘" + }, + { + "type": "colors", + "paddingLeft": 4, + "symbol": "circle" + } + ] +} diff --git a/presets/examples/3.jsonc b/presets/examples/3.jsonc new file mode 100644 index 000000000..6ff5dabb6 --- /dev/null +++ b/presets/examples/3.jsonc @@ -0,0 +1,22 @@ +// Load with --load-config examples/3.jsonc + +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "source": "debian_small" + }, + "display": { + "binaryPrefix": "si" + }, + "modules": [ + "vulkan", + "opengl", + "opencl", + "memory", + { + "type": "disk", + "folders": "/:/home:/boot:/efi" + }, + "localip" + ] +} diff --git a/presets/examples/4.jsonc b/presets/examples/4.jsonc new file mode 100644 index 000000000..81040c0d8 --- /dev/null +++ b/presets/examples/4.jsonc @@ -0,0 +1,31 @@ +// Load with --load-config examples/4.jsonc + +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "source": "arch_small", + "padding": { + "right": 1 + } + }, + "display": { + "binaryPrefix": "si", + "color": "blue", + "separator": "  " + }, + "modules": [ + { + "type": "datetime", + "key": "Date", + "format": "{1}-{3}-{11}" + }, + { + "type": "datetime", + "key": "Time", + "format": "{14}:{17}:{20}" + }, + "break", + "player", + "media" + ] +} diff --git a/presets/examples/5.jsonc b/presets/examples/5.jsonc new file mode 100644 index 000000000..fefe2441d --- /dev/null +++ b/presets/examples/5.jsonc @@ -0,0 +1,31 @@ +// Load with --load-config examples/5.jsonc + +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "type": "none" + }, + "display": { + "color": "reset_magenta" + }, + "modules": [ + { + "type": "theme", + "key": "T", + "format": "{7}" + }, + { + "type": "icons", + "key": "I", + "format": "{5}" + }, + { + "type": "font", + "key": "F" + }, + { + "type": "cursor", + "key": "C" + } + ] +} diff --git a/presets/hardware.jsonc b/presets/hardware.jsonc new file mode 100644 index 000000000..d976285fc --- /dev/null +++ b/presets/hardware.jsonc @@ -0,0 +1,25 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "type": "builtin", + "source": "arch" + }, + "modules": [ + "host", + "display", + "cpu", + "gpu", + { + "type": "memory", + "format": "{?2}{2}{?}" + }, + { + "type": "disk", + "format": "{?2}{2}{?}" + }, + { + "type": "battery", + "format": "{?1}{1} {?}{?2}{2} {?}{?3}({3}){?}" + } + ] +} diff --git a/presets/neofetch b/presets/neofetch index 9861e3b99..925f4705b 100644 --- a/presets/neofetch +++ b/presets/neofetch @@ -1,10 +1,9 @@ --structure "Title:Separator:OS:Host:Kernel:Uptime:Packages:Shell:Display:DE:WM:WMTheme:Theme:Icons:Terminal:TerminalFont:CPU:GPU:Memory:Break:Colors" --host-format "{/2}{-}{/}{2}{?3} {3}{?}" --os-format "{3} {12}" ---display-format "{}x{}" +--display-key Resolution +--display-compact-type original --de-format "{2} {3}" --theme-format "{?1}{1}{?3} {3}{?} [Plasma], {?}{7}" --terminalfont-format "{/2}{-}{/}{2}{?3} {3}{?}" --memory-format "{/1}{-}{/}{/2}{-}{/}{} / {}" ---gpu-key "GPU" ---display-key "Display" diff --git a/presets/neofetch.jsonc b/presets/neofetch.jsonc new file mode 100644 index 000000000..b7bbaac47 --- /dev/null +++ b/presets/neofetch.jsonc @@ -0,0 +1,48 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "modules": [ + "title", + "separator", + { + "type": "os", + "format": "{3} {12}" + }, + { + "type": "host", + "format": "{/2}{-}{/}{2}{?3} {3}{?}" + }, + "kernel", + "uptime", + "packages", + "shell", + { + "type": "display", + "compactType": "original", + "key": "Resolution" + }, + "de", + "wm", + "wmtheme", + { + "type": "theme", + "format": "{?1}{1}{?3} {3}{?} [Plasma], {?}{7}" + }, + "icons", + "terminal", + { + "type": "terminalfont", + "format": "{/2}{-}{/}{2}{?3} {3}{?}" + }, + "cpu", + { + "type": "gpu", + "key": "GPU" + }, + { + "type": "memory", + "format": "{/1}{-}{/}{/2}{-}{/}{} / {}" + }, + "break", + "colors" + ] +} diff --git a/presets/paleofetch.jsonc b/presets/paleofetch.jsonc new file mode 100644 index 000000000..7fe9ea0aa --- /dev/null +++ b/presets/paleofetch.jsonc @@ -0,0 +1,35 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "modules": [ + "title", + "separator", + "os", + { + "type": "host", + "format": "{/2}{-}{/}{2}{?3} {3}{?}" + }, + "kernel", + "uptime", + { + "type": "battery", + "format": "{/4}{-}{/}{4}%{?5} [{5}]{?}" + }, + "break", + "packages", + "shell", + { + "type": "display", + "key": "Display" + }, + "terminal", + "break", + "cpu", + { + "type": "gpu", + "key": "GPU" + }, + "memory", + "break", + "colors" + ] +} diff --git a/presets/software.jsonc b/presets/software.jsonc new file mode 100644 index 000000000..b2715adaa --- /dev/null +++ b/presets/software.jsonc @@ -0,0 +1,17 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "modules": [ + "os", + "kernel", + "shell", + "de", + "wm", + "wmtheme", + "theme", + "icons", + "font", + "cursor", + "terminal", + "terminalfont" + ] +}