pfetch/README.md

127 lines
3.1 KiB
Markdown
Raw Normal View History

2019-10-01 10:00:01 +02:00
<p align="center"><img src="https://user-images.githubusercontent.com/6799467/65944518-68834d80-e421-11e9-9b14-6ca26a16108a.png" width="350px"></p>
2019-10-01 09:59:35 +02:00
<h1 align="center">pfetch</h1>
2019-10-01 10:17:57 +02:00
<p align="center">A pretty system information tool written in POSIX sh</p><br>
2019-09-24 12:07:10 +02:00
2019-10-01 10:12:16 +02:00
<img src="https://user-images.githubusercontent.com/6799467/65945384-5bfff480-e423-11e9-863e-4e7cf16eb648.png" width="40%" align="right">
2019-10-01 10:03:39 +02:00
The goal of this project is to implement a simple system
information tool in POSIX `sh` using features built into
the language itself (*where possible*).
2019-10-01 10:01:38 +02:00
2019-10-01 10:03:39 +02:00
The source code is highly documented and I hope it will
act as a learning resource for POSIX `sh` and simple
information detection across various different operating
systems.
2019-10-01 10:01:38 +02:00
2019-10-01 10:03:39 +02:00
If anything in the source code is unclear or is lacking
in its explanation, open an issue. Sometimes you get too
close to something and you fail to see the "bigger
picture"!
2019-10-01 10:01:38 +02:00
2019-10-01 10:12:55 +02:00
<br>
<br>
<br>
2019-10-01 10:13:13 +02:00
<br>
2019-10-01 10:12:55 +02:00
2019-09-24 20:08:33 +02:00
## OS support
2019-10-01 10:19:32 +02:00
- **Linux**
- Alpine Linux, Arch Linux, Arco Linux, Artix Linux, CentOS, Dahlia, Debian, Devuan, Elementary, Fedora, Gentoo, Guix, Hyperbola, instantOS, KISS Linux, Linux Lite, Linux Mint, Mageia, Manjaro, MX Linux, NixOS, OpenSUSE, Parabola, Pop!\_OS, PureOS, Slackware, Solus, Ubuntu and Void Linux.
2019-10-01 10:19:32 +02:00
- All other distributions are supported with a generic penguin logo.
2019-10-03 11:30:25 +02:00
- **Android**
2019-10-01 10:19:32 +02:00
- **BSD**
- DragonflyBSD, FreeBSD, NetBSD and OpenBSD.
2019-10-01 10:19:52 +02:00
- **Windows**
- Windows subsystem for Linux.
2019-09-30 22:18:56 +02:00
- **Haiku**
2019-09-30 22:19:27 +02:00
- **MacOS**
2019-09-30 22:18:56 +02:00
- **Minix**
- **Solaris**
2020-03-09 23:08:47 +01:00
- **IRIX**
2021-08-27 06:22:08 +02:00
- **SerenityOS**
2019-09-24 20:08:33 +02:00
2019-09-24 13:50:14 +02:00
## Configuration
`pfetch` is configured through environment variables.
```sh
# Which information to display.
# NOTE: If 'ascii' will be used, it must come first.
2019-09-24 15:15:35 +02:00
# Default: first example below
2019-09-24 13:50:14 +02:00
# Valid: space separated string
2019-09-24 21:52:13 +02:00
#
2019-09-30 23:19:33 +02:00
# OFF by default: shell editor wm de palette
2019-09-29 16:25:26 +02:00
PF_INFO="ascii title os host kernel uptime pkgs memory"
2019-09-24 13:50:14 +02:00
# Example: Only ASCII.
PF_INFO="ascii"
# Example: Only Information.
2019-09-29 16:25:26 +02:00
PF_INFO="title os host kernel uptime pkgs memory"
2019-09-24 13:50:14 +02:00
2020-01-26 21:08:57 +01:00
# A file to source before running pfetch.
# Default: unset
# Valid: A shell script
PF_SOURCE=""
2019-09-24 13:50:14 +02:00
# Separator between info name and info data.
2019-09-24 15:15:35 +02:00
# Default: unset
2019-09-24 13:50:14 +02:00
# Valid: string
PF_SEP=":"
# Enable/Disable colors in output:
# Default: 1
# Valid: 1 (enabled), 0 (disabled)
PF_COLOR=1
2019-09-24 13:50:14 +02:00
# Color of info names:
2019-09-24 15:15:35 +02:00
# Default: unset (auto)
2019-09-24 13:50:14 +02:00
# Valid: 0-9
PF_COL1=4
# Color of info data:
2019-09-24 15:15:35 +02:00
# Default: unset (auto)
2019-09-24 13:50:14 +02:00
# Valid: 0-9
2021-10-05 17:53:52 +02:00
PF_COL2=9
2019-09-24 13:50:14 +02:00
2019-09-25 09:40:36 +02:00
# Color of title data:
# Default: unset (auto)
# Valid: 0-9
PF_COL3=1
2019-09-24 13:50:14 +02:00
# Alignment padding.
2019-09-24 15:15:35 +02:00
# Default: unset (auto)
2019-09-24 13:50:14 +02:00
# Valid: int
PF_ALIGN=""
2019-09-24 15:15:35 +02:00
# Which ascii art to use.
# Default: unset (auto)
# Valid: string
PF_ASCII="openbsd"
2019-09-30 23:00:27 +02:00
# The below environment variables control more
# than just 'pfetch' and can be passed using
# 'HOSTNAME=cool_pc pfetch' to restrict their
# usage solely to 'pfetch'.
# Which user to display.
USER=""
# Which hostname to display.
HOSTNAME=""
# Which editor to display.
EDITOR=""
# Which shell to display.
SHELL=""
# Which desktop environment to display.
XDG_CURRENT_DESKTOP=""
2019-09-24 13:50:14 +02:00
```
2019-09-24 20:52:25 +02:00
## Credit
- [ufetch](https://gitlab.com/jschx/ufetch): Lots of ASCII logos.
2019-09-27 08:10:04 +02:00
- Contrary to the belief of a certain youtuber, `pfetch` shares **zero** code with `ufetch`. Only some of the ASCII logos were used.