https://github.com/toni500github/customfetch
Highly customizable and fast system information fetch program
https://github.com/toni500github/customfetch
customfetch customizable customization fastfetch fetcher gtk3 gtkmm3 gui gui-application neofetch sysfetch
Last synced: 27 days ago
JSON representation
Highly customizable and fast system information fetch program
- Host: GitHub
- URL: https://github.com/toni500github/customfetch
- Owner: Toni500github
- License: bsd-3-clause
- Created: 2024-05-06T19:27:34.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-10-29T11:24:40.000Z (6 months ago)
- Last Synced: 2024-10-29T12:12:56.559Z (6 months ago)
- Topics: customfetch, customizable, customization, fastfetch, fetcher, gtk3, gtkmm3, gui, gui-application, neofetch, sysfetch
- Language: C++
- Homepage:
- Size: 3.28 MB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Customfetch
A system information fetch tool (or neofetch like program), which its focus point is the performance and customizability
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
It's even an android widget and GTK3 app![]()
![]()
![]()
![]()
## Key Features
* Run customfetch as a **terminal** or **GTK3 application** or even as an **android widget**
* Really easy customizable and fast, check [Config (with explanation)](#config-with-explanation) section
* Super lightweight, 3.3MB max# Depends
Customfetch only requires the standard C++ library from `gcc-libs`, which should come already pre-installed in almost all distros. Other than that, customfetch requires **no mandatory** dependencies.\
Currently requires **C++20**, but it's possible to compile with C++17 too (may not be always supported)\
The names of the packages can vary depending on the package manager or distro.If you want to install the GUI app install from your package manager:
* `gtk3`
* `gtkmm3`optional dependencies that will make customfetch faster.
* `dconf`: Alternative to the slow `gsettings` command
* `libxfce4util`: Query XFCE4 version faster
* `wayland-client`: Library for getting the Wayland compositor faster# Installation
## Debian/Ubuntu and based
Download the latest `.deb` package in [releases](https://github.com/Toni500github/customfetch/releases/latest)## Android widget
Download the latest `.apk` file in the [releases](https://github.com/Toni500github/customfetch/releases/latest) \
AFAIK The google play protect doesn't detect any malware. If your antivirus does, please open an [issue here](https://github.com/Toni500github/customfetch/issues)## Arch and based (AUR)
```bash
# Terminal only
yay -S customfetch-bin# GUI app only
yay -S customfetch-gui-bin
```## General Distros (Manual installation)
Download the latest `.tar.gz` tarball file in [releases](https://github.com/Toni500github/customfetch/releases/latest) \
It contains the `/usr` directory where you'll install it in your distro. Useful for package managers too## Arch and based (AUR) (source)
```bash
# Terminal only
yay -S customfetch# GUI app only
yay -S customfetch-gui
```## Arch and based (unstable) (AUR) (source)
```bash
# Terminal only
yay -S customfetch-git# GUI app only
yay -S customfetch-gui-git
```## Android widget app (unstable)
Download the latest apk build from the [GitHub actions](https://github.com/Toni500github/customfetch/actions/workflows/makefile.yml) artifacts\
If you can't download or you are not logged in GitHub, use this link: https://nightly.link/Toni500github/customfetch/workflows/makefile/main/customfetch-android-app.zip## Android widget app (source)
```bash
# need java 17 + gradle 8.9 installed.
# It's suggested to build from android studio,
# so you that you can install the NDK library
./android/gradlew assembleDebug --project-dir=./android
```## Compile from (source) (unstable)
```bash
# clone the git dir
git clone https://github.com/Toni500github/customfetch
cd customfetch# DEBUG=0 for release build
# GUI_APP=0 or =1 for compiling either the terminal version or the GUI app
make install DEBUG=0 GUI_APP=0# automatically generates a config and prints the infos
customfetch
```## Config (with explanation)
Read the manual `customfetch.1` or execute customfetch with the arg `-w` for knowing more about the configuration in customfetch.\
This is only an explaination about tags and preview, that can be always found in the documentation.Here's an example using my config

```toml
[config]# The array for displaying the system infos
layout = [
"$",
"$",
"${auto}OS: $ $",
"${auto}Host: $",
"${auto}Kernel: $",
"${auto}Uptime: $",
"${auto}Terminal: $",
"${auto}Shell: $",
"${auto}Packages: $",
"${auto}Theme: $",
"${auto}Icons: $",
"${auto}Font: $",
"${auto}Cursor: $",
"${auto}WM: $ $",
"${auto}DE: $ $",
"$",
"${auto}Swap: $",
"${auto}CPU: $",
"${auto}GPU: $",
"${auto}RAM: $",
"",
"$", # normal colors palette
"$" # light colors palette
]```
In the config we got an array variable called "layout". That's the variable where you customize how the infos should be displayed.\
There are 5 tags:
* `$` - Used for printing the system info value of a member of a module.
* `${color}` - Used for displaying text in a specific color.
* `$(bash command)` - Used to execute bash commands and print the output.
* `$[something,equalToSomethingElse,iftrue,ifalse]` - Conditional tag to display different outputs based on the comparison.
* `$%n1,n2%` - Used to print the percentage and print with colorsThey can be used in the ascii art text file and layout, but how to use them?
* **The info tag (`$<>`)** will print a value of a member of a module\
e.g `$` will print the username, `$` will print the kernel version and so on.\
All the modules and their members are listed in the `--list-modules` argument* **The bash command tag (`$()`)** let's you execute bash commands and print the output\
e.g `$(echo \"hello world\")` will indeed echo out Hello world.\
you can even use pipes\
e.g `$(echo \"hello world\" | cut -d' ' -f2)` will only print world* **The conditional tag (`$[]`)** is used for displaying different outputs based on the comparison.\
Syntax MUST be `$[something,equalToSomethingElse,iftrue,ifalse]` (**note**: putting spaces between commas can change the expected result).\
Each part can have a tag or anything else.\
e.g `$[$,$(echo $USER),the name is correct,the name is NOT correct]`\
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\* **The color tag (`${}`)** is used for printing the text in a certain color.\
e.g `${red}hello world` will indeed print "hello world" in red (or the color you set in the variable/tag).\
The colors can be: black, red, green, blue, cyan, yellow, magenta, white and they can be configured in the config file.\
**ANSI escape colors** can be used, e.g `\e[1;31m` or `\e[38;2;160;223;11m`.\
Alternatively, You can put a custom **hex color** e.g: `#ff6622`.\
You can also use them inside the tag, like `${!#343345}` or `${\e[1;31m}`.\
It's possible to enable multiple options, put these symbols before `#`:\
**Terminal and GUI**\
`b` - for making the color in the background\
`u` - to underline the text\
`!` - for making the text bold\
`i` - for making the text italic\
`s` - for strikethrough text\
**GUI Only**\
`o` - for overline\
`a(value)` - for fg alpha (either a percentage value like `50%` or a plain integer between 1 and 65536)\
`L(value)` - for choosing an underline style (`none`, `single`, `double`, `low`, `error`)\
`U(value)` - for choosing the underline color (hexcode color)\
`B(value)` - for choosing the bg color text (hexcode color)\
`S(value)` - for choosing the strikethrough color (hexcode color)\
`O(value)` - for choosing the overline color (hexcode color)\
`A(value)` - for choosing the bg text alpha (either a percentage value like `50%` or a plain integer between 1 and 65536)\
`w(value)` - for choosing the font weight (`ultralight`, `light`, `normal`, `bold`, `ultrabold`, `heavy`, or a numeric weight)\
**Terminal Only**\
`l` - for blinking text\
\
To reset colors, use `${0}` for a normal reset or `${1}` for a bold reset.\
For auto coloring, depending on the ascii logo colors, use `${auto}`.\
They can be used for different colors too. So for getting the 2nd color of the ascii logo,\
use `${auto2}`, for the 4th one use `${auto4}` and so on.\
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.* **The Percentage tag (`$%%`)** is used for displaying the percentage between 2 numbers.\
It **Must** contain a comma for separating the 2. They can be either be taken from a tag or it put yourself.\
For example: $%10,5%
For inverting colors of bad and great (red and green), before the first `%` a put `!`Any `$` or brackets can be escaped with a backslash `\`. You need to escape backslashes too :(\
**NOTE:** For having compatibility with the GUI app, you need to escape `<` (EXCEPT if you are using in a info tag, like `$`) and `&`\
e.g `the number 50 is \< than 100 \& 98`
Won't affect the printing in terminal# TODOs
* ~~release v1.0.0~~
Empty so far!# Thanks
I would like to thanks:
* my best-friend [BurntRanch](https://github.com/BurntRanch/),\
For helping me initialize this project and motivate me to keep going\
And also for making my customizability idea come true with the first prototype of the parser.* the Better C++ [discord server](https://discord.gg/uSzTjkXtAM), \
For helping me improving the codebase and helping me with any issues I got,\
And also for being patient with me XD* [fastfetch](https://github.com/fastfetch-cli/fastfetch/) and [neofetch](https://github.com/dylanaraps/neofetch),\
For inspiring this project* [{fmt}](https://github.com/fmtlib/fmt) and [toml++](https://github.com/marzer/tomlplusplus) libraries\
Our favorite libraries that me and BurntRanch uses* this string switch-case [library](https://github.com/xroche/stringswitch), \
Really amazing, thanks for making thisI hope you'll like customfetch, and also checkout [TabAUR](https://github.com/BurntRanch/TabAUR/tree/dev), our other project that was made before customfetch.\
Don't forgot [sdl_engine](https://github.com/BurntRanch/sdl_engine) too ;)