docs: update
This commit is contained in:
parent
fb62112f72
commit
dafacf8c71
33
README.md
33
README.md
|
@ -13,6 +13,39 @@ _/\ __)/_) pkgs 130
|
|||
\/-____\/ memory 1721MiB / 7942MiB
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
`pfetch` is configured through environment variables.
|
||||
|
||||
```sh
|
||||
# Which information to display.
|
||||
# NOTE: If 'ascii' will be used, it must come first.
|
||||
# Valid: space separated string
|
||||
PF_INFO="ascii title distro host kernel uptime pkgs memory"
|
||||
|
||||
# Example: Only ASCII.
|
||||
PF_INFO="ascii"
|
||||
|
||||
# Example: Only Information.
|
||||
PF_INFO="title distro host kernel uptime pkgs memory"
|
||||
|
||||
# Separator between info name and info data.
|
||||
# Valid: string
|
||||
PF_SEP=":"
|
||||
|
||||
# Color of info names:
|
||||
# Valid: 0-9
|
||||
PF_COL1=4
|
||||
|
||||
# Color of info data:
|
||||
# Valid: 0-9
|
||||
PF_COL2=7
|
||||
|
||||
# Alignment padding.
|
||||
# Valid: int
|
||||
PF_ALIGN=""
|
||||
```
|
||||
|
||||
## TODO
|
||||
|
||||
- [x] Store ascii "width" for dynamic padding.
|
||||
|
|
5
pfetch
5
pfetch
|
@ -57,6 +57,7 @@ log() {
|
|||
# PF_COL1: Control color of info name.
|
||||
# PF_SEP: Control the separator between info name and info data.
|
||||
# PF_COL2: Control color of info data.
|
||||
# PF_ALIGN: Control the alignment amount.
|
||||
#
|
||||
# '\033[14C': Move cursor 14 characters to the right.
|
||||
# TODO: Base this on ASCII art width.
|
||||
|
@ -75,10 +76,10 @@ log() {
|
|||
"${ascii_width:--1}" \
|
||||
"${PF_COL1:-5}" \
|
||||
"$1" \
|
||||
"${PF_SEP:- }" \
|
||||
"$PF_SEP" \
|
||||
"${PF_COL2:-7}" \
|
||||
"${#1}" \
|
||||
"${PF_ALIGN:-$info_length}" \
|
||||
"${PF_ALIGN:-$((info_length + 1))}" \
|
||||
"$2"
|
||||
|
||||
# Keep track of the number of times 'log()' has been run.
|
||||
|
|
Loading…
Reference in New Issue
Block a user