fastfetch/README.md

172 lines
16 KiB
Markdown
Raw Normal View History

# Fastfetch
2021-03-07 13:12:45 +01:00
2023-07-03 15:38:25 +08:00
[![CI](https://github.com/fastfetch-cli/fastfetch/actions/workflows/ci.yml/badge.svg)](https://github.com/fastfetch-cli/fastfetch/actions/workflows/ci.yml)
2023-01-11 18:07:58 +08:00
Fastfetch is a [neofetch](https://github.com/dylanaraps/neofetch)-like tool for fetching system information and displaying them in a pretty way. It is written mainly in C, with performance and customizability in mind. Currently, Linux, Android, FreeBSD, MacOS and Windows 7+ are supported.
2022-08-28 17:39:01 +02:00
2022-08-28 18:34:54 +02:00
<img src="screenshots/example1.png" width="49%" align="left" />
<img src="https://upload.wikimedia.org/wikipedia/commons/2/24/Transparent_Square_Tiles_Texture.png" width="49%" height="16px" align="left" />
<img src="screenshots/example4.png" width="49%" align="left" />
2022-08-29 09:24:03 +02:00
<img src="https://upload.wikimedia.org/wikipedia/commons/2/24/Transparent_Square_Tiles_Texture.png" width="49%" height="16px" align="left" />
2022-08-28 18:42:53 +02:00
<img src="screenshots/example2.png" width="48%" align="top" />
<img src="screenshots/example3.png" width="48%" align="top" />
2022-08-28 18:34:54 +02:00
<img src="screenshots/example5.png" height="15%" align="top" />
2021-03-07 13:12:45 +01:00
2023-06-12 17:26:37 +02:00
There are [screenshots on different platforms](https://github.com/fastfetch-cli/fastfetch/wiki)
2021-03-07 13:12:45 +01:00
## Customization
2023-06-18 02:57:35 +01:00
With customization and speed being two competing goals, this project actually builds two executables:
* The main one is `fastfetch`, which can be very greatly configured via flags. These flags can be made persistent by modifying `$XDG_CONFIG_HOME/fastfetch/config.conf`. Use `fastfetch --gen-config conf` to generate one. To view the available options, run `fastfetch --help`.
2023-06-18 02:57:35 +01:00
* The second executable is called `flashfetch`, which is configured at compile time to eliminate any possible overhead. Configuration of it can be very easily done in [`src/flashfetch.c`](src/flashfetch.c).
2023-06-18 02:57:35 +01:00
Currently, the performance difference is measurable, but too small to be recognizable by humans. But with more options planned, the leap will get bigger over time and on slow machines this might actually make a difference.
2022-08-28 17:39:01 +02:00
There are some premade config files in [`presets`](presets), including the ones used for the screenshots above. You can load them using `--load-config <filename>`. They may also serve as a good example for format arguments.
2021-03-07 13:12:45 +01:00
Logos can be heavily customized too; see the [logo documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Logo-options) for more information.
2023-01-09 15:20:30 +01:00
### Customization with new JSONC format
A new, structure based, and user-friendly config file format was introduced in v2.0.0. This format is based on [JSONC](https://jsonc.org/). [See more details in Wiki](https://github.com/fastfetch-cli/fastfetch/wiki/Configuration)
2021-03-07 13:12:45 +01:00
## Dependencies
2023-06-18 02:57:35 +01:00
Fastfetch dynamically loads needed libraries if they are available. On Linux, its only hard dependencies are `libc` (any implementation of the c standard library), `libdl` and [`libpthread`](https://man7.org/linux/man-pages/man7/pthreads.7.html) (if built with multithreading support). They are all shipped with [`glibc`](https://www.gnu.org/software/libc/), which is already installed on most Linux distributions.
2022-01-23 12:00:28 +01:00
The following libraries are used if present at runtime:
### Linux and FreeBSD
2022-06-05 00:18:40 +02:00
* [`libpci`](https://github.com/pciutils/pciutils): GPU output.
* [`libvulkan`](https://www.vulkan.org/): Vulkan module & fallback for GPU output.
* [`libxcb-randr`](https://xcb.freedesktop.org/),
2022-06-04 19:30:26 +02:00
[`libXrandr`](https://gitlab.freedesktop.org/xorg/lib/libxrandr),
[`libxcb`](https://xcb.freedesktop.org/),
2023-01-18 01:37:47 +08:00
[`libX11`](https://gitlab.freedesktop.org/xorg/lib/libx11): At least one of them sould be present in X11 sessions for better display detection and faster WM detection. The `*randr` ones provide multi monitor support The `libxcb*` ones usually have better performance.
* [`libwayland-client`](https://wayland.freedesktop.org/): Better display performance and output in wayland sessions. Supports different refresh rates per monitor.
2022-06-05 00:18:40 +02:00
* [`libGIO`](https://developer.gnome.org/gio/unstable/): Needed for values that are only stored GSettings.
* [`libDConf`](https://developer.gnome.org/dconf/unstable/): Needed for values that are only stored in DConf + Fallback for GSettings.
* [`libmagickcore` (ImageMagick)](https://www.imagemagick.org/): Images in terminal using sixel or kitty graphics protocol.
* [`libchafa`](https://github.com/hpjansson/chafa): Image output as ascii art.
* [`libZ`](https://www.zlib.net/): Faster image output when using kitty graphics protocol.
2023-01-24 10:39:33 +01:00
* [`libDBus`](https://www.freedesktop.org/wiki/Software/dbus): Bluetooth, Player & Media detection.
2022-06-05 00:18:40 +02:00
* [`libEGL`](https://www.khronos.org/registry/EGL/),
2022-06-04 19:30:26 +02:00
[`libGLX`](https://dri.freedesktop.org/wiki/GLX/),
[`libOSMesa`](https://docs.mesa3d.org/osmesa.html): At least one of them is needed by the OpenGL module for gl context creation.
2022-06-05 00:18:40 +02:00
* [`libOpenCL`](https://www.khronos.org/opencl/): OpenCL module
* [`libXFConf`](https://gitlab.xfce.org/xfce/xfconf): Needed for XFWM theme and XFCE Terminal font.
2022-09-20 11:23:49 +02:00
* [`libsqlite3`](https://www.sqlite.org/index.html): Needed for pkg & rpm package count.
2022-06-05 00:18:40 +02:00
* [`librpm`](http://rpm.org/): Slower fallback for rpm package count. Needed on openSUSE.
2023-01-26 00:52:58 +08:00
* [`libnm`](https://networkmanager.dev/docs/libnm/latest/): Used for Wifi detection.
* [`libpulse`](https://freedesktop.org/software/pulseaudio/doxygen/): Used for Sound detection.
* [`libddcutil`](https://github.com/rockowitz/ddcutil): Used for brightness detection of external displays
### macOS
* [`MediaRemote`](https://iphonedev.wiki/index.php/MediaRemote.framework): Need for Media detection. It's a private framework provided by newer macOS system.
* [`DisplayServices`](https://developer.apple.com/forums/thread/666383#663154022): Need for screen brightness detection. It's a private framework provided by newer macOS system.
* [`MoltenVK`](https://github.com/KhronosGroup/MoltenVK): Vulkan driver for macOS. [`molten-vk`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/molten-vk.rb)
2022-12-20 11:04:57 +08:00
* [`libmagickcore` (ImageMagick)](https://www.imagemagick.org/): Images in terminal using sixel graphics protocol. [`imagemagick`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/imagemagick.rb)
* [`libchafa`](https://github.com/hpjansson/chafa): Image output as ascii art. [`chafa`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/chafa.rb)
2023-06-06 18:34:54 +08:00
* [`libsqlite3`](https://www.sqlite.org/index.html): Used for fast wallpaper detection ( fallback to AppleScript )
2022-12-23 22:17:40 +00:00
For the image logo, iTerm with iterm image protocol should work. Apple Terminal is not supported.
### Windows
* [`wlanapi`](https://learn.microsoft.com/en-us/windows/win32/api/wlanapi/): A system dll which isn't supported by Windows Server by default. Used for Wifi info detection.
* [`libvulkan`](https://www.vulkan.org/): Vulkan module. Usually has been provided by GPU drivers. [`vulkan-loader`](https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-vulkan-loader) [`vulkan-headers`](https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-vulkan-headers)
* [`libOpenCL`](https://www.khronos.org/opencl/): OpenCL module. [`opencl-icd`](https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-opencl-icd)
Note: In Windows 7, 8 and 8.1, [ConEmu](https://conemu.github.io/en/AnsiEscapeCodes.html) is required to run fastfetch due to [the lack of ASCII escape code native support](https://en.wikipedia.org/wiki/ANSI_escape_code#DOS,_OS/2,_and_Windows). In addition, as fastfetch for Windows targets [UCRT](https://learn.microsoft.com/en-us/cpp/windows/universal-crt-deployment) C runtime library, [it must be installed manually](https://support.microsoft.com/en-us/topic/update-for-universal-c-runtime-in-windows-c0514201-7fe6-95a3-b0a5-287930f3560c) as UCRT is only pre-installed in Windows 10 and later.
2023-06-18 02:57:35 +01:00
For the image logo, only chafa is supported due to [a design flaw of ConPTY](https://github.com/microsoft/terminal/issues/1173). In addition, chafa support is not included by default due to the massive dependencies of imagemagick. You must built it yourself.
2022-11-06 16:01:10 +08:00
### Android
* [`freetype`](https://www.freetype.org/): Used for Termux font detection. [`freetype`](https://github.com/termux/termux-packages/tree/master/packages/freetype)
* [`libvulkan`](https://www.vulkan.org/): Vulkan module, also used for GPU detection. Usually has been provided by Android system. [`vulkan-loader-android`](https://github.com/termux/termux-packages/tree/master/packages/vulkan-loader-android) [`vulkan-headers`](https://github.com/termux/termux-packages/tree/master/packages/vulkan-headers)
* [`termux-api`](https://github.com/termux/termux-api-package): Used for Wifi / Battery detection. Read [the official doc](https://wiki.termux.com/wiki/Termux:API) for detail or if you hang on these modules (IMPORTANT). [`termux-api`](https://github.com/termux/termux-packages/tree/master/packages/termux-api)
2021-03-07 13:12:45 +01:00
2021-04-25 16:16:40 +02:00
## Support status
All categories not listed here should work without needing a specific implementation.
2022-02-25 13:30:37 +01:00
##### Available Modules
2022-02-13 23:51:13 +01:00
```
2023-07-26 10:27:40 +08:00
Battery, Bios, Bluetooth, Board, Break, Brightness, Colors, Command, CPU, CPUUsage, Cursor, Custom, Date, DateTime, DE, Disk, Display, Font, Gamepad, GPU, Host, Icons, Kernel, LM, Locale, LocalIP, Media, Memory, OpenCL, OpenGL, Packages, Player, Power Adapter, Processes, PublicIP, Separator, OS, Shell, Sound, Swap, Terminal, Terminal Font, Terminal Size, Theme, Time, Title, Uptime, Vulkan, Wallpaper, Wifi, WM, WMTheme
2022-02-13 23:51:13 +01:00
```
2023-01-09 15:20:30 +01:00
##### Builtin logos
2023-08-02 16:47:32 +08:00
2023-08-04 14:35:39 +08:00
```
2023-08-08 08:58:13 +08:00
Unknown, AIX, AlmaLinux, Alpine, AlpineSmall, Alpine2Small, Alter, Amazon, AmogOS, Anarchy, Android, AndroidSmall, Antergos, Antix, AoscOsRetro, AoscOsRetro_small, AoscOS, Aperture, Apricity, ArchBox, Archcraft, Archcraft2, Arch, Arch2, ArchSmall, Archlabs, ArchStrike, Artix, ArtixSmall, Artix2Small, ArcoLinux, ArcoLinuxSmall, ArseLinux, Arya, Asahi, Aster, AsteroidOS, AstOS, Astra, Athena, Bedrock, BigLinux, Bitrig, BlackArch, BlackPanther, BLAG, BlankOn, BlueLight, Bodhi, Bonsai, BSD, BunsenLabs, CachyOS, CachyOSSmall, Calculate, CalinixOS, CalinixOSSmall, Carbs, CBL-Mariner, CelOS, Center, CentOS, CentOSSmall, Chakra, ChaletOS, Chapeau, ChonkySealOS, Chrom, Cleanjaro, CleanjaroSmall, ClearLinux, ClearOS, Clover, Cobalt, Condres, ContainerLinux, CRUX, CRUXSmall, CrystalLinux, Cucumber, CutefishOS, CuteOS, CyberOS, dahlia, DarkOS, Debian, DebianSmall, Deepin, DesaOS, Devuan, DevuanSmall, DietPi, DracOS, DragonFly, DragonFlySmall, DragonFlyOld, Drauger, Droidian, Elementary, ElementarySmall, Elive, EncryptOS, Endeavour, Endless, Enso, EuroLinux, EvolutionOS, Exherbo, ExodiaPredator, Fedora, FedoraSmall, FedoraOld, FemboyOS, Feren, Finnix, Floflis, FreeBSD, FreeBSDSmall, FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, GarudaDragon, GarudaSmall, Gentoo, GentooSmall, GhostBSD, Glaucus, gNewSense, Gnome, GNU, GoboLinux, GrapheneOS, Grombyang, Guix, GuixSmall, Haiku, HaikuSmall, HamoniKR, HarDClanZ, Hash, Huayra, Hybrid, HydroOS, Hyperbola, HyperbolaSmall, Iglunix, InstantOS, IRIX, Itc, januslinux, Kaisen, Kali, KaliSmall, KaOS, KDENeon, Kibojoe, KISSLinux, Kogaion, Korora, KrassOS, KSLinux, Kubuntu, LangitKetujuh, Laxeros, LEDE, LibreELEC, Linspire, Linux, LinuxSmall, LinuxLight, LinuxLightSmall, Live_Raizo, LMDE, Lunar, MacOS, MacOSSmall, MacOS2, MacOS2Small, Mageia, MageiaSmall, MagpieOS, Mandriva, Manjaro, ManjaroSmall, Minix, MassOS, MatuusOS, MaUI, Meowix, Mer, Mint, MintSmall, MintOld, MiracleLinux, Msys2, Namib, Nekos, Neptune, NetRunner, Nitrux, Windows11, Windows11Small, Windows8, Windows, Windows95, NixOS, NixOS_small, NixOsOld, NixOsSmall, MX, MXSmall, NetBSD, Nobara, NomadBSD, Nurunner, NuTyX, Obarun, OBRevenge, OmniOS, OpenKylin, OpenBSD, OpenBSDSmall, OpenEuler, OpenIndiana, OpenMamba, OpenStage, OpenSuse, OpenSuseSmall, OpenSuseLeap, OpenSuseTumbleweed, OpenSuseTumbleweed2, OpenMandriva, OpenWrt, OPNsense, Oracle, Orchid, OrchidSmall, OS_Elbrus, OSMC, PacBSD, Parabola, ParabolaSmall, Parch, Pardus, Parrot, Parsix, PCBSD, PCLinuxOS, PearOS, Pengwin, Pentoo, Peppermint, PhyOS, Pisi, PNMLinux, Pop, PopSmall, Porteus, PostMarketOS, PostMarketOSSmall, PuffOS, Puppy, PureOS, PureOSSmall, Q4OS, Qubes, Qubyt, Quibian, Radix, Raspbian, RaspbianSmall, RavynOS, Reborn, RebornSmall, RedCore, RedHatEnterpriseLinux, RedHatEnterpriseLinux_old, RedstarOS, Refracted Devuan, Regata, Regolith, RhaymOS, RockyLinux, RockyLinuxSmall, RosaLinux, Proxmox, Sabayon, Sabotage, Sailfish, SalentOS, SalientOS, SambaBOX, Sasanqua, Scientific, Semc, Septor, Serene, SharkLinux, ShastraOS, Siduction, SkiffOS, Slitaz, Slackware, SlackwareSmall, SmartOS, Soda, SourceMage, Solaris, SolarisSmall, Solus, Sparky, Star, StockLinux, SteamOS, Sulin, Swagarch, T2, Tails, TeArch, TorizonCore, Trisquel, Twister, Ubuntu, UbuntuBudgie, UbuntuCinnamon, UbuntuGnome, UbuntuKylin, UbuntuMate, UbuntuOld, UbuntuSmall, UbuntuStudio, UbuntuSway, UbuntuTouch, UbuntuUnity, Ubuntu2Small, Ubuntu2Old, Ultramarine, Univalent, Univention, UOS, UrukOS, Uwuntu, Vanilla, Venom, Vnux, Vzlinux, Void, VoidSmall, WiiLinuxNgx, Xferience, YiffOS, Zorin
2023-08-04 14:35:39 +08:00
```
Run `fastfetch --print-logos` to print them
2021-05-08 18:35:51 +02:00
2021-06-14 14:57:45 +05:30
##### Package managers
2021-04-25 16:16:40 +02:00
```
2023-07-20 16:43:29 +01:00
apk, brew, Chocolatey, dpkg, emerge, eopkg, Flatpak, MacPorts, nix, Pacman, paludis, pkg, pkgtool, rpm, scoop, Snap, xbps
2021-04-25 16:16:40 +02:00
```
2021-06-14 14:57:45 +05:30
##### WM themes
2021-04-25 16:16:40 +02:00
```
2023-01-14 17:20:36 +01:00
DWM (Windows), KWin, Marco, Muffin, Mutter, Openbox (LXDE, LXQT & without DE), Quartz Compositor (macOS), XFWM
2021-04-25 16:16:40 +02:00
```
2021-06-14 14:57:45 +05:30
##### DE versions
2021-05-14 12:47:12 +02:00
```
2023-01-14 17:20:36 +01:00
Budgie, Cinnamon, Gnome, KDE Plasma, LXQt, Mate, XFCE4
2021-05-14 12:47:12 +02:00
```
2021-06-14 14:57:45 +05:30
##### Terminal fonts
2021-04-25 16:16:40 +02:00
```
2023-07-30 11:32:44 +08:00
Alacritty, Apple Terminal, ConEmu, Deepin Terminal, foot, Gnome Terminal, iTerm2, Kitty, Konsole, LXTerminal, MATE Terminal, mintty, QTerminal, Tabby, Terminator, Termux, Tilix, TTY, Warp, WezTerm, Windows Terminal, XFCE4 Terminal, Yakuake
2021-04-25 16:16:40 +02:00
```
2021-03-07 13:12:45 +01:00
## Building
fastfetch uses [`cmake`](https://cmake.org/) for building. [`pkg-config`](https://www.freedesktop.org/wiki/Software/pkg-config/) is recommended for better library detection. The simplest steps to build the fastfetch and flashfetch binaries are:
```bash
2021-07-06 21:25:12 +02:00
mkdir -p build
cd build
cmake ..
2022-06-08 12:07:06 +02:00
cmake --build . --target fastfetch --target flashfetch
```
2022-11-24 18:10:49 +01:00
If the build process fails to find the headers for a library listed in [dependencies](#dependencies), fastfetch will simply build without support for that specific feature. This means, it won't look for it at runtime and just act like it isn't available.
2021-06-08 20:01:29 +02:00
2022-10-09 21:02:33 +08:00
### Building on Windows
Currently GCC or clang is required (MSVC is not supported). MSYS2 with CLANG64 subsystem (or CLANGARM64 if needed) is suggested (and tested) to build fastfetch. If you need Windows 7 / 8.x support, using MINGW64 is suggested.
1. Install [MSYS2](https://www.msys2.org/#installation)
2023-01-11 18:07:58 +08:00
1. Open `MSYS2 / CLANG64` (not `MSYS2 / MSYS`, which targets cygwin C runtime)
1. Install dependencies
```bash
pacman -Syu mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-pkgconf mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-vulkan-loader mingw-w64-clang-x86_64-opencl-icd
```
2023-01-11 18:07:58 +08:00
Follow the building instructions of Linux next.
2022-10-09 21:02:33 +08:00
2021-03-07 13:12:45 +01:00
## Packaging
2022-06-08 12:11:00 +02:00
### Repositories
[![Packaging status](https://repology.org/badge/vertical-allrepos/fastfetch.svg?header=)](https://repology.org/project/fastfetch/versions)
2022-06-08 12:07:06 +02:00
### Manual
* DEB / RPM package: `cmake --build . --target package`
* Install directly: `cmake --install . --prefix /usr/local`
2021-03-07 13:12:45 +01:00
## FAQ
Q: Why do you need a very performant version of neofetch?
2022-12-23 22:17:40 +00:00
> I like putting neofetch in my ~/.bashrc to have a system overwiew whenever I use the terminal, but the slow speed annoyed me, so I created this. Also neofetch didn't output everything correctly (e.g Font is displayed as "[Plasma], Noto Sans, 10 [GTK2/3]") and writing my own tool gave me the possibility to fine tune it to run perfectly on at least my configuration.
2021-03-07 13:12:45 +01:00
2022-12-23 22:17:40 +00:00
Q: It does not display [*] correctly for me, what can I do?
> This is most likely because your system is not implemented (yet). At the moment I am focusing more on making the core app better, than adding more configurations. Feel free to open a pull request if you want to add support for your configuration