this is cupid, the cat.
cupid the cat loves linux!
cupidfetch is a system information retrieval tool written in C for Linux systems. It's a beginner-friendly, work-in-progress hobby project aimed at learning and exploring programming concepts.
✔️ Fetches and displays various system details:
⬜ Enhance visual representation (soon):
✔️ Built for beginners:
Supported Distros:
data/distros.def
(feel free to add your)cupidfetch relies on the following components and tools:
C Compiler: cupidfetch is written in the C programming language, and compilation requires a C compiler. The recommended compiler is GCC (GNU Compiler Collection).
inih C Parser: cupidfetch uses the inih C parser to handle configuration files in INI format.
Git: cupidfetch uses Git to clone the repository for easy deployment.
GCC is often available through the package manager of your Linux distribution. For example, on Debian/Ubuntu-based systems, you can install it using:
sudo apt update && sudo apt install build-essential
Git can be installed through the package manager of your Linux distribution. For example, on Debian/Ubuntu-based systems, you can install it using:
sudo apt install git
The inih C parser can be integrated into your project either by manually downloading the source files from the inih GitHub repository or by using a package manager if available.
git clone https://github.com/frankischilling/cupidfetch
gcc -o cupidfetch src/config.c src/main.c src/modules.c src/print.c libs/ini.c
or use the makefile make
. We plan on having a make install
soon. Execution:
./cupidfetch
To run from anywhere:
Move the executable to /usr/local/bin
: sudo mv cupidfetch /usr/local/bin
Execute it directly: cupidfetch
make clean asan
or make clean ubsan
to check overflows/memory leaks or undefined behaviorYou can use the install-config.sh
script to create cupidfetch the config. You can test some of the examples in examples/
by running cupidfetch < examples/example.ini
.
The configuration file for cupidfetch
is located at ${XDG_CONFIG_HOME or $HOME/.config}/cupidfetch/cupidfetch.ini
. This file allows you to customize the displayed information by toggling options on or off. An example config is at the data
directory of this repository. It includes some comments that may help you.
Storage units
The config lets you change what memory unit you prefer to use for storage and memory information. The storage unit size is measured in bytes, so if you wanted to use MB, it would be 1000000
bytes but if you wanted to use GB, it would be 1000000000
bytes.
If it can't create a log at .../cupidfetch/log.txt
, it will output to the stderr. If you want to ignore it, please do cupidfetch 2> /dev/null
.
Welcome everyone! All skill levels can contribute:
To add other Linux distros to be supported you can do so by adding them to the data/distros.def
file. Here is an example of the dsitros.def file.
DISTRO("ubuntu", "Ubuntu", "dpkg -l | tail -n+6 | wc -l")
Let's say you wanted to add a new distro that uses dpkg called cupidOS; you could edit the distros.def like this.
DISTRO("ubuntu" , "Ubuntu" , "dpkg -l | tail -n+6 | wc -l")
DISTRO("cupidOS", "cupidOS", "dpkg -l | tail -n+6 | wc -l")
This project is a work-in-progress for learning and experimentation.