docs: update
This commit is contained in:
parent
4c20333450
commit
17f6791ffa
16
pfetch
16
pfetch
|
@ -79,6 +79,12 @@ log() {
|
||||||
: $((info_height+=1))
|
: $((info_height+=1))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Simple function to avoid '>/dev/null' spam.
|
||||||
|
# This checks to see if a command is in '$PATH'.
|
||||||
|
has() {
|
||||||
|
command -v "$1" >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
get_title() {
|
get_title() {
|
||||||
# Username is retrieved by first checking '$USER' with a fallback
|
# Username is retrieved by first checking '$USER' with a fallback
|
||||||
# to the 'whoami' command.
|
# to the 'whoami' command.
|
||||||
|
@ -110,6 +116,8 @@ get_os() {
|
||||||
|
|
||||||
case $os in
|
case $os in
|
||||||
Linux*)
|
Linux*)
|
||||||
|
has lsb_release && distro=$(lsb_release -sd)
|
||||||
|
|
||||||
# Disable warning about shellcheck not being able
|
# Disable warning about shellcheck not being able
|
||||||
# to read '/etc/os-release'. This is fine.
|
# to read '/etc/os-release'. This is fine.
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
|
@ -117,8 +125,8 @@ get_os() {
|
||||||
|
|
||||||
# Special cases for distributions which don't follow.
|
# Special cases for distributions which don't follow.
|
||||||
# the '/etc/os-release' "standard".
|
# the '/etc/os-release' "standard".
|
||||||
command -v crux >/dev/null && distro=$(crux)
|
has crux && distro=$(crux)
|
||||||
command -v guix >/dev/null && distro='Guix System'
|
has guix && distro='Guix System'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
Darwin*)
|
Darwin*)
|
||||||
|
@ -214,10 +222,6 @@ get_uptime() {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_pkgs() {
|
get_pkgs() {
|
||||||
# Simple function to avoid '>/dev/null' spam.
|
|
||||||
# This checks to see if a command is in '$PATH'.
|
|
||||||
has() { command -v "$1" >/dev/null; }
|
|
||||||
|
|
||||||
# This works by first checking for which package managers are
|
# This works by first checking for which package managers are
|
||||||
# isntalled and finally by printing each package manager's
|
# isntalled and finally by printing each package manager's
|
||||||
# package list with each package one per line.
|
# package list with each package one per line.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user