You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# GUI_APP=0 or =1 for compiling either the terminal version or the GUI app
102
+
# GUI_APP=0 or 1 for terminal or GUI app
105
103
make install DEBUG=0 GUI_APP=0
106
104
107
-
# automatically generates a config and prints the infos
108
105
customfetch
109
106
```
110
107
111
108
## How to customize
112
-
113
-
Read the manual `customfetch.1` or execute customfetch with the arg `-w` for knowing more about the configuration in customfetch.\
114
-
This is only an explaination about tags and preview, that can be always found in the documentation.
109
+
This is only an explanation about tags and preview, that can be always found in the documentation.
115
110
116
111
Here's an example using my config
117
-
118
-

119
-
112
+

120
113
```toml
121
114
[config]
122
115
123
-
# The array for displaying the system infos
116
+
# The array for displaying the system/fetched infos
124
117
layout = [
125
118
"$<title>",
126
119
"$<title.sep>",
@@ -146,86 +139,35 @@ layout = [
146
139
"$<colors>", # normal colors palette
147
140
"$<colors.light>"# light colors palette
148
141
]
142
+
```
149
143
144
+
### Tag Syntax (both ASCII art and layout)
150
145
151
-
```
146
+
| Tag | Description |
147
+
|-----|--------------|
148
+
|`$<info.module>`| Print a module info (for example `$<cpu>` or `$<github.user.followers>`) |
149
+
|`${color}`| Set output color (hex or ANSI escape colors) |
150
+
|`$(bash command)`| Print the output of a shell command (`!` prefix if in ASCII art or big ANSI escape color outputs) |
151
+
|`$[x,y,if_equal,if_not]`| Conditional tag to print based on comparision |
152
+
|`$%n1,n2%`| Colored percentage between two numbers (prefix `!` to invert colors) |
152
153
153
-
In the config we got an array variable called "layout". That's the variable where you customize how the infos should be displayed.\
154
-
There are 5 tags:
155
-
*`$<info.module>` - Used for printing the value of a module or its submembers.
156
-
*`${color}` - Used for displaying text in a specific color after it.
157
-
*`$(bash command)` - Used to execute bash commands and print the output.
158
-
*`$[something,equalToSomethingElse,iftrue,ifalse]` - Conditional tag to display different outputs based on the comparison.
159
-
*`$%n1,n2%` - Used to print the percentage and print with colors
160
-
161
-
They can be used in the ascii art text file and layout, but how to use them?
162
-
163
-
***The info tag (`$<>`)** will print a value of a member of a module.\
164
-
e.g `$<user.name>` will print the username, `$<os.kernel.version>` will print the kernel version and so on.\
165
-
All the modules and their members are listed in the `--list-modules` argument
166
-
167
-
***The bash command tag (`$()`)** let's you execute bash commands and print the output\
168
-
e.g `$(echo \"hello world\")` will indeed echo out Hello world.\
169
-
you can even use pipes\
170
-
e.g `$(echo \"hello world\" | cut -d' ' -f2)` will only print world
171
-
172
-
***The conditional tag (`$[]`)** is used for displaying different outputs based on the comparison.\
173
-
Syntax MUST be `$[something,equalToSomethingElse,iftrue,ifalse]` (**note**: putting spaces between commas can change the expected result).\
174
-
Each part can have a tag or anything else.\
175
-
e.g `$[$<user.name>,$(echo $USER),the name is correct,the name is NOT correct]`\
176
-
This is useful when on some terminal or WM the detection can be different than others,\
177
-
Or maybe even on holidays for printing special texts\
178
-
179
-
***The color tag (`${}`)** is used for printing the text in a certain color.\
180
-
e.g `${red}hello world` will indeed print "hello world" in red (or the color you set in the variable/tag).\
181
-
The colors can be: <ins>black</ins>, <ins>red</ins>, <ins>green</ins>, <ins>blue</ins>, <ins>cyan</ins>, <ins>yellow</ins>, <ins>magenta</ins>, <ins>white</ins> and they can be configured in the config file.\
182
-
**ANSI escape colors** can be used, e.g `\e[1;31m` or `\e[38;2;160;223;11m`.\
183
-
Alternatively, You can put a custom **hex color** e.g: `#ff6622`.\
184
-
You can also use them inside the tag, like `${!#343345}` or `${\e[1;31m}`.\
185
-
It's possible to enable multiple options, put these symbols before `#`:\
186
-
**Terminal and GUI**\
187
-
`b` - for making the color in the background\
188
-
`u` - to underline the text\
189
-
`!` - for making the text bold\
190
-
`i` - for making the text italic\
191
-
`s` - for strikethrough text\
`a(value)` - for fg alpha (either a percentage value like `50%` or a plain integer between 1 and 65536)\
195
-
`L(value)` - for choosing an underline style (`none`, `single`, `double`, `low`, `error`)\
196
-
`U(value)` - for choosing the underline color (hexcode color)\
197
-
`B(value)` - for choosing the bg color text (hexcode color)\
198
-
`S(value)` - for choosing the strikethrough color (hexcode color)\
199
-
`O(value)` - for choosing the overline color (hexcode color)\
200
-
`A(value)` - for choosing the bg text alpha (either a percentage value like `50%` or a plain integer between 1 and 65536)\
201
-
`w(value)` - for choosing the font weight (`ultralight`, `light`, `normal`, `bold`, `ultrabold`, `heavy`, or a numeric weight)\
`l` - for blinking text\
204
-
\
205
-
To reset colors, use `${0}` for a normal reset or `${1}` for a bold reset.\
206
-
For auto coloring, depending on the ascii logo colors, use `${auto}`.\
207
-
They can be used for different colors too. So for getting the 2nd color of the ascii logo,\
208
-
use `${auto2}`, for the 4th one use `${auto4}` and so on.\
209
-
If you're using the GUI app and the source path is an image, all the auto colors will be the same colors as the distro ascii art.
210
-
211
-
***The Percentage tag (`$%%`)** is used for displaying the percentage between 2 numbers.\
212
-
It **must** contain a comma for separating the 2. They can be either be taken from a tag or it put yourself.\
213
-
For example: $%10,5%
214
-
For inverting colors of bad and great (red and green), before the first `%` a put `!`
215
-
216
-
Any `$` or brackets can be escaped with a backslash `\`. You need to escape backslashes too :(\
217
-
**NOTE:** For having compatibility with the GUI app, you need to escape `<` (EXCEPT if you are using in a info tag, like `$<os.name>`) and `&`\
218
-
e.g `the number 50 is \\< 100 \\&\\& 98`
219
-
Won't affect the printing in terminal.
154
+
Run `customfetch -w` or `man customfetch` for full syntax reference.\
155
+
Escape `<` or `&` when needed (especially for GUI compatibility).
220
156
221
157
## Plugins
222
-
Thanks to plugins, `customfetch` is able to query way more information than just system information, unlike regular neofetch-like programs.
158
+
Plugins are what make Customfetch so flexible.
159
+
They let you extend it beyond system information and fetch anything — weather, GitHub data, APIs, or whatever else you can imagine.
223
160
224
-
You can easily install community-made plugins by using `cufetchpm`, example: `cufetchpm install https://github.com/Toni500github/customfetch-plugins-github`.
225
-
This example installs a repository, which can have multiple plugins. read `cufetchpm --help` for more information.
161
+
You can easily install plugins from repositories using `cufetchpm`.
For more plugin managing, such as enabling/disabling or removing them, refer to the `cufetchpm --help` guide.
226
167
227
-
## Writing your own plugins
228
-
Plugins are mostly just shared libraries, so you could easily write your own plugin! there's an [example](https://github.com/Toni500github/customfetch/blob/main/examples/mod-library.cc) with detailed comments that explain everything!
168
+
### Writing your own plugins
169
+
Plugins are just shared libraries.
170
+
There’s a [guide here](https://github.com/Toni500github/customfetch/blob/main/docs/build-plugin.md) that walks you through writing one.
0 commit comments