-
Notifications
You must be signed in to change notification settings - Fork 1
/
customfetch.1
215 lines (211 loc) · 8.81 KB
/
customfetch.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
.\" It was automatically generated by help2man 1.49.3 at the beggining
.TH CUSTOMFETCH "1" "August 2024" "customfetch @VERSION@ branch @BRANCH@" "User Commands"
.SH NAME
customfetch \- A command\-line and GUI system information tool (or neofetch like program)
.SH SYNOPSIS
.B customfetch
[\fI\,OPTION\/\fR]...
.SH CONFIGURATION
customfetch focus point is to be customizable and fast at the same time.
.PP
How does it work?
.PP
In the config we got an array variable called "layout". That's the variable where you customize how the infos should be displayed.
.br
There are 5 tags:
.nf
* \fB$<module.member>\fR - Used for printing the value of a member of a module.
* \fB${color}\fR - Used for displaying text in a specific color.
* \fB$(bash command)\fR - Used to execute bash commands and print the output.
* \fB$[something,equalToSomething,ifTrue,ifFalse]\fR - Conditional tag to display different outputs based on the comparison.
.fi
* \fB$%n1,n2%\fR - Used to print the percentage and print with colors
.PP
They can be used in the ascii art text file and layout, but how to use them?
.br
Here's a simple bare-minimal example:
.nf
layout = [
"My OS is $<os.name>, and username is $<user.name>",
"The color of the following text will be ${red}red",
"This is a $(echo \\"bash command\\")",
"Check if \\$<user.name> is correct: $[$<user.name>,toni,indeed,it's not toni but $(echo $USER)]",
"The discount between 50$ and 100$ is $%50,100%"
]
.fi
.PP
* The \fBInfo tag $<>\fR will prints the value of a member of a module.
.nf
e.g $<user.name> will print the username, $<os.kernel_version> will print the kernel version and so on.
There are variants who you only need the module name,
such as $<ram> or $<title>
All the modules and their members are listed in the `--list-modules` argument
.fi
.PP
* The \fBColor tag ${}\fR is used for printing the text in a certain color.
.nf
The colors can be predefined such as: \fIblack\fR, \fIred\fR, \fIgreen\fR, \fIblue\fR, \fIcyan\fR, \fIyellow\fR, \fImagenta\fR, \fIwhite\fR and they can be configured in the config file.
\fBANSI escape colors\fR can be used, e.g "\\e[1;31m" and "\\e[38;5;160;223;11m".
Alternatively, They can have \fBhexcodes colors\fR (e.g "#5522dd").
You can apply special effects to colors by using the following symbols before the '#' in hex codes:
\fBTerminal and GUI\fR \fBGUI Only\fR
* \fBb\fR for background color. * \fBo\fR for overline
* \fBu\fR to underline the text * \fBa(value)\fR for fg alpha (either a percentage value like `50%` or a plain integer between 1 and 65536)
* \fB!\fR for bold text * \fBL(value)\fR for choosing an underline style (`none`, `single`, `double`, `low`, `error`)
* \fBi\fR for italic text * \fBU(value)\fR for choosing the underline color (hexcode color)
* \fBB(value)\fR for choosing the bg color text (hexcode color)
\fBTerminal Only\fR * \fBS(value)\fR for choosing the strikethrough color (hexcode color)
* \fBl\fR for blinking text * \fBO(value)\fR for choosing the overline color (hexcode color)
* \fBA(value)\fR for choosing the bg text alpha (either a percentage value like `50%` or a plain integer between 1 and 65536)
* \fBw(value)\fR for choosing the font weight (`ultralight`, `light`, `normal`, `bold`, `ultrabold`, `heavy`, or a numeric weight)
.fi
.PP
You can also use them inside the tag, like \fB${!#343345}\fR or \fB${\\e[1;31m}\fR.
.PP
To reset colors, use \fB${0}\fR for a normal reset or \fB${1}\fR for a bold reset.
.PP
To use the colors that the ascii art logo uses, use \fB${auto}\fR for getting the 1st color, \fB${auto4}\fR for the 4th one and so on.
.br
If you're using GUI mode and wants to display a custom source that's an image, all the auto colors will be the same colors as the distro ones
.PP
* The \fBConditional tag $[]\fR is used to display different outputs based on the comparison.
.br
The syntax \fBMUST\fR be: $[something,equalToSomethingElse,ifTrue,ifFalse] \fBnote:\fR putting spaces between commas can change the expected result
.br
Each part can have a tag or anything else.
.PP
For example: $[$<user.name>,$(echo $USER),correct,NOT correct]
.nf
This is useful when on some terminal or WM the detection can be different than others
Or maybe even on holidays for printing special texts
e.g $[$(date +%d-%m),25-12,${red}Happy ${white}Christmas!,]
.fi
.PP
* The \fBBash command tag $()\fR speaks for itself.
.br
It can execute normal bash commands and print the output of it.
.PP
\fBNOTE:\fR if you try to use programs such as cbonsai in an ASCII art, put a '!' before the command.
.br
example: $(!cbonsai -p)
.PP
* The \fBPercentage tag $%%\fR is used for displaying the percentage between 2 numbers.
.br
It \fBMust\fR contain a comma for separating the 2. They can be either be taken from a tag or it put yourself.
.br
For example: $%50,100%
.br
For inverting colors of bad and great (red and green), before the first '%' put '!' (without quotes ofc)
.PP
.nf
Any `$` or brackets can be escaped with a backslash \\. You need to escape backslashes too :(
\fBNOTE\fR: For having compatibility with GUI mode, you need to escape `<` (EXCEPT if you are using in a info tag, like $<os.name>) and `&`
e.g "the number 50 is \\< than 100 \\& 98"
.fi
.SH OPTIONS
.TP
\fB\-n\fR, \fB\-\-no\-display\fR
Do not display the logo
.TP
\fB\-N\fR, \fB\-\-no\-color\fR
Do not output and parse colors. Useful for stdout or pipe operations
.TP
\fB\-\-enable\-colors\fR
Inverse of --no-color
.TP
\fB\-s\fR, \fB\-\-source\-path\fR <path>
Path to the ascii art file to display
.TP
\fB\-C\fR, \fB\-\-config\fR <path>
Path to the config file to use
.TP
\fB\-a\fR, \fB\-\-ascii-logo-type\fR [<name>]
The type of ASCII art to apply ("small" or "old").
.br
Basically will add "_<type>" to the logo filename.
.br
It will return the regular linux ascii art if it doesn't exist.
.br
Leave it empty for regular.
.TP
\fB\-D\fR, \fB\-\-data\-dir\fR <path>
Path to the data dir where we'll taking the distros ascii arts (must contain subdirectory called "ascii")
.TP
\fB\-d\fR, \fB\-\-distro\fR <name>
Print a custom distro logo (must be the same name, uppercase or lowercase, e.g "windows 11" or "ArCh")
.TP
\fB\-f\fR, \fB\-\-font\fR <name>
The font to be used in GUI mode (syntax must be "[FAMILY\-LIST] [STYLE\-OPTIONS] [SIZE]" without the square brackets [])
.br
An example: "[Liberation Mono] [Normal] [12]", which can be "Liberation Mono Normal 12"
.TP
\fB\-i\fR, \fB\-\-image\-backend\fR <name>
\fB\fI(EXPERIMENTAL)\fR Image backend tool for displaying images in terminal. Right now only kitty and viu are supported
.br
It's recommended to use GUI mode for the moment if something doesn't work
.TP
\fB\-m\fR, \fB\-\-layout\-line\fR
Will replace the config layout, with a layout you specify in the arguments
.br
Example: "customfetch -m "${auto}OS: $<os.name>" -m "${auto}CPU: $<cpu.cpu>" "
.br
Will only print the logo (if not disabled), along side the parsed OS and CPU
.TP
\fB\-g\fR, \fB\-\-gui\fR
Use GUI mode instead of priting in the terminal (use \fB\-V\fR to check if it's enabled)
.TP
\fB\-p\fR, \fB\-\-logo-position\fR <value>
Position of the logo ("top" or "left")
.TP
\fB\-o\fR, \fB\-\-offset\fR <num>
Offset between the ascii art and the system infos
.TP
\fB\-l\fR. \fB\-\-list\-modules\fR
Print the list of the tags and its members
.TP
\fB\-h\fR, \fB\-\-help\fR
Print this help menu
.TP
\fB\-L\fR, \fB\-\-logo\-only\fR
Print only the logo
.TP
\fB\-V\fR, \fB\-\-version\fR
Print the version along with the git branch it was built
.TP
\fB\-\-bg\-image\fR <path>
Path to image to be used in the background in GUI (put "disable" for disabling in the config)
.TP
\fB\-\-wrap\-lines\fR [<0,1>]
Disable (0) or Enable (1) wrapping lines when printing in terminal
.TP
\fB\-\-logo\-padding\-top\fR <num>
Padding of the logo from the top
.TP
\fB\-\-logo\-padding\-left\fR <num>
Padding of the logo from the left
.TP
\fB\-\-title\-sep\fR <string>
A char (or string) to use in $<builtin.title_sep>
.TP
\fB\-\-sep\-reset\fR <string>
A separator (or string) that when encountered, will automatically reset color
.TP
\fB\-\-sep\-reset\-after\fR [<num>]
Reset color either before of after 'sep-reset' (1 = after && 0 = before)
.TP
\fB\-\-gen\-config\fR [<path>]
Generate default config file to config folder (if path, it will generate to the path)
.br
Will ask for confirmation if file exists already
.TP
\fB\-\-color\fR <string>
Replace instances of a color with another value.
.br
Syntax MUST be "name=value" with no space between "=", example: --color "foo=#444333".
.br
Thus replaces any instance of foo with #444333. Can be done with multiple colors separately.
.br
Matter of fact, you can: --color "#hexcode=#anotherhexcode"
.SH BUGS
\fR
Report any bugs to \fIhttps://github.com/Toni500github/customfetch/issues\fR