- Zig 98.9%
- C 0.7%
- Nix 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github | ||
| assets | ||
| src | ||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| CODE_OF_CONDUCT.md | ||
| config.json | ||
| CONTRIBUTING.md | ||
| default.nix | ||
| LICENSE | ||
| README.md | ||
| SECURITY.md | ||
| shell.nix | ||
Zigfetch
| Default config | Custom config |
|---|---|
![]() |
![]() |
Description
Zigfetch is a minimal neofetch/fastfetch like system information tool
Note
For macOS users and contributors: see this Issue
Requirements
- >= zig v0.16.0
Linux only
RPM based distros only
To get RPM support, zigfetch needs:
Installation
Build from source
Note
If you want to use the
masterversion of Zig, use thezig-masterbranch
# Clone the repo
git clone https://github.com/utox39/zigfetch.git
# cd to the path
cd path/to/zigfetch
# Build zigfetch
zig build -Doptimize=ReleaseSafe
# NOTE: for RPM based distros:
zig build -Doptimize=ReleaseSafe -Denable-rpm
# Then move it somewhere in your $PATH. Here is an example:
mv ./zig-out/bin/zigfetch ~/bin/
Via Homebrew tap
brew install utox39/tap/zigfetch
Note
To enable RPM support:
ZIGFETCH_ENABLE_RPM=1 brew install utox39/tap/zigfetch
Other package managers
- nixpkg: Thanks to @heisfer
- AUR: Thanks to @GoldBro233
Usage
zigfetch
Configuration
Important
Currently, Zig does not have a built-in library for JSON validation via JSON schema, so it is very important to follow the pattern shown in the default configuration file (config.json) to avoid errors
- Create the config folder
mkdir -p ~/.config/zigfetch
- Create the config file
cd ~/.config/zigfetch
touch config.json
- Or copy the default config (preferred way)
cp /path/to/zigfetch/config.json ~/.config/zigfetch/config.json
Modules
Available modules:
- Os
- Kernel
- Uptime
- Packages
- Shell
- Cpu
- Gpu
- Ram
- Swap
- Disk
- Net
- WM (Window Manager)
- Terminal
- Locale
- Custom
| Module type | Linux | macOS | Windows |
|---|---|---|---|
| os | Yes | Yes | WIP |
| kernel | Yes | Yes | WIP |
| uptime | Yes | Yes | WIP |
| packages | Yes* | Yes (Homebrew, Macports) | WIP |
| shell | Yes (bash, zsh) | Yes (bash, zsh) | WIP |
| cpu | Yes | Yes | WIP |
| gpu | Yes | Yes (Apple Silicon only) | WIP |
| ram | Yes | Yes | WIP |
| swap | Yes | Yes | WIP |
| disk | Yes | Yes | WIP |
| net | Yes | Yes | WIP |
| wm | Yes | Yes | WIP |
| terminal | Yes | Yes | WIP |
| locale | Yes | Yes | WIP |
*(flatpak, nix, dpkg, pacman, xbps, rpm)
"modules": [
{
"type": "os",
"key": "OS",
"key_color": "#5E81AC"
},
...
]
Custom module
"modules": [
{
"type": "custom",
"key": "-----------",
"key_color": "#5E81AC"
},
...
]
Custom ASCII art
To use an ASCII art of your choice:
"ascii_abs_path": "absolute_path/to/your/ascii_art.txt"
You can use multiple ASCII arts:
"ascii_abs_path": [
"absolute_path/to/your/ascii_art.txt",
"absolute_path/to/your/ascii_art2.txt"
]
If multiple ASCII arts are specified, one will be selected pseudo-randomly.
Don't use the ~ character.
Images
Important
Only PNG images are supported.
To use images:
"images": [
{
"abs_path": "absolute_path/to/your/image.png",
"height": 25,
"width": 35
},
{
"abs_path": "absolute_path/to/your/image2.png",
"height": 30,
"width": 35
}
]
Don't use the ~ character.
If multiple images are specified, one will be selected pseudo-randomly.
Note
If both the
imagesandascii_abs_pathfields are specified, the images are prioritized.
Username and Hostname color
To change the Username and Hostname color (HEX colors only):
"username_hostname_color": "#5E81AC"
Roadmap
- Add ASCII art for each operating system and Linux distro
- Add more packages info for Linux
- Add support for Windows
Contributing
Please see CONTRIBUTING. Thanks!
License
MIT License. See: LICENSE

