Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add manpage #625

Merged
merged 13 commits into from
Nov 18, 2023
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ if(APPLE)
configure_file(src/util/apple/Info.plist.in Info.plist @ONLY)
endif()

string(TIMESTAMP FASTFETCH_BUILD_DATE "%d %B %Y")
configure_file(doc/fastfetch.1.in fastfetch.1 @ONLY)

####################
# Ascii image data #
####################
Expand Down Expand Up @@ -1033,6 +1036,11 @@ install(
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/licenses/${CMAKE_PROJECT_NAME}"
)

install(
FILES "${PROJECT_BINARY_DIR}/fastfetch.1"
DESTINATION "${CMAKE_INSTALL_MANDIR}"
)

##################
# package target #
##################
Expand Down
134 changes: 134 additions & 0 deletions doc/fastfetch.1.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
.TH FASTFETCH 1 "@FASTFETCH_BUILD_DATE@" "@CMAKE_PROJECT_NAME@ @CMAKE_PROJECT_VERSION@"

.SH NAME
fastfetch \- a neofetch\-like tool for fetching system information and
displaying them in a pretty way

.SH SYNOPSIS

.B fastfetch
.I [options...]

.SH DESCRIPTION

Fastfetch is a neofetch\-like tool for fetching system information and
displaying them in a pretty way. It is written mainly in C, with performance
and customizability in mind.
Currently, Linux, Android, FreeBSD, MacOS and Windows 7+ are supported.

.SH "EXIT STATUS"

On successfull execution, fastfetch returns zero. If any error happened,
the exit code will be non\-zero.

.SH OPTIONS

.SS "Informative Options"
.TP

.B \-h, \-\-help \fI [command]
Show help output, displaying all available options or help for given command
.TP

.B \-v, \-\-version
Show version of fastfetch
.TP

.B \-\-list\-config\-paths
List search paths of config files
.TP

.B \-\-list\-data\-paths
List search paths of presets and logos
.TP

.B \-\-list\-logos
List available logos, they can be loaded with \fI \-\-logo
.TP

.B \-\-list\-modules
List available modules
.TP

.B \-\-list\-presets
List available presets, they can be loaded with \fI \-\-config
.TP

.B \-\-list\-features
List the supported features fastfetch was compiled with
.TP

.B \-\-print\-logos
Print available logos
.TP

.B \-\-print\-structure
Print the default structure


.SS "Display Options"
.TP

.B \-l, \-\-logo \fI <logo>
CarterLi marked this conversation as resolved.
Show resolved Hide resolved
Set the logo to display
.TP

.B \-s, \-\-structure \fI <structure>
Set the structure of the fetch. For details about the structure,
see the CONFIGURATION section.


.SS "Config Options"
.TP

.B \-c, \-\-config \fI <config>
Use the specified config file or preset. If "none", disable further config
loading. For details about config files, see the CONFIGURATION section
.TP

.B \-\-gen\-config \fI [file]
Generate a config file with options specified on the command line.
If \fI file \fR is specified, the configuration will written to the
file, otherwise it will be written to stdout.
.TP

.B \-\-gen\-config\-force \fI [file]
Same as \fB \-\-gen\-config\fR, but overwrites existing config
.TP


To list all options, use \fB \-\-help\fR this will also print all available module options.

.SH CONFIGURATION
.SS "Fetch Structure"
The structure of a fetch describes the modules that should be included in
the output. It consists of a string of modules, separated by a colon (:).
To list all available modules, use \fB \-\-list\-modules \fR

.SS "Config Files"

fastfetch supports two types of config files. The legacy
configuration files and a JSONC based format.

A JSONC config file is a JSON file that also supports comments with (//). Those
files must have the extension '.jsonc'. You can migrate a legacy config
file to the JSONC format by using \fB\-\-gen\-config\fR.

The specified configuration/preset files are searched in the following order:

1. relative to the current working directory

2. relative to ~/.local/share/fastfetch/presets/

3. relative to /usr/share/fastfetch/presets/

When both a '.jsonc' and a '.conf' file with the same name is found,
the '.jsonc' file is preferred.

Fastfetch provides some default presets. List them with \fB \-\-print\-available\-presets\fR.

.SH "SEE ALSO"
.BR neofetch (1)

.SH BUGS
Please report bugs to:\fI https://github.com/fastfetch\-cli/fastfetch/issues \fR
4 changes: 1 addition & 3 deletions src/data/help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ Informative options:
--list-data-paths: List search paths of presets and logos
--list-logos: List available logos
--list-modules: List available modules
--list-presets: List presets fastfetch knows about; they can be loaded with --load-config (+)
--list-presets: List presets fastfetch knows about; they can be loaded with --config (+)
--list-features: List the supported features fastfetch was compiled with (mainly for development)
--print-logos: Print available logos
--print-config-system: Print the default system config
--print-config-user: Print the default user config
--print-structure: Print the default structure

Config options:
Expand Down