Skip to content

Commit f7040df

Browse files
docs: refactor README.md
1 parent 7141bca commit f7040df

File tree

1 file changed

+71
-129
lines changed

1 file changed

+71
-129
lines changed

README.md

Lines changed: 71 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
<p align="center">
22
<img src="assets/icons/logo.svg" width="22%"/>
33
</p>
4+
45
<h2></h2> <!-- add a separating line -->
6+
7+
> [!WARNING]
8+
> Parts of this README refers to the `v2.0.0-beta1` release.
9+
> Some features such as the plugin system may differ from the upcoming stable release.
10+
511
<p align="center">
612
A modular information fetching (neofetch-like) tool, which its focus point is the performance and <b>customizability</b>
713
</p>
@@ -31,96 +37,83 @@
3137
</p>
3238
<img src="https://upload.wikimedia.org/wikipedia/commons/2/24/Transparent_Square_Tiles_Texture.png" width="1px" height="1px" align="left" />
3339
<img src="screenshots/pipeline-style.png" />
40+
<!-- Leaving this here for future, it's not as fire as the one above
41+
| | |
42+
|:-:|:-:|
43+
| ![ss1](screenshots/modern-simple.png) | ![ss2](screenshots/pipeline-style.png) |
44+
| ![ss3](screenshots/cbonsai.png) | ![ss4](screenshots/nitch_catpan-style2.png) |
45+
-->
3446

3547
## Key Features
36-
* Run customfetch as a **terminal** or **GTK3 application** or even as an [android widget](https://github.com/Toni500github/customfetch-android-app)
37-
* Really easy to [customize](#How-to-customize)
38-
* Flexible [plugin](#Plugins) system
39-
* Incredibly extensible information fetchings
40-
* Super lightweight, 3.3MB max (GTK3 application)
41-
42-
# Dependencies
43-
Customfetch requires **no mandatory** dependencies.\
44-
For building from source, only requires **C++20** but it's possible to compile with C++17 too (may not be always supported)
45-
46-
Here I'll list some packages to install for the GTK3 app or for making customfetch faster.
47-
The names of the packages can vary depending on the package manager or distro.
48-
49-
If you want to install the GUI app install from your package manager:
48+
- Works as a **terminal program**, **GTK3 GUI app**, or **native Android widget**
49+
- Modular design - fetch anything through `$<>` tags and plugins
50+
- Super lightweight
51+
- Easy to configure and script
52+
- Optional dependencies only, no runtime bloat (as like as [fastfetch](https://github.com/fastfetch-cli/fastfetch)
53+
- Plugin system for adding new info sources
54+
55+
## Dependencies
56+
Customfetch has no required dependencies unless you build the GUI app version.\
57+
For compiling from source, all you need is a **C++20** compiler (C++17 might still work).
58+
59+
Packages for running the GUI app:
5060
* `gtk3`
5161
* `gtkmm3`
5262

53-
optional dependencies that will make customfetch faster.
63+
Optional packages that will make customfetch system query faster:
5464
* `dconf`: Alternative to the slow `gsettings` command
5565
* `libxfce4util`: Query XFCE4 version faster
5666
* `wayland-client`: Library for getting the Wayland compositor faster
5767

58-
# Installation
68+
## Installation
5969

60-
## Debian/Ubuntu and based
61-
Download the latest `.deb` package in [releases](https://github.com/Toni500github/customfetch/releases/latest)
70+
### Debian / Ubuntu
71+
Grab the latest `.deb` file from the [releases page](https://github.com/Toni500github/customfetch/releases/latest).
6272

63-
## Android widget
64-
Moved to the new repo: https://github.com/Toni500github/customfetch-android-app
65-
66-
## Arch and based (AUR)
73+
### Arch (AUR)
6774
```bash
68-
# Terminal only
69-
yay -S customfetch-bin
70-
71-
# GUI app only
72-
yay -S customfetch-gui-bin
73-
```
75+
# Binary versions
76+
yay -S customfetch-bin # Terminal only
77+
yay -S customfetch-gui-bin # GUI version
7478

75-
## General Distros (Manual installation)
76-
Download the latest `.tar.gz` tarball file in [releases](https://github.com/Toni500github/customfetch/releases/latest) \
77-
It contains the `/usr` directory where you'll install it in your distro. Useful for package managers too.
79+
# Source versions
80+
yay -S customfetch # Terminal only
81+
yay -S customfetch-gui # GUI version
7882

79-
## Arch and based (AUR) (source)
80-
```bash
81-
# Terminal only
82-
yay -S customfetch
83-
84-
# GUI app only
85-
yay -S customfetch-gui
86-
```
87-
88-
## Arch and based (unstable) (AUR) (source)
89-
```bash
90-
# Terminal only
83+
# Unstable / git versions
9184
yay -S customfetch-git
92-
93-
# GUI app only
9485
yay -S customfetch-gui-git
9586
```
9687

97-
## Compile from (source) (unstable)
88+
### Manual installation (for other distros)
89+
Download the `.tar.gz` from [releases](https://github.com/Toni500github/customfetch/releases/latest).
90+
It includes a `/usr` folder so you can install it manually or through your package manager.
91+
92+
### Android widget
93+
Moved to its own repo:
94+
https://github.com/Toni500github/customfetch-android-app
95+
96+
### Build from source
9897
```bash
99-
# clone the git dir
10098
git clone --depth=1 https://github.com/Toni500github/customfetch
10199
cd customfetch
102100

103101
# DEBUG=0 for release build
104-
# 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
105103
make install DEBUG=0 GUI_APP=0
106104

107-
# automatically generates a config and prints the infos
108105
customfetch
109106
```
110107

111108
## 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.
115110

116111
Here's an example using my config
117-
118-
![image](screenshot.png)
119-
112+
![image](screenshots/demo.png)
120113
```toml
121114
[config]
122115

123-
# The array for displaying the system infos
116+
# The array for displaying the system/fetched infos
124117
layout = [
125118
"$<title>",
126119
"$<title.sep>",
@@ -146,86 +139,35 @@ layout = [
146139
"$<colors>", # normal colors palette
147140
"$<colors.light>" # light colors palette
148141
]
142+
```
149143

144+
### Tag Syntax (both ASCII art and layout)
150145

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) |
152153

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-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**Terminal and GUI**\
187-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`b` - for making the color in the background\
188-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`u` - to underline the text\
189-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`!` - for making the text bold\
190-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`i` - for making the text italic\
191-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`s` - for strikethrough text\
192-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**GUI Only**\
193-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`o` - for overline\
194-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`a(value)` - for fg alpha (either a percentage value like `50%` or a plain integer between 1 and 65536)\
195-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`L(value)` - for choosing an underline style (`none`, `single`, `double`, `low`, `error`)\
196-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`U(value)` - for choosing the underline color (hexcode color)\
197-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`B(value)` - for choosing the bg color text (hexcode color)\
198-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`S(value)` - for choosing the strikethrough color (hexcode color)\
199-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`O(value)` - for choosing the overline color (hexcode color)\
200-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`A(value)` - for choosing the bg text alpha (either a percentage value like `50%` or a plain integer between 1 and 65536)\
201-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`w(value)` - for choosing the font weight (`ultralight`, `light`, `normal`, `bold`, `ultrabold`, `heavy`, or a numeric weight)\
202-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**Terminal Only**\
203-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`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).
220156

221157
## 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.
223160

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`.
162+
For example:
163+
```bash
164+
$ cufetchpm install https://github.com/Toni500github/customfetch-plugins-github
165+
```
166+
For more plugin managing, such as enabling/disabling or removing them, refer to the `cufetchpm --help` guide.
226167

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.
229171

230172
## Star History
231173

0 commit comments

Comments
 (0)