update help file

This commit is contained in:
Jin-Asanami 2022-11-16 16:35:56 +09:00
parent 30bc5927af
commit 6f7846982f
2 changed files with 87 additions and 95 deletions

103
neofetch
View file

@ -3,12 +3,12 @@
# shellcheck source=/dev/null
# shellcheck disable=2009 disable=2153 disable=2154 disable=2243 disable=2244
#
# Neofetch: A command-line system information tool written in bash 3.2+.
# https://github.com/dylanaraps/neofetch
# UniFetch: Neofetch fork with expanded functions.
# https://github.com/jin-asanami/unifetch
#
# The MIT License (MIT)
#
# Copyright (c) 2015-2021 Dylan Araps
# Original Copyright (c) 2015-2021 Dylan Araps
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@ -28,7 +28,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
version=7.4.0
version=1.1.1
nf_version=7.4.0
# Fallback to a value of '5' for shells which support bash
# but do not set the 'BASH_' shell variables (osh).
@ -48,7 +49,7 @@ LANG=C
# Fix issues with gsettings.
[[ -z $GIO_EXTRA_MODULES ]] && export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules/
# Neofetch default config.
# UniFetch default config.
read -rd '' config <<'EOF'
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
@ -668,10 +669,10 @@ separator=":"
# Example:
#
# Display colors 0-7 in the blocks. (8 colors)
# neofetch --block_range 0 7
# unifetch --block_range 0 7
#
# Display colors 0-15 in the blocks. (16 colors)
# neofetch --block_range 0 15
# unifetch --block_range 0 15
block_range=(0 15)
# Toggle color blocks
@ -705,7 +706,7 @@ block_height=1
# begin printing the columns, in case you want to e.g. center them under your
# text.
# Example:
# col_offset="auto" - Default behavior of neofetch
# col_offset="auto" - Default behaviour of unifetch
# col_offset=7 - Leave 7 spaces then print the colors
col_offset="auto"
@ -719,8 +720,8 @@ col_offset="auto"
# Flag: --bar_char
#
# Example:
# neofetch --bar_char 'elapsed' 'total'
# neofetch --bar_char '-' '='
# unifetch --bar_char 'elapsed' 'total'
# unifetch --bar_char '-' '='
bar_char_elapsed="-"
bar_char_total="="
@ -747,8 +748,8 @@ bar_length=15
# Flag: --bar_colors
#
# Example:
# neofetch --bar_colors 3 4
# neofetch --bar_colors distro 5
# unifetch --bar_colors 3 4
# unifetch --bar_colors distro 5
bar_color_elapsed="distro"
bar_color_total="distro"
@ -791,7 +792,7 @@ image_backend="ascii"
#
# Default: 'auto'
# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'
# 'command output (unifetch --ascii "$(fortune | cowsay -W 30)")'
# Flag: --source
#
# NOTE: 'auto' will pick the best image source for whatever image backend is used.
@ -873,7 +874,7 @@ ascii_bold="on"
# Image loop
# Setting this to on will make neofetch redraw the image constantly until
# Setting this to on will make unifetch redraw the image constantly until
# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
#
# Default: 'off'
@ -883,9 +884,9 @@ image_loop="off"
# Thumbnail directory
#
# Default: '~/.cache/thumbnails/neofetch'
# Default: '~/.cache/thumbnails/unifetch'
# Values: 'dir'
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/unifetch"
# Crop mode
#
@ -2978,8 +2979,8 @@ get_gpu() {
;;
"Mac OS X"|"macOS")
if [[ -f "${cache_dir}/neofetch/gpu" ]]; then
source "${cache_dir}/neofetch/gpu"
if [[ -f "${cache_dir}/unifetch/gpu" ]]; then
source "${cache_dir}/unifetch/gpu"
else
if [[ $(uname -m) == 'arm64' ]]; then
@ -3200,8 +3201,8 @@ get_memory() {
memory_unit_divider=1
memory_unit_multiplier=1
mu_mb="$mem_used"
mt_mb="$mem_total"
mem_used_megabyte="$mem_used"
mem_total_megabyte="$mem_total"
case $memory_unit in
gib)
@ -3233,9 +3234,9 @@ get_memory() {
# Bars.
case $memory_display in
"bar") memory="$(bar "${mu_mb}" "${mt_mb}")" ;;
"infobar") memory="${memory} $(bar "${mu_mb}" "${mt_mb}")" ;;
"barinfo") memory="$(bar "${mu_mb}" "${mt_mb}")${info_color} ${memory}" ;;
"bar") memory="$(bar "${mem_used_megabyte}" "${mem_total_megabyte}")" ;;
"infobar") memory="${memory} $(bar "${mem_used_megabyte}" "${mem_total_megabyte}")" ;;
"barinfo") memory="$(bar "${mem_used_megabyte}" "${mem_total_megabyte}")${info_color} ${memory}" ;;
esac
}
@ -5070,7 +5071,7 @@ make_thumbnail() {
esac
# Create the thumbnail dir if it doesn't exist.
mkdir -p "${thumbnail_dir:=${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch}"
mkdir -p "${thumbnail_dir:=${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/unifetch}"
if [[ ! -f "${thumbnail_dir}/${image_name}" ]]; then
# Get image size so that we can do a better crop.
@ -5145,7 +5146,7 @@ display_image() {
ueberzug layer --parser bash 0< <(
declare -Ap ADD=(\
[action]="add"\
[identifier]="neofetch"\
[identifier]="unifetch"\
[x]=$xoffset [y]=$yoffset\
[path]=$image\
)
@ -5483,19 +5484,19 @@ get_user_config() {
err "Config: Sourced user config. (${config_file})"
return
elif [[ -f "${XDG_CONFIG_HOME}/neofetch/config.conf" ]]; then
source "${XDG_CONFIG_HOME}/neofetch/config.conf"
err "Config: Sourced user config. (${XDG_CONFIG_HOME}/neofetch/config.conf)"
elif [[ -f "${XDG_CONFIG_HOME}/unifetch/config.conf" ]]; then
source "${XDG_CONFIG_HOME}/unifetch/config.conf"
err "Config: Sourced user config. (${XDG_CONFIG_HOME}/unifetch/config.conf)"
elif [[ -f "${XDG_CONFIG_HOME}/neofetch/config" ]]; then
source "${XDG_CONFIG_HOME}/neofetch/config"
err "Config: Sourced user config. (${XDG_CONFIG_HOME}/neofetch/config)"
elif [[ -f "${XDG_CONFIG_HOME}/unifetch/config" ]]; then
source "${XDG_CONFIG_HOME}/unifetch/config"
err "Config: Sourced user config. (${XDG_CONFIG_HOME}/unifetch/config)"
elif [[ -z "$no_config" ]]; then
config_file="${XDG_CONFIG_HOME}/neofetch/config.conf"
config_file="${XDG_CONFIG_HOME}/unifetch/config.conf"
# The config file doesn't exist, create it.
mkdir -p "${XDG_CONFIG_HOME}/neofetch/"
mkdir -p "${XDG_CONFIG_HOME}/unifetch/"
printf '%s\n' "$config" > "$config_file"
fi
}
@ -5521,8 +5522,8 @@ bar() {
cache() {
if [[ "$2" ]]; then
mkdir -p "${cache_dir}/neofetch"
printf "%s" "${1/*-}=\"$2\"" > "${cache_dir}/neofetch/${1/*-}"
mkdir -p "${cache_dir}/unifetch"
printf "%s" "${1/*-}=\"$2\"" > "${cache_dir}/unifetch/${1/*-}"
fi
}
@ -5684,10 +5685,10 @@ decode_url() {
# FINISH UP
usage() { printf "%s" "\
Usage: neofetch func_name --option \"value\" --option \"value\"
Usage: unifetch func_name --option \"value\" --option \"value\"
Neofetch is a CLI system information tool written in BASH. Neofetch
displays information about your system next to an image, your OS logo,
UniFetch is a CLI system information tool written in BASH, forked from Neofetch.
UniFetch displays information about your system next to an image, your OS logo,
or any ASCII file of your choice.
NOTE: Every launch flag has a config option.
@ -5698,9 +5699,9 @@ INFO:
func_name Specify a function name (second part of info() from config) to
quickly display only that function's information.
Example: neofetch uptime --uptime_shorthand tiny
Example: unifetch uptime --uptime_shorthand tiny
Example: neofetch uptime disk wm memory
Example: unifetch uptime disk wm memory
This can be used in bars and scripts like so:
@ -5708,7 +5709,7 @@ INFO:
For multiple outputs at once (each line of info in an array):
IFS=\$'\\n' read -d \"\" -ra info < <(neofetch memory uptime wm)
IFS=\$'\\n' read -d \"\" -ra info < <(unifetch memory uptime wm)
info=(\"\${info[@]##*: }\")
@ -5717,7 +5718,7 @@ INFO:
'print_info()' function inside the config file.
For example: 'info \"Memory\" memory' would be '--disable memory'
NOTE: You can supply multiple args. eg. 'neofetch --disable cpu gpu'
NOTE: You can supply multiple args. eg. 'unifetch --disable cpu gpu'
--title_fqdn on/off Hide/Show Fully Qualified Domain Name in title.
--package_managers on/off Hide/Show Package Manager names. (on, tiny, off)
@ -5839,7 +5840,7 @@ IMAGE BACKEND:
--ascii source Shortcut to use 'ascii' backend.
NEW: neofetch --ascii \"\$(fortune | cowsay -W 30)\"
NEW: unifetch --ascii \"\$(fortune | cowsay -W 30)\"
--caca source Shortcut to use 'caca' backend.
--catimg source Shortcut to use 'catimg' backend.
@ -5937,15 +5938,15 @@ OTHER:
--print_config Print the default config file to stdout.
--stdout Turn off all colors and disables any ASCII/image backend.
--help Print this text and exit
--version Show neofetch version
--version Show unifetch version
-v Display error messages.
-vv Display a verbose log for error reporting.
DEVELOPER:
--gen-man Generate a manpage for Neofetch in your PWD. (Requires GNU help2man)
--gen-man Generate a manpage for unifetch in your PWD. (Requires GNU help2man)
Report bugs to https://github.com/dylanaraps/neofetch/issues
Report bugs to https://github.com/jin-asanami/unfietch/issues
"
exit 1
@ -6097,7 +6098,7 @@ get_args() {
"--gap") gap="$2" ;;
"--clean")
[[ -d "$thumbnail_dir" ]] && rm -rf "$thumbnail_dir"
rm -rf "$cache_dir/neofetch/"
rm -rf "$cache_dir/unifetch/"
exit
;;
@ -6140,7 +6141,7 @@ get_args() {
"-vv") set -x; verbose="on" ;;
"--help") usage ;;
"--version")
printf '%s\n' "Neofetch $version"
printf '%s\n' "UniFetch $version == Neofetch $nf_version"
exit 1
;;
"--gen-man")
@ -13793,9 +13794,9 @@ main() {
[[ $image_backend == *w3m* ]] && display_image
[[ $image_backend == *ueberzug* ]] && display_image
# Add neofetch info to verbose output.
err "Neofetch command: $0 $*"
err "Neofetch version: $version"
# Add unifetch info to verbose output.
err "UniFetch command: $0 $*"
err "UniFetch version: $version"
[[ $verbose == on ]] && printf '%b\033[m' "$err" >&2

View file

@ -1,13 +1,13 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
.TH NEOFETCH "1" "September 2022" "Neofetch 7.3.1" "User Commands"
.TH UNIFETCH "1" "November 2022" "UniFetch 1.1.1 == Neofetch 7.4.0" "User Commands"
.SH NAME
Neofetch \- manual page for Neofetch 7.3.1
UniFetch \- A fast, highly customizable system info script
.SH SYNOPSIS
.B neofetch
.B unifetch
\fI\,func_name --option "value" --option "value"\/\fR
.SH DESCRIPTION
Neofetch is a CLI system information tool written in BASH. Neofetch
displays information about your system next to an image, your OS logo,
UniFetch is a CLI system information tool written in BASH, forked from Neofetch.
UniFetch displays information about your system next to an image, your OS logo,
or any ASCII file of your choice.
.PP
NOTE: Every launch flag has a config option.
@ -18,17 +18,17 @@ func_name
Specify a function name (second part of info() from config) to
quickly display only that function's information.
.IP
Example: neofetch uptime \fB\-\-uptime_shorthand\fR tiny
Example: unifetch uptime \fB\-\-uptime_shorthand\fR tiny
.IP
Example: neofetch uptime disk wm memory
Example: unifetch uptime disk wm memory
.IP
This can be used in bars and scripts like so:
.IP
memory="$(neofetch memory)"; memory="${memory##*: }"
memory="$(unifetch memory)"; memory="${memory##*: }"
.IP
For multiple outputs at once (each line of info in an array):
.IP
IFS=$'\en' read \fB\-d\fR "" \fB\-ra\fR info < <(neofetch memory uptime wm)
IFS=$'\en' read \fB\-d\fR "" \fB\-ra\fR info < <(unifetch memory uptime wm)
.IP
info=("${info[@]##*: }")
.TP
@ -38,13 +38,15 @@ in the output. 'infoname' is the function name from the
\&'print_info()' function inside the config file.
For example: 'info "Memory" memory' would be '\-\-disable memory'
.IP
NOTE: You can supply multiple args. eg. 'neofetch \fB\-\-disable\fR cpu gpu'
NOTE: You can supply multiple args. eg. 'unifetch \fB\-\-disable\fR cpu gpu'
.TP
\fB\-\-title_fqdn\fR on/off
Hide/Show Fully Qualified Domain Name in title.
.TP
\fB\-\-package_managers\fR on/off
Hide/Show Package Manager names. (on, tiny, off)
.HP
\fB\-\-show_package_total\fR on/off Hide/Show Package Manager names . (on, tiny, off)
.TP
\fB\-\-os_arch\fR on/off
Hide/Show OS architecture.
@ -164,9 +166,12 @@ Print the Artist/Album/Title on separate lines.
\fB\-\-memory_percent\fR on/off
Display memory percentage.
.TP
\fB\-\-memory_unit\fR kib/mib/gib
\fB\-\-memory_unit\fR kib/mib/gib/tib
Memory output unit.
.TP
\fB\-\-memory_precision\fR integer
Change memory output precision. (???0, default=2)
.TP
\fB\-\-music_player\fR player\-name
Manually specify a player to use.
Available values are listed in the config file
@ -244,7 +249,7 @@ Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img',
\fB\-\-ascii\fR source
Shortcut to use 'ascii' backend.
.IP
NEW: neofetch \fB\-\-ascii\fR "$(fortune | cowsay \fB\-W\fR 30)"
NEW: unifetch \fB\-\-ascii\fR "$(fortune | cowsay \fB\-W\fR 30)"
.TP
\fB\-\-caca\fR source
Shortcut to use 'caca' backend.
@ -305,19 +310,19 @@ NOTE: AIX, AlmaLinux, Alpine, Alter, Amazon, AmogOS, Anarchy, Android, Antergos,
AOSC OS/Retro, Aperio GNU/Linux, Apricity, Arch, ArchBox, Archcraft, ARCHlabs, ArchMerge,
ArchStrike, ArcoLinux, Artix, Arya, Asahi, AsteroidOS, astOS, Bedrock, BigLinux, Bitrig,
BlackArch, blackPanther, BLAG, BlankOn, BlueLight, Bodhi, bonsai, BSD, BunsenLabs, Cachy OS,
Calculate, CalinixOS, Carbs, CBL-Mariner, CelOS, Center, CentOS, Chakra, ChaletOS, Chapeau,
ChonkySealOS, Chrom, Cleanjaro, Clear Linux OS, ClearOS, Clover, Condres, Container Linux by
CoreOS, CRUX, Crystal Linux, Cucumber, CutefishOS, CyberOS, dahlia, DarkOs, Darwin, Debian,
Deepin, DesaOS, Devuan, DracOS, DragonFly, Drauger, Droidian, Elementary, Elive, EncryptOS, EndeavourOS,
Endless, EuroLinux, Exherbo, Exodia Predator OS, Fedora, Feren, Finnix, FreeBSD, FreeMiNT,
Calculate, CalinixOS, Carbs, CBL\-Mariner, CelOS, Center, CentOS, Chakra, ChaletOS, Chapeau,
ChonkySealOS, Chrom, Cleanjaro, Clear Linux OS, ClearOS, Clover, Cobalt Linux, Condres,
Container Linux by CoreOS, CRUX, Crystal Linux, Cucumber, CutefishOS, CyberOS, dahlia, DarkOs, Darwin,
Debian, Deepin, DesaOS, Devuan, DracOS, DragonFly, Drauger, Elementary, Elive, EncryptOS, EndeavourOS,
Endless, Enso, EuroLinux, Exherbo, Exodia Predator OS, Fedora, Feren, Finnix, FreeBSD, FreeMiNT,
Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, GhostBSD, glaucus, gNewSense, GNOME, GNU,
GoboLinux, GrapheneOS, Grombyang, Guix, Haiku, HarDClanZ, Hash, Huayra, HydroOS, Hyperbola,
iglunix, instantOS, IRIX, Itc, januslinux, Kaisen, Kali, Kamuriki, KaOS, KDE, Kibojoe, Kogaion, Korora,
KrassOS, KSLinux, Kubuntu, LangitKetujuh, LaxerOS, LEDE, LibreELEC, Linspire, Linux, Linux Lite,
Linux Mint, Linux Mint Old, Live Raizo, LMDE, Lubuntu, Lunar, mac, Mageia, MagpieOS, Mandriva,
Manjaro, MassOS, MatuusOS, Maui, Mer, Minix, MIRACLE LINUX, MX, Namib, Neptune, NetBSD, Netrunner,
Nitrux, NixOS, NNLinux, NomadBSD, Nurunner, NuTyX, Obarun, OBRevenge, Open Source Media Center, OpenBSD,
openEuler, OpenIndiana, openmamba, OpenMandriva, OpenStage, openSUSE, openSUSE Leap, openSUSE
Nitrux, NixOS, NNLinux, NomadBSD, Nurunner, NuTyX, Obarun, OBRevenge, Open Source Media Center,
OpenBSD, openEuler, OpenIndiana, openmamba, OpenMandriva, OpenStage, openSUSE, openSUSE Leap, openSUSE
Tumbleweed, OpenWrt, OPNsense, Oracle, orchid, OS Elbrus, PacBSD, Parabola, parch, Pardus, Parrot,
Parsix, PCBSD, PCLinuxOS, pearOS, Pengwin, Pentoo, Peppermint, Pisi, PNM Linux, Pop!_OS, Porteus,
PostMarketOS, Profelis SambaBOX, Proxmox, PuffOS, Puppy, PureOS, Q4OS, Qubes, Qubyt, Quibian,
@ -326,19 +331,17 @@ Regolith, rocky, Rosa, Sabayon, sabotage, Sailfish, SalentOS, Scientific, semc,
SharkLinux, ShastraOS, Siduction, SkiffOS, Slackware, SliTaz, SmartOS, Soda, Solus, Source Mage,
Sparky, Star, SteamOS, Sulin, SunOS, SwagArch, t2, Tails, TeArch, TorizonCore, Trisquel, Twister,
Ubuntu, Ubuntu Budgie, Ubuntu Cinnamon, Ubuntu Kylin, Ubuntu MATE, Ubuntu Studio, Ubuntu Sway,
Ubuntu Touch, Ubuntu-GNOME, ubuntu_old02, Ultramarine Linux, Univalent, Univention, Uos, uwuntu, VanillaOS,
Venom, VNux, Void, VzLinux, wii-linux-ngx, Windows, Windows 10, Windows 11, XFerience, Xubuntu,
Ubuntu Touch, Ubuntu\-GNOME, ubuntu_old02, Ultramarine Linux, Univalent, Univention, Uos, uwuntu,
Vanilla, Venom, VNux, Void, VzLinux, wii\-linux\-ngx, Windows, Windows 10, Windows 11, XFerience, Xubuntu,
yiffOS, Zorin have ascii logos.
.TP
NOTE: arch, dragonfly, Fedora, LangitKetujuh, nixos, redhat, Ubuntu
have 'old' logo variants, use {distro}_old to use them.
NOTE: arch, dragonfly, Fedora, LangitKetujuh, nixos, redhat, Ubuntu have 'old' logo variants, use
{distro}_old to use them.
.TP
NOTE: alpine, android, aoscosretro, arch, arcolinux, artix,
CalinixOS, centos, cleanjaro, crux, debian, dragonfly, elementary,
fedora, freebsd, gentoo, guix, haiku, hyperbola, linuxlite,
linuxmint, mac, mageia, manjaro, mx, netbsd, nixos, openbsd,
opensuse, orchid, parabola, popos, postmarketos, pureos, Raspbian,
rocky, slackware, sunos, ubuntu, void have 'small' logo variants,
NOTE: alpine, android, aoscosretro, arch, arcolinux, artix, CalinixOS, centos, cleanjaro, crux,
debian, dragonfly, elementary, fedora, freebsd, garuda, gentoo, guix, haiku, hyperbola, linuxlite,
linuxmint, mac, mageia, manjaro, mx, netbsd, nixos, openbsd, opensuse, orchid, parabola, popos,
postmarketos, pureos, Raspbian, rocky, slackware, sunos, ubuntu, void have 'small' logo variants,
use {distro}_small to use them.
.TP
\fB\-\-ascii_bold\fR on/off
@ -409,7 +412,7 @@ Turn off all colors and disables any ASCII/image backend.
Print this text and exit
.TP
\fB\-\-version\fR
Show neofetch version
Show unifetch version
.TP
\fB\-v\fR
Display error messages.
@ -419,18 +422,6 @@ Display a verbose log for error reporting.
.SS "DEVELOPER:"
.TP
\fB\-\-gen\-man\fR
Generate a manpage for Neofetch in your PWD. (Requires GNU help2man)
Generate a manpage for unifetch in your PWD. (Requires GNU help2man)
.SH "REPORTING BUGS"
Report bugs to https://github.com/dylanaraps/neofetch/issues
.SH "SEE ALSO"
The full documentation for
.B Neofetch
is maintained as a Texinfo manual. If the
.B info
and
.B Neofetch
programs are properly installed at your site, the command
.IP
.B info Neofetch
.PP
should give you access to the complete manual.
Report bugs to https://github.com/jin\-asanami/unfietch/issues