A pure, lightweight UNIX system fetch tool
- C 97.5%
- Makefile 2.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| assets | ||
| include | ||
| src | ||
| .gitignore | ||
| CHANGELOG.md | ||
| config.def.h | ||
| config.mk | ||
| HACKING.md | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
skfetch is a lightweight and fast system information tool written in pure C99. It works on Linux, macOS, and *BSD, following the strict Suckless philosophy and Unix way.
Performance
skfetch achieves the fastest possible speed for a compiled binary when running bash commands.
| Fetch Tool | Command | Weight | Execution Time |
|---|---|---|---|
| fastfetch-cli/fastfetch | time fastfetch |
~1.5MB | 0.017s |
| DylanAraps/pfetch | time pfetch |
~59KB | 0.031s |
| b0nn133/skfetch | time skfetch |
~25KB | 0.062s |
| DylanAraps/neofetch | time neofetch |
~377KB | 0.432s |
| KittyKatt/screenFetch | time screenfetch |
~259KB | 0.930s |
The benchmarks were carried out using the same configuration for all tools (excluding pfetch). Although fastfetch is quicker thanks to its native C/C++ API implementations, skfetch keeps high performance at the same time being ultra-lightweight and transparent in the configuration part through simple C macros and shell commands.
Philosophy
- Zero Bloat: There are no dependencies. The tool compiles into a small binary using native system APIs (
uname,sysctl). - Header-Only Configuration: Configuration occurs entirely at compile time through
config.h. There is no slow, runtime JSON or TOML parsing. - Do One Thing Well: It fetches essential system info. You can easily extend its functionality for memory, packages, or hardware using shell commands without adding bloat.
- Inline Color Coding: Logos use raw custom
\1,\2, etc. inline control bytes to manage colors dynamically. This allows for perfect column alignment without string parsing.
Configuration
skfetch follows a traditional suckless compilation setup. Modify config.h:
#ifndef CONFIG_H
#define CONFIG_H
#include "skfetch.h"
#include <stdlib.h>
#include "colors.h"
#define DEF_COLOR ANSI_CYAN
#define TEXT_COLOR ANSI_RESET
#define COLOR_CONTROL ANSI_BOLD
#define FORCE_LOGO NULL
#define LOGO_ASCII NULL
#define LOGO_ASCII_PATH NULL
#define LOGO_COLORS ANSI_RED, ANSI_GREEN, ANSI_BLUE
static const SKModule enabled_modules[] = {
{ "", get_user_host, NULL },
{ "", get_raw_text, "-----------------" },
{ "OS", get_os, NULL },
{ "Kernel", get_kernel, NULL },
{ "Uptime", get_uptime, NULL },
};
#endif // CONFIG_H
Build & Installation
git clone https://codeberg.org/bunnies/skfetch
cd skfetch
make
make install
Usage
usage: skfetch [options]
options:
-h show this help message
-v show version information
-d, -l <id> force a specific ascii distro logo
Hacking (Contributing)
Check HACKING.md for more details.
Changelog
See CHANGELOG.md for updates.