Compare commits

..

1 Commits

Author SHA1 Message Date
Dylan Araps
a5405baec6 packages: start work on bedrock support 2019-01-04 21:20:14 +02:00
4 changed files with 133 additions and 389 deletions

View File

@@ -18,6 +18,6 @@ install:
script: script:
- time ./neofetch --travis -v - time ./neofetch --travis -v
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck -e SC2244 -e SC2243 neofetch; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck neofetch; fi
# Check for lines longer than 100 chars. # Check for lines longer than 100 chars.
- if grep '.\{102\}' neofetch; then (exit 1); else (exit 0); fi - if grep '.\{102\}' neofetch; then (exit 1); else (exit 0); fi

View File

@@ -7,106 +7,37 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased] ## [Unreleased]
<img src="https://i.imgur.com/ZQI2EYz.png" alt="logo" height="100px">
**Contributors** **Contributors**
[**@konimex**](https://github.com/konimex), [**@iandrewt**](https://github.com/iandrewt), [**@arisinfenix**](https://github.com/arisinfenix), [**@xPMo**](https://github.com/xPMo), [**@nero**](https://github.com/nero), [**@alyssais**](https://github.com/alyssais), [**@plgruener**](https://github.com/plgruener), [**@StarryTony**](https://github.com/StarryTony), [**@julianaito**](https://github.com/julianaito), [**@HolyStephano**](https://github.com/HolyStephano), [**@nikitenich**](https://github.com/nikitenich), [**@Appadeia**](https://github.com/Appadeia), [**@marlonn**](https://github.com/marlonn), [**@Snuggle**](https://github.com/dylanaraps/neofetch/commits?author=Snuggle), [**@Phuurl**](https://github.com/Phuurl), [**@erikdubois**](https://github.com/erikdubois) - [**@nero**](https://github.com/nero)
- [**@alyssais**](https://github.com/alyssais)
**OS** - [**@plgruener**](https://github.com/plgruener)
- [**@StarryTony**](https://github.com/StarryTony)
- Added support for Bedrock Linux. [**@paradigm**](https://github.com/paradigm) - [**@julianaito**](https://github.com/julianaito)
- Added support for Namib GNU/Linux. [**@arisinfenix**](https://github.com/arisinfenix) - [**@HolyStephano**](https://github.com/HolyStephano)
- Added support for Reborn OS. [**@iandrewt**](https://github.com/iandrewt) - [**@nikitenich**](https://github.com/nikitenich)
- Added support for OpenMandriva Lx. [**@konimex**](https://github.com/konimex)
- Added support for Star. [**@arisinfenix**](https://github.com/arisinfenix)
- Added support for BlueLight OS.
- Added support for Huayra Linux.
- Added support for Pentoo.
**Highlights**
- [ASCII] Added support for command output. You can now use whatever terminal commands you like as the ASCII art.
```sh
# Use fortune and cowsay as ascii art.
neofetch --ascii "$(fortune|cowsay -W 30)"
# use figlet as ascii art.
neofetch --ascii "$(figlet -w 30 hello world)"
```
<img src="https://i.imgur.com/ozoXAvz.jpg" alt="scrot" height="400px">
- Added a new "simple" mode. You can now use neofetch for scripting by getting it to output individual info functions in plain text.
```sh
# Example:
neofetch uptime --uptime_shorthand tiny
> uptime: 32m
# Example:
neofetch uptime disk wm memory
> uptime: 33 mins
> disk (/): 212G / 235G (96%)
> wm: Openbox
> memory: 1215MiB / 7881MiB
# This can be used in bars and scripts like so:
memory="$(neofetch memory)"; memory="${memory##*: }"
# For multiple outputs at once (each line of info in an array):
# Much faster than running neofetch multiple times.
IFS=$'\n' read -d "" -ra info < <(neofetch memory uptime wm)
info=("${info[@]##*: }")
```
**Info** **Info**
- **Song**: Added snippet to display music player.
- `[[ $player ]] && prin "Music Player" "$player"`
- NOTE: Must have `info "Song" song` enabled.
- **Song**: Added support for Netease Cloud.
- **Song**: Fixed issues in various players. [**@arisinfenix**](https://github.com/arisinfenix) [**@xPMo**](https://github.com/xPMo)
- **Song**: Fixed issues with non-English tags.
- **Song**: Fixed issues with broken newlines.
- **Song**: Fixed issues with Deadbeef.
- **Song**: Fixed issues with `qmmp`.
- **Song**: Removed `gpmdp-remote` support (unmaintained/no longer works).
- **Shell**: Fixed output for mksh [**@nero**](https://github.com/nero) - **Shell**: Fixed output for mksh [**@nero**](https://github.com/nero)
- **Packages**: Added support for `scoop`. [**@Phuurl**](https://github.com/Phuurl)
- **Packages**: Added support for `puyo`. [**@Appadeia**](https://github.com/Appadeia)
- **Packages**: Added support for `spm`. [**@Appadeia**](https://github.com/author=Appadeia)
- **Packages** [macOS]: Added detection of Nix [**@alyssais**](https://github.com/alyssais) - **Packages** [macOS]: Added detection of Nix [**@alyssais**](https://github.com/alyssais)
- **Packages**: Fixed packages from pkginfo (pkgutils) not appearing in CRUX/Janus Linux. - **Packages**: Fixed packages from pkginfo (pkgutils) not appearing in CRUX/Janus Linux.
- **Terminal Font**: Added support for Yakuake [**@plgruener**](https://github.com/plgruener) - **Terminal Font**: Added support for Yakuake [**@plgruener**](https://github.com/plgruener)
- **Terminal Font** [Kitty]: Use `kitty --debug-config` to get font information.
- **Memory** [Solaris]: Updated memory detection to use pages. [**@konimex**](https://github.com/konimex)
- **Model** [OpenBSD]: Added vmm (OpenBSD hypervisor) support [**@julianaito**](https://github.com/julianaito) - **Model** [OpenBSD]: Added vmm (OpenBSD hypervisor) support [**@julianaito**](https://github.com/julianaito)
- **Model** [macOS]: Added VirtualSMC as a new FakeSMC alternative for Hackintosh. [**@nikitenich**](https://github.com/nikitenich) - **Model** [macOS]: Added VirtualSMC as a new FakeSMC alternative for Hackintosh. [**@nikitenich**](https://github.com/nikitenich)
- **WM**: Added detection for FVWM. [**@julianaito**](https://github.com/julianaito) - **WM**: Added detection for FVWM. [**@julianaito**](https://github.com/julianaito)
- **WM** [OpenBSD]: Added a new `ps_flags` to correctly detect non-EWMH WMs. [**@julianaito**](https://github.com/julianaito) - **WM** [OpenBSD]: Added a new `ps_flags` to correctly detect non-EWMH WMs. [**@julianaito**](https://github.com/julianaito)
- **Disk** [OpenBSD]: Added a separate disk array creation using `awk` since one cannot directly use `/dev/...` unless being root or in the `operator` group. [**@julianaito**](https://github.com/julianaito) - **Disk** [OpenBSD]: Added a separate disk array creation using `awk` since one cannot directly use `/dev/...` unless being root or in the `operator` group. [**@julianaito**](https://github.com/julianaito)
- **Battery** [OpenBSD]: Improve charge `%` and add status. **Charlène**
- **GPU** [AMD]: Remove unnecessary check.
**ASCII** **ASCII**
- Added support for command output.
- `neofetch --ascii "$(fortune|cowsay -W 30)"`
- `neofetch --ascii "$(figlet -w 30 hello world)"`
- Added small ArcoLinux logo. [**@erikdubois**](https://github.com/erikdubois)
- Added new Lubuntu logo. [**@marlonn**](https://github.com/marlonn)
- Fixed a bug where ASCII logo changes the terminal foreground color. [**@plgruener**](https://github.com/plgruener) - Fixed a bug where ASCII logo changes the terminal foreground color. [**@plgruener**](https://github.com/plgruener)
- Fixed a bug when files named `auto` or `ascii` exist.
- Do not parse file as ASCII if the source is an image file. - Do not parse file as ASCII if the source is an image file.
**Image** **Image**
- **macOS**: Unset IFS to get window size. [**@StarryTony**](https://github.com/StarryTony) - **macOS**: Unset IFS to get window size. [**@StarryTony**](https://github.com/StarryTony)
- **Kitty**: Use `kitty +kitten icat` instead of the deprecated `kitty icat`. [**@HolyStephano**](https://github.com/HolyStephano) - **Kitty**: Use `kitty +kitten icat` instead of the deprecated `kitty icat`. [**@HolyStephano**](https://github.com/HolyStephano)
- **Kitty**: Update docs. [**@Snuggle**](https://github.com/dylanaraps/neofetch/commits?author=Snuggle)
- Cached thumbnails are now stored with PATH to prevent collision issues.
## [5.0.0] - 2018-06-18 ## [5.0.0] - 2018-06-18

382
neofetch
View File

@@ -28,7 +28,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
version="6.0.0" version="5.0.1"
bash_version="${BASH_VERSION/.*}" bash_version="${BASH_VERSION/.*}"
sys_locale="${LANG:-C}" sys_locale="${LANG:-C}"
@@ -76,13 +76,14 @@ print_info() {
# info "Battery" battery # info "Battery" battery
# info "Font" font # info "Font" font
# info "Song" song # info "Song" song
# [[ $player ]] && prin "Music Player" "$player"
# info "Local IP" local_ip # info "Local IP" local_ip
# info "Public IP" public_ip # info "Public IP" public_ip
# info "Users" users # info "Users" users
# info "Locale" locale # This only works on glibc systems. # info "Locale" locale # This only works on glibc systems.
info line_break
info cols info cols
info line_break
} }
@@ -142,21 +143,6 @@ os_arch="on"
uptime_shorthand="on" uptime_shorthand="on"
# Memory
# Show memory pecentage in output.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --memory_percent
#
# Example:
# on: '1801MiB / 7881MiB (22%)'
# off: '1801MiB / 7881MiB'
memory_percent="off"
# Packages # Packages
@@ -375,12 +361,6 @@ gtk3="on"
# Flag: --ip_host # Flag: --ip_host
public_ip_host="http://ident.me" public_ip_host="http://ident.me"
# Public IP timeout.
#
# Default: '2'
# Values: 'int'
# Flag: --ip_timeout
public_ip_timeout=2
# Disk # Disk
@@ -449,6 +429,7 @@ disk_subtitle="mount"
# exaile # exaile
# gnome-music # gnome-music
# gmusicbrowser # gmusicbrowser
# Google Play
# guayadeque # guayadeque
# iTunes # iTunes
# juk # juk
@@ -456,7 +437,6 @@ disk_subtitle="mount"
# mocp # mocp
# mopidy # mopidy
# mpd # mpd
# netease-cloud-music
# pogo # pogo
# pragha # pragha
# qmmp # qmmp
@@ -669,8 +649,7 @@ disk_display="off"
# Image backend. # Image backend.
# #
# Default: 'ascii' # Default: 'ascii'
# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off', # Values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
# 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
# Flag: --backend # Flag: --backend
image_backend="ascii" image_backend="ascii"
@@ -680,7 +659,6 @@ image_backend="ascii"
# #
# Default: 'auto' # Default: 'auto'
# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' # Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'
# Flag: --source # Flag: --source
# #
# NOTE: 'auto' will pick the best image source for whatever image backend is used. # NOTE: 'auto' will pick the best image source for whatever image backend is used.
@@ -849,12 +827,7 @@ get_distro() {
case "$os" in case "$os" in
"Linux" | "BSD" | "MINIX") "Linux" | "BSD" | "MINIX")
if [[ -f /bedrock/etc/bedrock-release && $PATH == */bedrock/cross/* ]]; then if [[ -f "/etc/redstar-release" ]]; then
case "$distro_shorthand" in
"on" | "tiny") distro="Bedrock Linux" ;;
*) distro="$(< /bedrock/etc/bedrock-release)"
esac
elif [[ -f "/etc/redstar-release" ]]; then
case "$distro_shorthand" in case "$distro_shorthand" in
"on" | "tiny") distro="Red Star OS" ;; "on" | "tiny") distro="Red Star OS" ;;
*) distro="Red Star OS $(awk -F'[^0-9*]' '$0=$2' /etc/redstar-release)" *) distro="Red Star OS $(awk -F'[^0-9*]' '$0=$2' /etc/redstar-release)"
@@ -925,6 +898,11 @@ get_distro() {
"tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;; "tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;;
"off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;; "off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;;
esac esac
# Workarounds for distros that go against the os-release standard.
[[ -z "${distro// }" ]] && distro="$(awk '/BLAG/ {print $1; exit}')" "${files[@]}"
[[ -z "${distro// }" ]] && distro="$(awk -F'=' '{print $2; exit}')" "${files[@]}"
else else
for release_file in /etc/*-release; do for release_file in /etc/*-release; do
distro+="$(< "$release_file")" distro+="$(< "$release_file")"
@@ -1292,14 +1270,10 @@ get_packages() {
pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; } pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; }
tot() { IFS=$'\n' read -d "" -ra pkgs < <("$@");((packages+="${#pkgs[@]}"));pac "${#pkgs[@]}"; } tot() { IFS=$'\n' read -d "" -ra pkgs < <("$@");((packages+="${#pkgs[@]}"));pac "${#pkgs[@]}"; }
# Redefine tot() for Bedrock Linux. [[ -f "/bedrock/etc/bedrock-release" && "$PATH" == */bedrock/cross/* ]] && \
[[ -f /bedrock/etc/bedrock-release && $PATH == */bedrock/cross/* ]] && {
tot() { tot() {
IFS=$'\n' read -d "" -ra pkgs < <(for s in $(brl list); do strat -r "$s" "$@"; done) IFS=$'\n' read -d "" -ra pkgs < <(for s in $(brl list); do strat -r "${s}" "$@"; done)
((packages+="${#pkgs[@]}")) ((packages+="${#pkgs[@]}")); pac "${#pkgs[@]}"
pac "${#pkgs[@]}"
}
br_prefix="/bedrock/strata/*"
} }
case "$os" in case "$os" in
@@ -1319,30 +1293,22 @@ get_packages() {
has "sorcery" && tot gaze installed has "sorcery" && tot gaze installed
has "alps" && tot alps showinstalled has "alps" && tot alps showinstalled
has "butch" && tot butch list has "butch" && tot butch list
has "pkginfo" && tot pkginfo -i
# Counting files/dirs. # Counting files/dirs.
# Variables need to be unquoted here. Only Bedrock Linux is affected. has "emerge" && dir /var/db/pkg/*/*/
# $br_prefix is fixed and won't change based on user input so this is safe either way. has "nix-env" && dir /nix/store/*/
# shellcheck disable=SC2086 has "guix" && dir /gnu/store/*/
{ has "Compile" && dir /Programs/*/
has "emerge" && dir ${br_prefix}/var/db/pkg/*/*/ has "eopkg" && dir /var/lib/eopkg/package/*
has "nix-env" && dir ${br_prefix}/nix/store/*/ has "crew" && dir /usr/local/etc/crew/meta/*.filelist
has "guix" && dir ${br_prefix}/gnu/store/*/ has "pkgtool" && dir /var/log/packages/*
has "Compile" && dir ${br_prefix}/Programs/*/ has "cave" && dir /var/db/paludis/repositories/cross-installed/*/data/*/ \
has "eopkg" && dir ${br_prefix}/var/lib/eopkg/package/* /var/db/paludis/repositories/installed/data/*/
has "crew" && dir ${br_prefix}/usr/local/etc/crew/meta/*.filelist
has "pkgtool" && dir ${br_prefix}/var/log/packages/*
has "cave" && dir ${br_prefix}/var/db/paludis/repositories/cross-installed/*/data/*/ \
${br_prefix}/var/db/paludis/repositories/installed/data/*/
}
# Other (Needs complex command) # Other (Needs complex command)
has "kpm-pkg" && ((packages+="$(kpm --get-selections | grep -cv deinstall$)")) has "kpm-pkg" && ((packages+="$(kpm --get-selections | grep -cv deinstall$)"))
# pkginfo is also the name of a python package manager which is painfully slow.
# TODO: Fix this somehow.
has pkginfo && tot pkginfo -i
case "$kernel_name" in case "$kernel_name" in
"FreeBSD") has "pkg" && tot pkg info ;; "FreeBSD") has "pkg" && tot pkg info ;;
*) *)
@@ -1381,9 +1347,6 @@ get_packages() {
"MSYS"*) has "pacman" && tot pacman -Qq --color never ;; "MSYS"*) has "pacman" && tot pacman -Qq --color never ;;
esac esac
# Scoop environment throws errors if `tot scoop list` is used
has "scoop" && dir ~/scoop/apps/* && ((packages-=1))
# Count chocolatey packages. # Count chocolatey packages.
[[ -d "/cygdrive/c/ProgramData/chocolatey/lib" ]] && \ [[ -d "/cygdrive/c/ProgramData/chocolatey/lib" ]] && \
dir /cygdrive/c/ProgramData/chocolatey/lib/* dir /cygdrive/c/ProgramData/chocolatey/lib/*
@@ -2313,8 +2276,8 @@ get_memory() {
"Solaris") "Solaris")
hw_pagesize="$(pagesize)" hw_pagesize="$(pagesize)"
pages_total="$(kstat -p unix:0:system_pages:pagestotal | awk '{print $2}')" pages_total=$(kstat -p unix:0:system_pages:pagestotal | awk '{print $2}')
pages_free="$(kstat -p unix:0:system_pages:pagesfree | awk '{print $2}')" pages_free=$(kstat -p unix:0:system_pages:pagesfree | awk '{print $2}')
mem_total="$((pages_total * hw_pagesize / 1024 / 1024))" mem_total="$((pages_total * hw_pagesize / 1024 / 1024))"
mem_free="$((pages_free * hw_pagesize / 1024 / 1024))" mem_free="$((pages_free * hw_pagesize / 1024 / 1024))"
mem_used="$((mem_total - mem_free))" mem_used="$((mem_total - mem_free))"
@@ -2354,10 +2317,7 @@ get_memory() {
;; ;;
esac esac
memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}"
[[ $memory_percent == on ]] && ((mem_perc=mem_used * 100 / mem_total))
memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB} ${mem_perc:+(${mem_perc}%)}"
# Bars. # Bars.
case "$memory_display" in case "$memory_display" in
@@ -2382,6 +2342,7 @@ get_song() {
"exaile" "exaile"
"gnome-music" "gnome-music"
"gmusicbrowser" "gmusicbrowser"
"Google Play"
"guayadeque" "guayadeque"
"iTunes" "iTunes"
"juk" "juk"
@@ -2389,7 +2350,6 @@ get_song() {
"mocp" "mocp"
"mopidy" "mopidy"
"mpd" "mpd"
"netease-cloud-music"
"pogo" "pogo"
"pragha" "pragha"
"qmmp" "qmmp"
@@ -2427,9 +2387,10 @@ get_song() {
case "${player/*\/}" in case "${player/*\/}" in
"mpd"*|"mopidy"*) song="$(mpc -f '%artist%\n%album%\n%title%' current "${mpc_args[@]}")" ;; "mpd"*|"mopidy"*) song="$(mpc -f '%artist%\n%album%\n%title%' current "${mpc_args[@]}")" ;;
"mocp"*) song="$(mocp -Q '%artist\n%album\n%song')" ;; "mocp"*) song="$(mocp -Q '%artist\n%album\n%song')" ;;
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist%\\n%album%\\n%title%')" ;; "google play"*) song="$(gpmdp-remote current)" ;;
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist%\n%album%\n%title%')" ;;
"xmms2d"*) song="$(xmms2 current -f "\${artist}"$'\n'"\${album}"$'\n'"\${title}")" ;; "xmms2d"*) song="$(xmms2 current -f "\${artist}"$'\n'"\${album}"$'\n'"\${title}")" ;;
"qmmp"*) song="$(qmmp --nowplaying '%p\\n%a\\n%t')" ;; "qmmp"*) song="$(qmmp --nowplaying '%p\n%a\n%t')" ;;
"gnome-music"*) get_song_dbus "GnomeMusic" ;; "gnome-music"*) get_song_dbus "GnomeMusic" ;;
"lollypop"*) get_song_dbus "Lollypop" ;; "lollypop"*) get_song_dbus "Lollypop" ;;
"clementine"*) get_song_dbus "clementine" ;; "clementine"*) get_song_dbus "clementine" ;;
@@ -2449,7 +2410,6 @@ get_song() {
"dragon"*) get_song_dbus "dragonplayer" ;; "dragon"*) get_song_dbus "dragonplayer" ;;
"smplayer"*) get_song_dbus "smplayer" ;; "smplayer"*) get_song_dbus "smplayer" ;;
"rhythmbox"*) get_song_dbus "rhythmbox" ;; "rhythmbox"*) get_song_dbus "rhythmbox" ;;
"netease-cloud-music"*) get_song_dbus "netease-cloud-music" ;;
"cmus"*) "cmus"*)
song="$(cmus-remote -Q | awk 'BEGIN { ORS=" "}; song="$(cmus-remote -Q | awk 'BEGIN { ORS=" "};
@@ -2510,28 +2470,22 @@ get_song() {
/"title"/ {t=$4} END {print a "\n" b "\n" t}')" /"title"/ {t=$4} END {print a "\n" b "\n" t}')"
;; ;;
*) mpc &>/dev/null && song="$(mpc -f '%artist%\n%album%\n%title%' current)" || return ;; *) mpc &>/dev/null && song="$(mpc -f '%artist%\n%album%\n%title%' current)" ;;
esac esac
IFS=$'\n' read -d "" -r artist album title <<< "${song//'\n'/$'\n'}" [[ "$song" != *[a-z]* ]] && { unset -v song; return; }
# Make sure empty tags are truly empty. IFS=$'\n' read -d "" -r artist album title <<< "$song"
artist="$(trim "$artist")"
album="$(trim "$album")"
title="$(trim "$title")"
# Set default values if no tags were found.
: "${artist:=Unknown Artist}" "${album:=Unknown Album}" "${title:=Unknown Song}"
# Display Artist, Album and Title on separate lines. # Display Artist, Album and Title on separate lines.
if [[ "$song_shorthand" == "on" ]]; then if [[ "$song_shorthand" == "on" ]]; then
prin "Artist" "$artist" [[ "$(trim "$artist")" ]] && prin "Artist" "$artist"
prin "Album" "$album" [[ "$(trim "$album")" ]] && prin "Album" "$album"
prin "Song" "$title" [[ "$(trim "$song")" ]] && prin "Song" "$title"
else else
song="${song_format/\%artist\%/$artist}" song="${song_format/\%artist\%/${artist}}"
song="${song/\%album\%/$album}" song="${song/\%album\%/${album}}"
song="${song/\%title\%/$title}" song="${song/\%title\%/${title}}"
fi fi
} }
@@ -2618,7 +2572,6 @@ get_resolution() {
esac esac
resolution="${resolution%,*}" resolution="${resolution%,*}"
[[ -z ${resolution/x} ]] && resolution=
} }
get_style() { get_style() {
@@ -2920,11 +2873,21 @@ END
;; ;;
"kitty"*) "kitty"*)
kitty_config="$(kitty --debug-config)" shopt -s nullglob
term_font_size="${kitty_config/*font_size}" confs=({$KITTY_CONFIG_DIRECTORY,$XDG_CONFIG_HOME,~/Library/Preferences}/kitty/kitty.con?)
term_font_size="${term_font_size/$'\n'*}" shopt -u nullglob
term_font="${kitty_config/*font_family}"
term_font="${term_font/$'\n'*} $term_font_size" [[ -f "${confs[0]}" ]] || return
term_font="$(awk '/^([[:space:]]*|[^#_])font_family[[:space:]]+/ {
$1 = "";
gsub(/^[[:space:]]/, "");
font = $0
}
/^([[:space:]]*|[^#_])font_size[[:space:]]+/ {
size = $2
}
END {print font,size}' "${confs[0]}")"
;; ;;
"konsole" | "yakuake") "konsole" | "yakuake")
@@ -3315,11 +3278,11 @@ get_public_ip() {
fi fi
if [[ -z "$public_ip" ]] && type -p curl >/dev/null; then if [[ -z "$public_ip" ]] && type -p curl >/dev/null; then
public_ip="$(curl --max-time "$public_ip_timeout" -w '\n' "$public_ip_host")" public_ip="$(curl --max-time 10 -w '\n' "$public_ip_host")"
fi fi
if [[ -z "$public_ip" ]] && type -p wget >/dev/null; then if [[ -z "$public_ip" ]] && type -p wget >/dev/null; then
public_ip="$(wget -T "$public_ip_timeout" -qO- "$public_ip_host")" public_ip="$(wget -T 10 -qO- "$public_ip_host")"
fi fi
} }
@@ -3345,7 +3308,6 @@ get_gpu_driver() {
gpu_driver="NVIDIA ${gpu_driver/ *}" gpu_driver="NVIDIA ${gpu_driver/ *}"
fi fi
;; ;;
"Mac OS X") "Mac OS X")
if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then
gpu_driver="NVIDIA Web Driver" gpu_driver="NVIDIA Web Driver"
@@ -3388,9 +3350,9 @@ get_cols() {
cols="${cols//nl/\\n\\e[${text_padding}C${zws}}" cols="${cols//nl/\\n\\e[${text_padding}C${zws}}"
# Add block height to info height. # Add block height to info height.
((info_height+=block_range[1]>7?block_height+3:block_height+2)) ((info_height+=block_height-1))
printf '\n\e[%bC%b\n\n' "$text_padding" "${zws}${cols}" printf '\e[%bC%b' "$text_padding" "${zws}${cols}"
fi fi
unset -v blocks blocks2 cols unset -v blocks blocks2 cols
@@ -3413,7 +3375,7 @@ image_backend() {
"ascii") get_ascii ;; "ascii") get_ascii ;;
"off") image_backend="off" ;; "off") image_backend="off" ;;
"caca" | "chafa" | "jp2a" | "iterm2" | "termpix" |\ "caca" | "jp2a" | "iterm2" | "termpix" |\
"tycat" | "w3m" | "sixel" | "pixterm" | "kitty") "tycat" | "w3m" | "sixel" | "pixterm" | "kitty")
get_image_source get_image_source
@@ -3438,7 +3400,7 @@ image_backend() {
*) *)
err "Image: Unknown image backend specified '$image_backend'." err "Image: Unknown image backend specified '$image_backend'."
err "Image: Valid backends are: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'kitty', err "Image: Valid backends are: 'ascii', 'caca', 'jp2a', 'iterm2', 'kitty',
'off', 'sixel', 'pixterm', 'termpix', 'tycat', 'w3m')" 'off', 'sixel', 'pixterm', 'termpix', 'tycat', 'w3m')"
err "Image: Falling back to ascii mode." err "Image: Falling back to ascii mode."
get_ascii get_ascii
@@ -3450,11 +3412,10 @@ image_backend() {
} }
get_ascii() { get_ascii() {
[[ ! "$image_source" =~ (ascii|auto) ]] &&
if [[ -f "$image_source" && ! "$image_source" =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then if [[ -f "$image_source" && ! "$image_source" =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then
ascii_data="$(< "$image_source")" ascii_data="$(< "$image_source")"
else else
ascii_data="$image_source" err "Ascii: Ascii file not found, using distro ascii."
fi fi
# Set locale to get correct padding. # Set locale to get correct padding.
@@ -3462,13 +3423,9 @@ get_ascii() {
# Calculate size of ascii file in line length / line count. # Calculate size of ascii file in line length / line count.
while IFS=$'\n' read -r line; do while IFS=$'\n' read -r line; do
line="${line//\\\\/\\}" ((++lines,${#line}>ascii_length)) && ascii_length="${#line}"
((++lines,${#line}>ascii_len)) && ascii_len="${#line}"
done <<< "${ascii_data//\$\{??\}}" done <<< "${ascii_data//\$\{??\}}"
# Fallback if file not found.
((lines==1)) && { lines=; ascii_len=; image_source="auto"; get_distro_ascii; get_ascii; return; }
# Colors. # Colors.
ascii_data="${ascii_data//\$\{c1\}/$c1}" ascii_data="${ascii_data//\$\{c1\}/$c1}"
ascii_data="${ascii_data//\$\{c2\}/$c2}" ascii_data="${ascii_data//\$\{c2\}/$c2}"
@@ -3477,7 +3434,7 @@ get_ascii() {
ascii_data="${ascii_data//\$\{c5\}/$c5}" ascii_data="${ascii_data//\$\{c5\}/$c5}"
ascii_data="${ascii_data//\$\{c6\}/$c6}" ascii_data="${ascii_data//\$\{c6\}/$c6}"
((text_padding=ascii_len+gap)) ((text_padding=ascii_length+gap))
printf '%b\n' "$ascii_data${reset}" printf '%b\n' "$ascii_data${reset}"
LC_ALL=C LC_ALL=C
} }
@@ -3726,18 +3683,15 @@ get_image_size() {
*) image_size="${image_size/px}" ;; *) image_size="${image_size/px}" ;;
esac esac
# Check for terminal padding.
[[ $image_backend == w3m ]] && term_padding
width="${width:-$image_size}" width="${width:-$image_size}"
height="${height:-$image_size}" height="${height:-$image_size}"
text_padding="$(((width + padding + xoffset) / font_width + gap))" text_padding="$((width / font_width + gap + xoffset/font_width))"
} }
make_thumbnail() { make_thumbnail() {
# Name the thumbnail using variables so we can # Name the thumbnail using variables so we can
# use it later. # use it later.
image_name="${crop_mode}-${crop_offset}-${width}-${height}-${image//\/}" image_name="${crop_mode}-${crop_offset}-${width}-${height}-${image##*/}"
# Handle file extensions. # Handle file extensions.
case "${image##*.}" in case "${image##*.}" in
@@ -3792,9 +3746,11 @@ make_thumbnail() {
-background none \ -background none \
"$image" \ "$image" \
-strip \ -strip \
-define "jpeg:size=100x100" \
-gravity "$crop_offset" \ -gravity "$crop_offset" \
-crop "${size}x${size}+0+0" \ -crop "${size}x${size}+0+0" \
-scale "${width}x${height}" \ -quality 40 \
-sample "${width}x${height}" \
"${thumbnail_dir}/${image_name}" "${thumbnail_dir}/${image_name}"
;; ;;
esac esac
@@ -3808,21 +3764,17 @@ display_image() {
case "$image_backend" in case "$image_backend" in
"caca") "caca")
img2txt \ img2txt \
-W "$((width / font_width))" \ -W "$((width / font_width)))" \
-H "$((height / font_height))" \ -H "$((height / font_height))" \
--gamma=0.6 \ --gamma=0.6 \
"$image" "$image"
;; ;;
"chafa")
chafa --size="$((width / font_width))x$((height / font_height))" "$image"
;;
"jp2a") "jp2a")
jp2a \ jp2a \
--colors \
--width="$((width / font_width))" \ --width="$((width / font_width))" \
--height="$((height / font_height))" \ --height="$((height / font_height))" \
--colors \
"$image" "$image"
;; ;;
@@ -3876,7 +3828,7 @@ display_image() {
# Add a tiny delay to fix issues with images not # Add a tiny delay to fix issues with images not
# appearing in specific terminal emulators. # appearing in specific terminal emulators.
((BASH_VERSINFO[0]>3)) && sleep 0.05 sleep 0.05
printf '%b\n%s;\n%s\n' "0;1;$xoffset;$yoffset;$width;$height;;;;;$image" 3 4 |\ printf '%b\n%s;\n%s\n' "0;1;$xoffset;$yoffset;$width;$height;;;;;$image" 3 4 |\
"${w3m_img_path:-false}" -bg "$background_color" &>/dev/null "${w3m_img_path:-false}" -bg "$background_color" &>/dev/null
;; ;;
@@ -3953,7 +3905,7 @@ prin() {
string="${subtitle_color}${bold}${string}" string="${subtitle_color}${bold}${string}"
# Print the info. # Print the info.
printf '%b\n' "${text_padding:+\e[${text_padding}C}${zws}${string//\\n}${reset} " printf '%b\n' "${text_padding:+\e[${text_padding}C}${zws}${string}${reset} "
# Calculate info height. # Calculate info height.
((++info_height)) ((++info_height))
@@ -3974,6 +3926,17 @@ get_underline() {
prin=1 prin=1
} }
get_line_break() {
# Print it directly.
printf '%b\n' "$zws"
# Calculate info height.
((++info_height))
# Tell info() that we printed manually.
prin=1
}
get_bold() { get_bold() {
case "$ascii_bold" in case "$ascii_bold" in
"on") ascii_bold='\e[1m' ;; "on") ascii_bold='\e[1m' ;;
@@ -4073,9 +4036,18 @@ color() {
stdout() { stdout() {
image_backend="off" image_backend="off"
unset subtitle_color colon_color info_color underline_color bold title_color at_color \ unset subtitle_color
text_padding zws reset color_blocks bar_color_elapsed bar_color_total \ unset colon_color
c1 c2 c3 c4 c5 c6 c7 c8 unset info_color
unset underline_color
unset bold
unset title_color
unset at_color
unset text_padding
unset zws
unset reset
unset color_blocks
unset get_line_break
} }
err() { err() {
@@ -4194,23 +4166,9 @@ kde_config_dir() {
kde_config_dir="${kde_config_dir/$'/:'*}" kde_config_dir="${kde_config_dir/$'/:'*}"
} }
term_padding() {
# Get terminal padding to properly align cursor.
[[ -z $term ]] && get_term
case "$term" in
urxvt*|"rxvt-unicode")
[[ -z "$xrdb" ]] && xrdb="$(xrdb -query)"
padding="${xrdb/*.internalBorder:}"
((padding=${padding/$'\n'*}))
;;
esac
}
dynamic_prompt() { dynamic_prompt() {
[[ $image_backend == off ]] && { printf '\n'; return; } [[ "$image_backend" == "off" ]] && { printf '\n'; return; }
[[ $image_backend != ascii ]] && ((lines=(height + yoffset) / font_height + 1)) [[ "$image_backend" != "ascii" ]] && lines="$(((height + yoffset) / font_height + 1))"
[[ $image_backend == w3m ]] && ((lines=lines + padding / font_height + 1))
# If the ascii art is taller than the info. # If the ascii art is taller than the info.
((lines=lines>info_height?lines-info_height+1:1)) ((lines=lines>info_height?lines-info_height+1:1))
@@ -4287,7 +4245,7 @@ decode_url() {
# FINISH UP # FINISH UP
usage() { printf "%s" "\ usage() { printf "%s" "\
Usage: neofetch func_name --option \"value\" --option \"value\" Usage: neofetch --option \"value\" --option \"value\"
Neofetch is a CLI system information tool written in BASH. Neofetch Neofetch is a CLI system information tool written in BASH. Neofetch
displays information about your system next to an image, your OS logo, displays information about your system next to an image, your OS logo,
@@ -4298,23 +4256,6 @@ NOTE: Every launch flag has a config option.
Options: Options:
INFO: 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: neofetch uptime disk wm memory
This can be used in bars and scripts like so:
memory=\"\$(neofetch memory)\"; memory=\"\${memory##*: }\"
For multiple outputs at once (each line of info in an array):
IFS=\$'\\n' read -d \"\" -ra info < <(neofetch memory uptime wm)
info=(\"\${info[@]##*: }\")
--disable infoname Allows you to disable an info line from appearing --disable infoname Allows you to disable an info line from appearing
in the output. 'infoname' is the function name from the in the output. 'infoname' is the function name from the
'print_info()' function inside the config file. 'print_info()' function inside the config file.
@@ -4385,10 +4326,8 @@ INFO:
'dir' shows the basename of the disks's path. (/, Local Disk, etc) 'dir' shows the basename of the disks's path. (/, Local Disk, etc)
--ip_host url URL to query for public IP --ip_host url URL to query for public IP
--ip_timeout int Public IP timeout (in seconds).
--song_format format Print the song data in a specific format (see config file). --song_format format Print the song data in a specific format (see config file).
--song_shorthand on/off Print the Artist/Album/Title on separate lines. --song_shorthand on/off Print the Artist/Album/Title on separate lines.
--memory_percent on/off Display memory percentage.
--music_player player-name Manually specify a player to use. --music_player player-name Manually specify a player to use.
Available values are listed in the config file Available values are listed in the config file
@@ -4424,18 +4363,13 @@ BARS:
IMAGE BACKEND: IMAGE BACKEND:
--backend backend Which image backend to use. --backend backend Which image backend to use.
Possible values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', Possible values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off',
'off', 'sixel', 'tycat', 'w3m' 'sixel', 'tycat', 'w3m'
--source source Which image or ascii file to use. --source source Which image or ascii file to use.
Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img',
'/path/to/ascii', '/path/to/dir/', 'command output' [ascii] '/path/to/ascii', '/path/to/dir/'
--ascii source Shortcut to use 'ascii' backend. --ascii source Shortcut to use 'ascii' backend.
NEW: neofetch --ascii \"\$(fortune | cowsay -W 30)\"
--caca source Shortcut to use 'caca' backend. --caca source Shortcut to use 'caca' backend.
--chafa source Shortcut to use 'chafa' backend.
--iterm2 source Shortcut to use 'iterm2' backend. --iterm2 source Shortcut to use 'iterm2' backend.
--jp2a source Shortcut to use 'jp2a' backend. --jp2a source Shortcut to use 'jp2a' backend.
--kitty source Shortcut to use 'kitty' backend. --kitty source Shortcut to use 'kitty' backend.
@@ -4540,11 +4474,9 @@ get_args() {
"--shell_path") shell_path="$2" ;; "--shell_path") shell_path="$2" ;;
"--shell_version") shell_version="$2" ;; "--shell_version") shell_version="$2" ;;
"--ip_host") public_ip_host="$2" ;; "--ip_host") public_ip_host="$2" ;;
"--ip_timeout") public_ip_timeout="$2" ;;
"--song_format") song_format="$2" ;; "--song_format") song_format="$2" ;;
"--song_shorthand") song_shorthand="$2" ;; "--song_shorthand") song_shorthand="$2" ;;
"--music_player") music_player="$2" ;; "--music_player") music_player="$2" ;;
"--memory_percent") memory_percent="$2" ;;
"--cpu_temp") "--cpu_temp")
cpu_temp="$2" cpu_temp="$2"
[[ "$cpu_temp" == "on" ]] && cpu_temp="C" [[ "$cpu_temp" == "on" ]] && cpu_temp="C"
@@ -4620,7 +4552,7 @@ get_args() {
# Image backend # Image backend
"--backend") image_backend="$2" ;; "--backend") image_backend="$2" ;;
"--source") image_source="$2" ;; "--source") image_source="$2" ;;
"--ascii" | "--caca" | "--chafa" | "--jp2a" | "--iterm2" | "--off" | "--pixterm" |\ "--ascii" | "--caca" | "--jp2a" | "--iterm2" | "--off" | "--pixterm" |\
"--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty") "--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty")
image_backend="${1/--}" image_backend="${1/--}"
case "$2" in case "$2" in
@@ -4659,12 +4591,13 @@ get_args() {
"--ascii_distro") "--ascii_distro")
image_backend="ascii" image_backend="ascii"
ascii_distro="$2" ascii_distro="$2"
case "$2" in "-"* | "") ascii_distro="$distro" ;; esac
;; ;;
"--ascii_bold") ascii_bold="$2" ;; "--ascii_bold") ascii_bold="$2" ;;
"--logo" | "-L") "--logo" | "-L")
image_backend="ascii" image_backend="ascii"
print_info() { printf '\n'; } print_info() { info line_break; }
;; ;;
# Other # Other
@@ -4694,7 +4627,7 @@ get_args() {
"--json") "--json")
json="on" json="on"
unset -f get_title get_cols get_underline unset -f get_title get_cols get_line_break get_underline
printf '{\n' printf '{\n'
print_info 2>/dev/null print_info 2>/dev/null
@@ -4736,7 +4669,9 @@ get_args() {
info "Public IP" public_ip info "Public IP" public_ip
info "Users" users info "Users" users
info line_break
info cols info cols
info line_break
# Testing. # Testing.
prin "prin" prin "prin"
@@ -4764,24 +4699,6 @@ get_args() {
done done
} }
get_simple() {
while [[ "$1" ]]; do
[[ $(type -t "get_$1") == function ]] && {
get_distro
stdout
simple=1
info "$1" "$1"
}
shift
done
((simple)) && exit
}
old_functions() {
# Removed functions for backwards compatability.
get_line_break() { :; }
}
get_distro_ascii() { get_distro_ascii() {
# This function gets the distro ascii art and colors. # This function gets the distro ascii art and colors.
# #
@@ -5280,29 +5197,6 @@ ${c1}:syyyyyy/ :yyyyyy/${c2}-yyo.:syyyyyyyyyyy
EOF EOF
;; ;;
"Bedrock"*)
set_colors 8 7
read -rd '' ascii_data <<'EOF'
${c1}--------------------------------------
--------------------------------------
--------------------------------------
---${c2}\\\\\\\\\\\\\\\\\\\\\\\\${c1}-----------------------
----${c2}\\\\\\ \\\\\\${c1}----------------------
-----${c2}\\\\\\ \\\\\\${c1}---------------------
------${c2}\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\${c1}------
-------${c2}\\\\\\ \\\\\\${c1}-----
--------${c2}\\\\\\ \\\\\\${c1}----
---------${c2}\\\\\\ ______ \\\\\\${c1}---
----------${c2}\\\\\\ ///${c1}---
-----------${c2}\\\\\\ ///${c1}----
------------${c2}\\\\\\ ///${c1}-----
-------------${c2}\\\\\\////////////////${c1}------
--------------------------------------
--------------------------------------
--------------------------------------
EOF
;;
"Bitrig"*) "Bitrig"*)
set_colors 2 7 set_colors 2 7
read -rd '' ascii_data <<'EOF' read -rd '' ascii_data <<'EOF'
@@ -6174,33 +6068,6 @@ yM${c2}MNNNNNNNmmmmmNNMmhs+/${c1}-`
EOF EOF
;; ;;
"Pentoo"*)
set_colors 5 7
read -rd '' ascii_data <<'EOF'
${c2} `:oydNNMMMMNNdyo:`
:yNMMMMMMMMMMMMMMMMNy:
:dMMMMMMMMMMMMMMMMMMMMMMd:
oMMMMMMMho/-....-/ohMMMMMMMo
oMMMMMMy. .yMMMMMMo
.MMMMMMo oMMMMMM.
+MMMMMm mMMMMM+
oMMMMMh hMMMMMo
//hMMMMMm//${c1}`${c2} ${c1}`${c2}////mMMMMMh//
MMMMMMMMMMM${c1}/${c2} ${c1}/o/`${c2} ${c1}.${c2}smMMMMMMMMMMM
MMMMMMMMMMm ${c1}`NMN:${c2} ${c1}.${c2}yMMMMMMMMMM
MMMMMMMMMMMh${c1}:.${c2} dMMMMMMMMM
MMMMMMMMMMMMMy${c1}.${c2} ${c1}-${c2}NMMMMMMMMM
MMMMMMMMMMMd:${c1}`${c2} ${c1}-${c2}yNMMMMMMMMMM
MMMMMMMMMMh${c1}`${c2} ${c1}./${c2}hNMMMMMMMMMMMM
MMMMMMMMMM${c1}s${c2} ${c1}.:${c2}ymMMMMMMMMMMMMMMM
MMMMMMMMMMN${c1}s:..-/${c2}ohNMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
EOF
;;
"gNewSense"*) "gNewSense"*)
set_colors 4 5 7 6 set_colors 4 5 7 6
read -rd '' ascii_data <<'EOF' read -rd '' ascii_data <<'EOF'
@@ -6318,29 +6185,6 @@ ${c2} :dc'
EOF EOF
;; ;;
"Huayra"*)
set_colors 4 7
read -rd '' ascii_data <<'EOF'
${c2} `
. . `
`` - . .
`.` -` `. - `` .`
..`-`-` + - / .` ```
.--.+--`+:- :/.` .-``.`
-+/so::h:.d-`./:`.`
:hNhyMomy:os-...-. ````
.dhsshNmNhoo+:-``.```
${c1}`ohy:-${c2}NMds+::-.``
````${c1}.hNN+`${c2}mMNho/:-....````
````` `../dmNhoo+/:..``
```` .dh++o/:....`
.+s/` `/s-.-.:.`` ````
::` `::`..`
.` `..
``
EOF
;;
"Hyperbola"*) "Hyperbola"*)
set_colors 8 set_colors 8
read -rd '' ascii_data <<'EOF' read -rd '' ascii_data <<'EOF'
@@ -8522,12 +8366,12 @@ EOF
set_colors 2 8 set_colors 2 8
read -rd '' ascii_data <<'EOF' read -rd '' ascii_data <<'EOF'
${c1} _______ ${c1} _______
_ \\______ - _ \______ -
| \\ ___ \\ | | \ ___ \ |
| | / \ | | | | / \ | |
| | \___/ | | | | \___/ | |
| \\______ \\_| | \______ \_|
-_______\\ -_______\
EOF EOF
;; ;;
@@ -8802,7 +8646,6 @@ main() {
eval "$config" eval "$config"
get_args "$@" get_args "$@"
get_simple "$@"
[[ "$verbose" != "on" ]] && exec 2>/dev/null [[ "$verbose" != "on" ]] && exec 2>/dev/null
get_distro get_distro
get_bold get_bold
@@ -8820,7 +8663,6 @@ main() {
image_backend image_backend
get_cache_dir get_cache_dir
old_functions
print_info print_info
dynamic_prompt dynamic_prompt

View File

@@ -1,10 +1,10 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.7.
.TH NEOFETCH "1" "January 2019" "Neofetch 6.0.0" "User Commands" .TH NEOFETCH "1" "October 2018" "Neofetch 5.0.1" "User Commands"
.SH NAME .SH NAME
Neofetch \- A fast, highly customizable system info script Neofetch \- A fast, highly customizable system info script
.SH SYNOPSIS .SH SYNOPSIS
.B neofetch .B neofetch
\fI\,func_name --option "value" --option "value"\/\fR \fI\,--option "value" --option "value"\/\fR
.SH DESCRIPTION .SH DESCRIPTION
Neofetch is a CLI system information tool written in BASH. Neofetch Neofetch is a CLI system information tool written in BASH. Neofetch
displays information about your system next to an image, your OS logo, displays information about your system next to an image, your OS logo,
@@ -14,24 +14,6 @@ NOTE: Every launch flag has a config option.
.SH OPTIONS .SH OPTIONS
.SS "INFO:" .SS "INFO:"
.TP .TP
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
.IP
Example: neofetch uptime disk wm memory
.IP
This can be used in bars and scripts like so:
.IP
memory="$(neofetch 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)
.IP
info=("${info[@]##*: }")
.TP
\fB\-\-disable\fR infoname \fB\-\-disable\fR infoname
Allows you to disable an info line from appearing Allows you to disable an info line from appearing
in the output. 'infoname' is the function name from the in the output. 'infoname' is the function name from the
@@ -138,18 +120,12 @@ Takes: name, mount, dir
\fB\-\-ip_host\fR url \fB\-\-ip_host\fR url
URL to query for public IP URL to query for public IP
.TP .TP
\fB\-\-ip_timeout\fR int
Public IP timeout (in seconds).
.TP
\fB\-\-song_format\fR format \fB\-\-song_format\fR format
Print the song data in a specific format (see config file). Print the song data in a specific format (see config file).
.TP .TP
\fB\-\-song_shorthand\fR on/off \fB\-\-song_shorthand\fR on/off
Print the Artist/Album/Title on separate lines. Print the Artist/Album/Title on separate lines.
.TP .TP
\fB\-\-memory_percent\fR on/off
Display memory percentage.
.TP
\fB\-\-music_player\fR player\-name \fB\-\-music_player\fR player\-name
Manually specify a player to use. Manually specify a player to use.
Available values are listed in the config file Available values are listed in the config file
@@ -217,25 +193,20 @@ Possible values: bar, infobar, barinfo, off
.TP .TP
\fB\-\-backend\fR backend \fB\-\-backend\fR backend
Which image backend to use. Which image backend to use.
Possible values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', Possible values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off',
\&'off', 'sixel', 'tycat', 'w3m' \&'sixel', 'tycat', 'w3m'
.TP .TP
\fB\-\-source\fR source \fB\-\-source\fR source
Which image or ascii file to use. Which image or ascii file to use.
Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img',
\&'/path/to/ascii', '/path/to/dir/', 'command output' [ascii] \&'/path/to/ascii', '/path/to/dir/'
.TP .TP
\fB\-\-ascii\fR source \fB\-\-ascii\fR source
Shortcut to use 'ascii' backend. Shortcut to use 'ascii' backend.
.IP
NEW: neofetch \fB\-\-ascii\fR "$(fortune | cowsay \fB\-W\fR 30)"
.TP .TP
\fB\-\-caca\fR source \fB\-\-caca\fR source
Shortcut to use 'caca' backend. Shortcut to use 'caca' backend.
.TP .TP
\fB\-\-chafa\fR source
Shortcut to use 'chafa' backend.
.TP
\fB\-\-iterm2\fR source \fB\-\-iterm2\fR source
Shortcut to use 'iterm2' backend. Shortcut to use 'iterm2' backend.
.TP .TP