Skip to content

Commit b68e0ce

Browse files
authored
Merge pull request #1668 from fastfetch-cli/dev
Release v2.40.2
2 parents bcc8f6d + 8d6ed2e commit b68e0ce

14 files changed

+640
-569
lines changed

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
check-filenames =
33
builtin = clear,rare,usage,informal
44
skip = */.git,*/cmake-build-*,*/.idea,*/completions,*/presets,*/screenshots,*/tests,*/3rdparty,*/logo/ascii
5-
ignore-words-list = iterm,compiletime,unknwn,pengwin,siduction,master,slave,sur,doas,conexant,ags
5+
ignore-words-list = iterm,compiletime,unknwn,pengwin,siduction,master,slave,sur,doas,conexant,ags,bu

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# 2.40.2
2+
3+
Changes:
4+
* Since v2.40.0, we've been loading config files from the directory where the fastfetch binary is located. However, this approach may lead to loading unexpected files. For example, `fastfetch -c groups` would attempt to load `/usr/bin/groups`. Therefore, we now enforce the `.jsonc` extension when loading config files. Examples:
5+
1. `-c filename`: loads `filename.jsonc`
6+
2. `-c filename.jsonc`: loads `filename.jsonc`
7+
3. `-c filename.json`: loads `filename.json` and enforces strict JSON syntax (no comments or trailing commas)
8+
4. `-c filename.ext`: loads `filename.ext.jsonc` (`.jsonc` extension is enforced)
9+
10+
Features:
11+
* Mark kitty image protocol support for warp terminal (Logo)
12+
* Documentation improvements
13+
114
# 2.40.1
215

316
Bugfixes:

CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
22

33
project(fastfetch
4-
VERSION 2.40.1
4+
VERSION 2.40.2
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -325,9 +325,6 @@ endif()
325325

326326
fastfetch_encode_c_string("${DATATEXT_JSON_HELP}" DATATEXT_JSON_HELP)
327327
fastfetch_load_text(src/data/structure.txt DATATEXT_STRUCTURE)
328-
fastfetch_load_text(src/data/help_footer.txt DATATEXT_HELP_FOOTER)
329-
fastfetch_load_text(src/data/help_color.txt DATATEXT_HELP_COLOR)
330-
fastfetch_load_text(src/data/help_format.txt DATATEXT_HELP_FORMAT)
331328

332329
configure_file(src/fastfetch_config.h.in fastfetch_config.h @ONLY)
333330
configure_file(src/fastfetch_datatext.h.in fastfetch_datatext.h @ONLY)

README.md

Lines changed: 46 additions & 46 deletions
Large diffs are not rendered by default.

doc/fastfetch.1.in

Lines changed: 133 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
.TH FASTFETCH 1 "@FASTFETCH_BUILD_DATE@" "@CMAKE_PROJECT_NAME@ @CMAKE_PROJECT_VERSION@"
22

33
.SH NAME
4-
fastfetch \- a neofetch\-like tool for fetching system information and
5-
displaying them in a pretty way
4+
fastfetch \- a fast and customizable system information tool similar to neofetch
65

76
.SH SYNOPSIS
87

@@ -11,131 +10,213 @@ displaying them in a pretty way
1110

1211
.SH DESCRIPTION
1312

14-
Fastfetch is a neofetch\-like tool for fetching system information and
15-
displaying them in a pretty way. It is written mainly in C, with performance
16-
and customizability in mind.
17-
Currently, Linux, Android, FreeBSD, MacOS and Windows 7+ are supported.
13+
Fastfetch is a tool for displaying system information in a visually appealing way. Written primarily in C, it focuses on performance and customizability while providing functionality similar to neofetch.
14+
It supports Linux, Android, *BSD, macOS, Haiku, and Windows 7 or newer.
1815

1916
.SH "EXIT STATUS"
2017

21-
On successful execution, fastfetch returns zero. If any error happened,
22-
the exit code will be non\-zero.
18+
Fastfetch returns zero on successful execution. Any errors result in a non-zero exit code.
2319

2420
.SH OPTIONS
2521

2622
.SS "Informative Options"
2723
.TP
2824

2925
.B \-h, \-\-help \fI[command]
30-
Show help output, displaying all available options or help for given command
26+
Display help information for all available options or for a specific command
3127
.TP
3228

3329
.B \-v, \-\-version
34-
Show version of fastfetch
30+
Display the version of fastfetch
31+
.TP
32+
33+
.B \-\-version\-raw
34+
Display the raw version string (major.minor.patch)
3535
.TP
3636

3737
.B \-\-list\-config\-paths
38-
List search paths of config files
38+
List search paths for configuration files
3939
.TP
4040

4141
.B \-\-list\-data\-paths
42-
List search paths of presets and logos
42+
List search paths for presets and logos
4343
.TP
4444

4545
.B \-\-list\-logos
46-
List available logos, they can be loaded with \fI\-\-logo
46+
List available logos that can be loaded with \fI\-\-logo
4747
.TP
4848

4949
.B \-\-list\-modules
50-
List available modules
50+
List all available modules
5151
.TP
5252

5353
.B \-\-list\-presets
54-
List available presets, they can be loaded with \fI\-\-config
54+
List available presets that can be loaded with \fI\-\-config
5555
.TP
5656

5757
.B \-\-list\-features
58-
List the supported features fastfetch was compiled with
58+
List the features that fastfetch was compiled with (mainly for development)
5959
.TP
6060

6161
.B \-\-print\-logos
62-
Print available logos
62+
Display all available logos
6363
.TP
6464

6565
.B \-\-print\-structure
66-
Print the default structure
66+
Display the default structure
6767
.TP
6868

6969
.B \-\-format \fI<type>
70-
Set the output format. Besides the
71-
.I default
72-
format, only
73-
.I json
74-
is supported currently.
70+
Set the output format. Available options are:
71+
.RS
72+
.IP \(bu 2
73+
\fIdefault\fR: Default human-readable format
74+
.IP \(bu 2
75+
\fIjson\fR: JSON format for machine processing
76+
.RE
7577

78+
.SS "Config Options"
79+
.TP
7680

77-
.SS "Display Options"
81+
.B \-c, \-\-config \fI<config>
82+
Use the specified config file or preset. Specify \fInone\fR to disable further config loading. See the CONFIGURATION section for details on config files.
83+
.TP
84+
85+
.B \-\-gen\-config \fI[path]
86+
Generate a config file with options specified on the command line. If \fIpath\fR is not specified, it defaults to \fB~/.config/fastfetch/config.jsonc\fR. If \fIpath\fR is "\-", the configuration will be written to stdout.
87+
.TP
88+
89+
.B \-\-gen\-config\-force \fI[path]
90+
Same as \fB\-\-gen\-config\fR, but overwrites any existing file at the destination path.
91+
.TP
92+
93+
.SS "Logo Options"
7894
.TP
7995

8096
.B \-l, \-\-logo \fI<logo>
81-
Set the logo to display
97+
Set the logo to display. Can be the name of a built-in logo or a path to an image file. Use \fInone\fR to disable the logo.
98+
.TP
99+
100+
.B \-\-logo\-type \fI<type>
101+
Set the type of the logo specified with \fI\-\-logo\fR. Available types include \fIauto\fR, \fIbuiltin\fR, \fIfile\fR, \fIsixel\fR, \fIkitty\fR, and others. See \fB\-\-help logo\-type\fR for details.
102+
.TP
103+
104+
.B \-\-logo\-width \fI<width>
105+
Set the width of the logo in characters (for image logos)
106+
.TP
107+
108+
.B \-\-logo\-height \fI<height>
109+
Set the height of the logo in characters (for image logos)
110+
.TP
111+
112+
.B \-\-logo\-color\-[1\-9] \fI<color>
113+
Override specific colors in the logo
114+
115+
.SS "Display Options"
82116
.TP
83117

84118
.B \-s, \-\-structure \fI<structure>
85-
Set the structure of the fetch. For details about the structure,
86-
see the CONFIGURATION section.
119+
Set the structure of the fetch (a colon-separated list of module names)
120+
.TP
87121

122+
.B \-\-color \fI<color>
123+
Set the color of keys and title. See \fB\-\-help color\fR for available colors.
124+
.TP
88125

89-
.SS "Config Options"
126+
.B \-\-color\-keys \fI<color>
127+
Set the color of keys only
90128
.TP
91129

92-
.B \-c, \-\-config \fI<config>
93-
Use the specified config file or preset. If
94-
.I none
95-
is specified, disable further config loading. For details about
96-
config files, see the CONFIGURATION section
130+
.B \-\-color\-title \fI<color>
131+
Set the color of the title only
132+
.TP
133+
134+
.B \-\-separator \fI<string>
135+
Set the separator between key and value (default: ": ")
97136
.TP
98137

99-
.B \-\-gen\-config \fI[file]
100-
Generate a config file with options specified on the command line.
101-
If \fIfile\fR is specified, the configuration will be written to the
102-
file, otherwise it will be written to stdout.
138+
.B \-\-key\-width \fI<num>
139+
Align the width of keys to \fI<num>\fR characters
103140
.TP
104141

105-
.B \-\-gen\-config\-force \fI[file]
106-
Same as \fB\-\-gen\-config\fR, but overwrites existing config
142+
.B \-\-show\-errors
143+
Display errors when they occur (default: false)
107144
.TP
108145

146+
.B \-\-pipe
147+
Disable colors (automatically detected based on whether stdout is a terminal)
109148

110-
To list all options, use \fB\-\-help\fR. It will also print all available module options.
149+
To list all available options including module-specific options, use \fB\-\-help\fR.
111150

112151
.SH CONFIGURATION
113152
.SS "Fetch Structure"
114-
The structure of a fetch describes the modules that should be included in
115-
the output. It consists of a string of modules, separated by a colon (:).
153+
The structure defines which modules to display and in what order. It consists of module names separated by colons (:).
154+
For example: \fBtitle:separator:os:kernel:uptime\fR
155+
116156
To list all available modules, use \fB\-\-list\-modules\fR
117157

118158
.SS "Config Files"
119159

120-
Fastfetch uses JSONC based format for configuration. Fastfetch doesn't generate
121-
config file automatically; it should be generated manually by \fB\-\-gen\-config\fR.
122-
The config file will be saved in \fB~/.config/fastfetch/config.jsonc\fR by default.
160+
Fastfetch uses JSONC for configuration files. JSONC is JSON with support for comments (// and /* */). Configuration files must have the .jsonc extension.
123161

124-
A JSONC config file is a JSON file that also supports comments with (// and /* */).
125-
Those files must have the extension '.jsonc'.
162+
You can generate a default config file using \fB\-\-gen\-config\fR. By default, the config file is saved at \fB~/.config/fastfetch/config.jsonc\fR.
126163

127-
The specified configuration/preset files are searched in the following order:
164+
The configuration/preset files are searched in the following locations (in order):
128165

129-
1. relative to the current working directory
166+
.RS
167+
.IP 1. 4
168+
Relative to the current working directory
169+
.IP 2. 4
170+
Relative to ~/.local/share/fastfetch/presets/
171+
.IP 3. 4
172+
Relative to /usr/share/fastfetch/presets/
173+
.RE
130174

131-
2. relative to ~/.local/share/fastfetch/presets/
175+
For detailed information on logo options, module configuration, and formatting, visit:
176+
.RS
177+
\fIhttps://github.com/fastfetch-cli/fastfetch/wiki/Configuration\fR
178+
.RE
132179

133-
3. relative to /usr/share/fastfetch/presets/
180+
Fastfetch provides several built-in presets. List them with \fB\-\-list\-presets\fR.
134181

135-
Fastfetch provides some default presets. List them with \fB\-\-list\-presets\fR.
182+
.SS "JSON Schema"
183+
A JSON schema is available for editor intelligence when editing the configuration file. Add the following line at the beginning of your config file:
184+
.PP
185+
\fB"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"\fR
186+
187+
.SH EXAMPLES
188+
.TP
189+
Basic usage:
190+
.RS
191+
\fBfastfetch\fR
192+
.RE
193+
.TP
194+
Use a specific logo:
195+
.RS
196+
\fBfastfetch \-\-logo arch\fR
197+
.RE
198+
.TP
199+
Custom structure:
200+
.RS
201+
\fBfastfetch \-\-structure title:os:kernel:uptime:memory\fR
202+
.RE
203+
.TP
204+
Generate a config file:
205+
.RS
206+
\fBfastfetch \-\-gen\-config\fR
207+
.RE
208+
.TP
209+
Use a preset:
210+
.RS
211+
\fBfastfetch \-\-config neofetch\fR
212+
.RE
136213

137214
.SH "SEE ALSO"
138215
.BR neofetch (1)
139216

140217
.SH BUGS
141218
Please report bugs to: \fIhttps://github.com/fastfetch\-cli/fastfetch/issues\fR
219+
220+
.SH AUTHORS
221+
Fastfetch is developed by a team of contributors on GitHub.
222+
Visit \fIhttps://github.com/fastfetch-cli/fastfetch\fR for more information.

0 commit comments

Comments
 (0)