Skip to content

Commit 1047d1c

Browse files
committed
Presets: add a new example
1 parent 0bfa12c commit 1047d1c

File tree

1 file changed

+241
-0
lines changed

1 file changed

+241
-0
lines changed

presets/examples/25.jsonc

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
// Based on #1576
2+
{
3+
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
4+
"display": {
5+
"color": {
6+
"keys": "blue"
7+
},
8+
"separator": "",
9+
"constants": [
10+
"──────────────────────────────────────────────",
11+
"\u001b[47D",
12+
"\u001b[47C",
13+
"\u001b[46C"
14+
],
15+
"brightColor": false
16+
},
17+
"modules": [
18+
{
19+
"type": "version",
20+
"key": "┌───────────────┬─{$1}┐\u001b[41D",
21+
"format": "\u001b[1m{#keys} {1} - {2} "
22+
},
23+
{
24+
"type": "os",
25+
"key": "│ {icon} {sysname} │{$3}│{$2}"
26+
},
27+
{
28+
"type": "datetime",
29+
"key": "│ {icon} Fetched │{$3}│{$2}",
30+
"format": "{year}-{month-pretty}-{day-pretty} {hour-pretty}:{minute-pretty}:{second-pretty} {timezone-name}"
31+
},
32+
{
33+
"type": "locale",
34+
"key": "│ {icon} Locale │{$3}│{$2}"
35+
},
36+
37+
// Hardware
38+
{
39+
"type": "custom",
40+
"key": "│{#cyan}┌──────────────┬{$1}┐{#keys}│\u001b[37D",
41+
"format": "{#bright_cyan} Hardware "
42+
},
43+
{
44+
"type": "chassis",
45+
"key": "│{#cyan}│ {icon} Chassis │{$4}│{#keys}│{$2}"
46+
},
47+
{
48+
"type": "memory",
49+
"key": "│{#cyan}│ {icon} RAM │{$4}│{#keys}│{$2}"
50+
},
51+
{
52+
"type": "swap",
53+
"key": "│{#cyan}│ {icon} SWAP │{$4}│{#keys}│{$2}"
54+
},
55+
{
56+
"type": "cpu",
57+
"key": "│{#cyan}│ {icon} CPU │{$4}│{#keys}│{$2}",
58+
"showPeCoreCount": true
59+
},
60+
{
61+
"type": "gpu",
62+
"key": "│{#cyan}│ {icon} GPU │{$4}│{#keys}│{$2}"
63+
},
64+
{
65+
"type": "disk",
66+
"key": "│{#cyan}│ {icon} Disk │{$4}│{#keys}│{$2}",
67+
"format": "{size-used} \/ {size-total} ({size-percentage}) - {filesystem}",
68+
},
69+
{
70+
"type": "battery",
71+
"key": "│{#cyan}│ {icon} Battery │{$4}│{#keys}│{$2}"
72+
},
73+
{
74+
"type": "custom",
75+
"key": "│{#cyan}└──────────────┴{$1}┘{#keys}│",
76+
"format": ""
77+
},
78+
79+
// Desktop
80+
{
81+
"type": "custom",
82+
"key": "│{#green}┌──────────────┬{$1}┐{#keys}│\u001b[37D",
83+
"format": "{#bright_green} Desktop "
84+
},
85+
{
86+
"type": "de",
87+
"key": "│{#green}│ {icon} Desktop │{$4}│{#keys}│{$2}"
88+
},
89+
{
90+
"type": "wm",
91+
"key": "│{#green}│ {icon} Session │{$4}│{#keys}│{$2}"
92+
},
93+
{
94+
"type": "display",
95+
"key": "│{#green}│ {icon} Display │{$4}│{#keys}│{$2}",
96+
"compactType": "original-with-refresh-rate"
97+
},
98+
{
99+
"type": "gpu",
100+
"key": "│{#green}│ {icon} G-Driver │{$4}│{#keys}│{$2}",
101+
"format": "{driver}"
102+
},
103+
{
104+
"type": "custom",
105+
"key": "│{#green}└──────────────┴{$1}┘{#keys}│",
106+
"format": ""
107+
},
108+
109+
// Terminal
110+
{
111+
"type": "custom",
112+
"key": "│{#yellow}┌──────────────┬{$1}┐{#keys}│\u001b[37D",
113+
"format": "{#bright_yellow} Terminal "
114+
},
115+
{
116+
"type": "shell",
117+
"key": "│{#yellow}│ {icon} Shell │{$4}│{#keys}│{$2}"
118+
},
119+
{
120+
"type": "terminal",
121+
"key": "│{#yellow}│ {icon} Terminal │{$4}│{#keys}│{$2}"
122+
},
123+
{
124+
"type": "terminalfont",
125+
"key": "│{#yellow}│ {icon} Term Font │{$4}│{#keys}│{$2}"
126+
},
127+
{
128+
"type": "terminaltheme",
129+
"key": "│{#yellow}│ {icon} Colors │{$4}│{#keys}│{$2}"
130+
},
131+
{
132+
"type": "packages",
133+
"key": "│{#yellow}│ {icon} Packages │{$4}│{#keys}│{$2}"
134+
},
135+
{
136+
"type": "custom",
137+
"key": "│{#yellow}└──────────────┴{$1}┘{#keys}│",
138+
"format": ""
139+
},
140+
141+
// Development
142+
{
143+
"type": "custom",
144+
"key": "│{#red}┌──────────────┬{$1}┐{#keys}│\u001b[39D",
145+
"format": "{#bright_red} Development "
146+
},
147+
{
148+
"type": "command",
149+
"keyIcon": "",
150+
"key": "│{#red}│ {icon} Rust │{$4}│{#keys}│{$2}",
151+
"text": "rustc --version | cut -d' ' -f2",
152+
"format": "rustc {}"
153+
},
154+
{
155+
"type": "command",
156+
"keyIcon": "",
157+
"key": "│{#red}│ {icon} Clang │{$4}│{#keys}│{$2}",
158+
"text": "clang --version | head -1 | awk '{print $NF}'",
159+
"format": "clang {}"
160+
},
161+
{
162+
"type": "command",
163+
"keyIcon": "",
164+
"key": "│{#red}│ {icon} NodeJS │{$4}│{#keys}│{$2}",
165+
"text": "node --version",
166+
"format": "node {~1}"
167+
},
168+
{
169+
"type": "command",
170+
"keyIcon": "",
171+
"key": "│{#red}│ {icon} Go │{$4}│{#keys}│{$2}",
172+
"text": "go version | cut -d' ' -f3",
173+
"format": "go {~2}"
174+
},
175+
{
176+
"type": "command",
177+
"keyIcon": "",
178+
"key": "│{#red}│ {icon} Zig │{$4}│{#keys}│{$2}",
179+
"text": "zig version",
180+
"format": "zig {}"
181+
},
182+
{
183+
"type": "editor",
184+
"key": "│{#red}│ {icon} Editor │{$4}│{#keys}│{$2}"
185+
},
186+
{
187+
"type": "command",
188+
"keyIcon": "󰊢",
189+
"key": "│{#red}│ {icon} Git │{$4}│{#keys}│{$2}",
190+
"text": "git version",
191+
"format": "git {~12}"
192+
},
193+
{
194+
"type": "font",
195+
"key": "│{#red}│ {icon} Interface │{$4}│{#keys}│{$2}"
196+
},
197+
{
198+
"type": "custom",
199+
"key": "│{#red}└──────────────┴{$1}┘{#keys}│",
200+
"format": ""
201+
},
202+
203+
// Uptime
204+
{
205+
"type": "custom",
206+
"key": "│{#magenta}┌──────────────┬{$1}┐{#keys}│\u001b[36D",
207+
"format": "{#bright_magenta} Uptime "
208+
},
209+
{
210+
"type": "uptime",
211+
"key": "│{#magenta}│ {icon} Uptime │{$4}│{#keys}│{$2}"
212+
},
213+
{
214+
"type": "users",
215+
"myselfOnly": true,
216+
"keyIcon": "",
217+
"key": "│{#magenta}│ {icon} Login │{$4}│{#keys}│{$2}"
218+
},
219+
{
220+
"type": "disk",
221+
"keyIcon": "",
222+
"key": "│{#magenta}│ {icon} OS Age │{$4}│{#keys}│{$2}",
223+
"folders": "/", // On macOS, "/System/Volumes/VM" works for me
224+
"format": "{create-time:10} [{days} days]"
225+
},
226+
{
227+
"type": "custom",
228+
"key": "│{#magenta}└──────────────┴{$1}┘{#keys}│",
229+
"format": ""
230+
},
231+
{
232+
"type": "custom",
233+
"key": "└─────────────────{$1}┘",
234+
"format": ""
235+
},
236+
237+
// End
238+
"break",
239+
"colors"
240+
]
241+
}

0 commit comments

Comments
 (0)