mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 01:00:17 +00:00
Compare commits
66 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c9d6ef5c40 | ||
|
c6bd0461a0 | ||
|
c1da5eb09a | ||
|
12d9f93750 | ||
|
32a44b4d62 | ||
|
e2e98a6c7c | ||
|
c76c122650 | ||
|
eaa59da1e9 | ||
|
056a99bfa2 | ||
|
074323f0ed | ||
|
f24fed6df3 | ||
|
86372fe6a8 | ||
|
4f89361e50 | ||
|
653712c06a | ||
|
de5a260f6b | ||
|
617769059b | ||
|
4d6a4fb425 | ||
|
85a1bd0af7 | ||
|
5316b568e7 | ||
|
7677cd2b4b | ||
|
3a0e2ec68c | ||
|
62ada359fc | ||
|
ad2727620c | ||
|
ccabbbe678 | ||
|
1f8b18d7ca | ||
|
804f88aa7a | ||
|
041a1459b6 | ||
|
594e1fa10d | ||
|
fbb69625a7 | ||
|
a450fc88c5 | ||
|
d36ee68f2c | ||
|
e155df7a72 | ||
|
679aa306fb | ||
|
04420479dc | ||
|
8aab756a15 | ||
|
af6230f0ca | ||
|
7e96b42860 | ||
|
ea44816a3c | ||
|
981b2da634 | ||
|
1b67413d49 | ||
|
c99b864590 | ||
|
b399f49077 | ||
|
defee48d14 | ||
|
4fb30c040a | ||
|
1b356da175 | ||
|
a52115b364 | ||
|
e213ee7e58 | ||
|
ee30f29da9 | ||
|
763f3a9af5 | ||
|
bbb06ad4a9 | ||
|
faae04f0ee | ||
|
186093ddc0 | ||
|
ae2384dca8 | ||
|
9b2796e168 | ||
|
c29ecc3fae | ||
|
6f6b67f387 | ||
|
c47826225e | ||
|
17a56081a5 | ||
|
27258fb93c | ||
|
86711645a0 | ||
|
8a96fd545d | ||
|
6c966b05ae | ||
|
45d632d1f6 | ||
|
cc1be73077 | ||
|
c8a32768b7 | ||
|
acdd6828f8 |
@@ -18,6 +18,6 @@ install:
|
||||
|
||||
script:
|
||||
- time ./neofetch --travis -v
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck neofetch; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck -e SC2244 -e SC2243 neofetch; fi
|
||||
# Check for lines longer than 100 chars.
|
||||
- if grep '.\{102\}' neofetch; then (exit 1); else (exit 0); fi
|
||||
|
83
CHANGELOG.md
83
CHANGELOG.md
@@ -7,37 +7,106 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
<img src="https://i.imgur.com/ZQI2EYz.png" alt="logo" height="100px">
|
||||
|
||||
**Contributors**
|
||||
|
||||
- [**@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)
|
||||
[**@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)
|
||||
|
||||
**OS**
|
||||
|
||||
- Added support for Bedrock Linux. [**@paradigm**](https://github.com/paradigm)
|
||||
- Added support for Namib GNU/Linux. [**@arisinfenix**](https://github.com/arisinfenix)
|
||||
- Added support for Reborn OS. [**@iandrewt**](https://github.com/iandrewt)
|
||||
- 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**
|
||||
|
||||
- **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)
|
||||
- **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**: Fixed packages from pkginfo (pkgutils) not appearing in CRUX/Janus Linux.
|
||||
- **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** [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** [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)
|
||||
- **Battery** [OpenBSD]: Improve charge `%` and add status. **Charlène**
|
||||
- **GPU** [AMD]: Remove unnecessary check.
|
||||
|
||||
**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 when files named `auto` or `ascii` exist.
|
||||
- Do not parse file as ASCII if the source is an image file.
|
||||
|
||||
**Image**
|
||||
|
||||
- **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**: 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
|
||||
|
||||
|
396
neofetch
396
neofetch
@@ -28,7 +28,7 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
version="5.0.1"
|
||||
version="6.0.0"
|
||||
|
||||
bash_version="${BASH_VERSION/.*}"
|
||||
sys_locale="${LANG:-C}"
|
||||
@@ -76,14 +76,13 @@ print_info() {
|
||||
# info "Battery" battery
|
||||
# info "Font" font
|
||||
# info "Song" song
|
||||
# [[ $player ]] && prin "Music Player" "$player"
|
||||
# info "Local IP" local_ip
|
||||
# info "Public IP" public_ip
|
||||
# info "Users" users
|
||||
# info "Locale" locale # This only works on glibc systems.
|
||||
|
||||
info line_break
|
||||
info cols
|
||||
info line_break
|
||||
}
|
||||
|
||||
|
||||
@@ -143,6 +142,21 @@ os_arch="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
|
||||
|
||||
|
||||
@@ -361,6 +375,12 @@ gtk3="on"
|
||||
# Flag: --ip_host
|
||||
public_ip_host="http://ident.me"
|
||||
|
||||
# Public IP timeout.
|
||||
#
|
||||
# Default: '2'
|
||||
# Values: 'int'
|
||||
# Flag: --ip_timeout
|
||||
public_ip_timeout=2
|
||||
|
||||
|
||||
# Disk
|
||||
@@ -429,7 +449,6 @@ disk_subtitle="mount"
|
||||
# exaile
|
||||
# gnome-music
|
||||
# gmusicbrowser
|
||||
# Google Play
|
||||
# guayadeque
|
||||
# iTunes
|
||||
# juk
|
||||
@@ -437,6 +456,7 @@ disk_subtitle="mount"
|
||||
# mocp
|
||||
# mopidy
|
||||
# mpd
|
||||
# netease-cloud-music
|
||||
# pogo
|
||||
# pragha
|
||||
# qmmp
|
||||
@@ -649,7 +669,8 @@ disk_display="off"
|
||||
# Image backend.
|
||||
#
|
||||
# Default: 'ascii'
|
||||
# Values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
|
||||
# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
|
||||
# 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
|
||||
# Flag: --backend
|
||||
image_backend="ascii"
|
||||
|
||||
@@ -659,6 +680,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)")'
|
||||
# Flag: --source
|
||||
#
|
||||
# NOTE: 'auto' will pick the best image source for whatever image backend is used.
|
||||
@@ -827,7 +849,12 @@ get_distro() {
|
||||
|
||||
case "$os" in
|
||||
"Linux" | "BSD" | "MINIX")
|
||||
if [[ -f "/etc/redstar-release" ]]; then
|
||||
if [[ -f /bedrock/etc/bedrock-release && $PATH == */bedrock/cross/* ]]; 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
|
||||
"on" | "tiny") distro="Red Star OS" ;;
|
||||
*) distro="Red Star OS $(awk -F'[^0-9*]' '$0=$2' /etc/redstar-release)"
|
||||
@@ -898,11 +925,6 @@ get_distro() {
|
||||
"tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;;
|
||||
"off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;;
|
||||
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
|
||||
for release_file in /etc/*-release; do
|
||||
distro+="$(< "$release_file")"
|
||||
@@ -1270,6 +1292,16 @@ get_packages() {
|
||||
pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; }
|
||||
tot() { IFS=$'\n' read -d "" -ra pkgs < <("$@");((packages+="${#pkgs[@]}"));pac "${#pkgs[@]}"; }
|
||||
|
||||
# Redefine tot() for Bedrock Linux.
|
||||
[[ -f /bedrock/etc/bedrock-release && $PATH == */bedrock/cross/* ]] && {
|
||||
tot() {
|
||||
IFS=$'\n' read -d "" -ra pkgs < <(for s in $(brl list); do strat -r "$s" "$@"; done)
|
||||
((packages+="${#pkgs[@]}"))
|
||||
pac "${#pkgs[@]}"
|
||||
}
|
||||
br_prefix="/bedrock/strata/*"
|
||||
}
|
||||
|
||||
case "$os" in
|
||||
"Linux" | "BSD" | "iPhone OS" | "Solaris")
|
||||
# Package Manager Programs.
|
||||
@@ -1287,22 +1319,30 @@ get_packages() {
|
||||
has "sorcery" && tot gaze installed
|
||||
has "alps" && tot alps showinstalled
|
||||
has "butch" && tot butch list
|
||||
has "pkginfo" && tot pkginfo -i
|
||||
|
||||
# Counting files/dirs.
|
||||
has "emerge" && dir /var/db/pkg/*/*/
|
||||
has "nix-env" && dir /nix/store/*/
|
||||
has "guix" && dir /gnu/store/*/
|
||||
has "Compile" && dir /Programs/*/
|
||||
has "eopkg" && dir /var/lib/eopkg/package/*
|
||||
has "crew" && dir /usr/local/etc/crew/meta/*.filelist
|
||||
has "pkgtool" && dir /var/log/packages/*
|
||||
has "cave" && dir /var/db/paludis/repositories/cross-installed/*/data/*/ \
|
||||
/var/db/paludis/repositories/installed/data/*/
|
||||
# Variables need to be unquoted here. Only Bedrock Linux is affected.
|
||||
# $br_prefix is fixed and won't change based on user input so this is safe either way.
|
||||
# shellcheck disable=SC2086
|
||||
{
|
||||
has "emerge" && dir ${br_prefix}/var/db/pkg/*/*/
|
||||
has "nix-env" && dir ${br_prefix}/nix/store/*/
|
||||
has "guix" && dir ${br_prefix}/gnu/store/*/
|
||||
has "Compile" && dir ${br_prefix}/Programs/*/
|
||||
has "eopkg" && dir ${br_prefix}/var/lib/eopkg/package/*
|
||||
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)
|
||||
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
|
||||
"FreeBSD") has "pkg" && tot pkg info ;;
|
||||
*)
|
||||
@@ -1341,6 +1381,9 @@ get_packages() {
|
||||
"MSYS"*) has "pacman" && tot pacman -Qq --color never ;;
|
||||
esac
|
||||
|
||||
# Scoop environment throws errors if `tot scoop list` is used
|
||||
has "scoop" && dir ~/scoop/apps/* && ((packages-=1))
|
||||
|
||||
# Count chocolatey packages.
|
||||
[[ -d "/cygdrive/c/ProgramData/chocolatey/lib" ]] && \
|
||||
dir /cygdrive/c/ProgramData/chocolatey/lib/*
|
||||
@@ -2270,8 +2313,8 @@ get_memory() {
|
||||
|
||||
"Solaris")
|
||||
hw_pagesize="$(pagesize)"
|
||||
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_total="$(kstat -p unix:0:system_pages:pagestotal | awk '{print $2}')"
|
||||
pages_free="$(kstat -p unix:0:system_pages:pagesfree | awk '{print $2}')"
|
||||
mem_total="$((pages_total * hw_pagesize / 1024 / 1024))"
|
||||
mem_free="$((pages_free * hw_pagesize / 1024 / 1024))"
|
||||
mem_used="$((mem_total - mem_free))"
|
||||
@@ -2311,7 +2354,10 @@ get_memory() {
|
||||
;;
|
||||
|
||||
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.
|
||||
case "$memory_display" in
|
||||
@@ -2336,7 +2382,6 @@ get_song() {
|
||||
"exaile"
|
||||
"gnome-music"
|
||||
"gmusicbrowser"
|
||||
"Google Play"
|
||||
"guayadeque"
|
||||
"iTunes"
|
||||
"juk"
|
||||
@@ -2344,6 +2389,7 @@ get_song() {
|
||||
"mocp"
|
||||
"mopidy"
|
||||
"mpd"
|
||||
"netease-cloud-music"
|
||||
"pogo"
|
||||
"pragha"
|
||||
"qmmp"
|
||||
@@ -2381,10 +2427,9 @@ get_song() {
|
||||
case "${player/*\/}" in
|
||||
"mpd"*|"mopidy"*) song="$(mpc -f '%artist%\n%album%\n%title%' current "${mpc_args[@]}")" ;;
|
||||
"mocp"*) song="$(mocp -Q '%artist\n%album\n%song')" ;;
|
||||
"google play"*) song="$(gpmdp-remote current)" ;;
|
||||
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist%\n%album%\n%title%')" ;;
|
||||
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%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" ;;
|
||||
"lollypop"*) get_song_dbus "Lollypop" ;;
|
||||
"clementine"*) get_song_dbus "clementine" ;;
|
||||
@@ -2404,6 +2449,7 @@ get_song() {
|
||||
"dragon"*) get_song_dbus "dragonplayer" ;;
|
||||
"smplayer"*) get_song_dbus "smplayer" ;;
|
||||
"rhythmbox"*) get_song_dbus "rhythmbox" ;;
|
||||
"netease-cloud-music"*) get_song_dbus "netease-cloud-music" ;;
|
||||
|
||||
"cmus"*)
|
||||
song="$(cmus-remote -Q | awk 'BEGIN { ORS=" "};
|
||||
@@ -2464,22 +2510,28 @@ get_song() {
|
||||
/"title"/ {t=$4} END {print a "\n" b "\n" t}')"
|
||||
;;
|
||||
|
||||
*) mpc &>/dev/null && song="$(mpc -f '%artist%\n%album%\n%title%' current)" ;;
|
||||
*) mpc &>/dev/null && song="$(mpc -f '%artist%\n%album%\n%title%' current)" || return ;;
|
||||
esac
|
||||
|
||||
[[ "$song" != *[a-z]* ]] && { unset -v song; return; }
|
||||
IFS=$'\n' read -d "" -r artist album title <<< "${song//'\n'/$'\n'}"
|
||||
|
||||
IFS=$'\n' read -d "" -r artist album title <<< "$song"
|
||||
# Make sure empty tags are truly empty.
|
||||
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.
|
||||
if [[ "$song_shorthand" == "on" ]]; then
|
||||
[[ "$(trim "$artist")" ]] && prin "Artist" "$artist"
|
||||
[[ "$(trim "$album")" ]] && prin "Album" "$album"
|
||||
[[ "$(trim "$song")" ]] && prin "Song" "$title"
|
||||
prin "Artist" "$artist"
|
||||
prin "Album" "$album"
|
||||
prin "Song" "$title"
|
||||
else
|
||||
song="${song_format/\%artist\%/${artist}}"
|
||||
song="${song/\%album\%/${album}}"
|
||||
song="${song/\%title\%/${title}}"
|
||||
song="${song_format/\%artist\%/$artist}"
|
||||
song="${song/\%album\%/$album}"
|
||||
song="${song/\%title\%/$title}"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -2566,6 +2618,7 @@ get_resolution() {
|
||||
esac
|
||||
|
||||
resolution="${resolution%,*}"
|
||||
[[ -z ${resolution/x} ]] && resolution=
|
||||
}
|
||||
|
||||
get_style() {
|
||||
@@ -2867,21 +2920,11 @@ END
|
||||
;;
|
||||
|
||||
"kitty"*)
|
||||
shopt -s nullglob
|
||||
confs=({$KITTY_CONFIG_DIRECTORY,$XDG_CONFIG_HOME,~/Library/Preferences}/kitty/kitty.con?)
|
||||
shopt -u nullglob
|
||||
|
||||
[[ -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]}")"
|
||||
kitty_config="$(kitty --debug-config)"
|
||||
term_font_size="${kitty_config/*font_size}"
|
||||
term_font_size="${term_font_size/$'\n'*}"
|
||||
term_font="${kitty_config/*font_family}"
|
||||
term_font="${term_font/$'\n'*} $term_font_size"
|
||||
;;
|
||||
|
||||
"konsole" | "yakuake")
|
||||
@@ -3272,11 +3315,11 @@ get_public_ip() {
|
||||
fi
|
||||
|
||||
if [[ -z "$public_ip" ]] && type -p curl >/dev/null; then
|
||||
public_ip="$(curl --max-time 10 -w '\n' "$public_ip_host")"
|
||||
public_ip="$(curl --max-time "$public_ip_timeout" -w '\n' "$public_ip_host")"
|
||||
fi
|
||||
|
||||
if [[ -z "$public_ip" ]] && type -p wget >/dev/null; then
|
||||
public_ip="$(wget -T 10 -qO- "$public_ip_host")"
|
||||
public_ip="$(wget -T "$public_ip_timeout" -qO- "$public_ip_host")"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -3302,6 +3345,7 @@ get_gpu_driver() {
|
||||
gpu_driver="NVIDIA ${gpu_driver/ *}"
|
||||
fi
|
||||
;;
|
||||
|
||||
"Mac OS X")
|
||||
if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then
|
||||
gpu_driver="NVIDIA Web Driver"
|
||||
@@ -3344,9 +3388,9 @@ get_cols() {
|
||||
cols="${cols//nl/\\n\\e[${text_padding}C${zws}}"
|
||||
|
||||
# Add block height to info height.
|
||||
((info_height+=block_height-1))
|
||||
((info_height+=block_range[1]>7?block_height+3:block_height+2))
|
||||
|
||||
printf '\e[%bC%b' "$text_padding" "${zws}${cols}"
|
||||
printf '\n\e[%bC%b\n\n' "$text_padding" "${zws}${cols}"
|
||||
fi
|
||||
|
||||
unset -v blocks blocks2 cols
|
||||
@@ -3369,7 +3413,7 @@ image_backend() {
|
||||
"ascii") get_ascii ;;
|
||||
"off") image_backend="off" ;;
|
||||
|
||||
"caca" | "jp2a" | "iterm2" | "termpix" |\
|
||||
"caca" | "chafa" | "jp2a" | "iterm2" | "termpix" |\
|
||||
"tycat" | "w3m" | "sixel" | "pixterm" | "kitty")
|
||||
get_image_source
|
||||
|
||||
@@ -3394,7 +3438,7 @@ image_backend() {
|
||||
|
||||
*)
|
||||
err "Image: Unknown image backend specified '$image_backend'."
|
||||
err "Image: Valid backends are: 'ascii', 'caca', 'jp2a', 'iterm2', 'kitty',
|
||||
err "Image: Valid backends are: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'kitty',
|
||||
'off', 'sixel', 'pixterm', 'termpix', 'tycat', 'w3m')"
|
||||
err "Image: Falling back to ascii mode."
|
||||
get_ascii
|
||||
@@ -3406,20 +3450,25 @@ image_backend() {
|
||||
}
|
||||
|
||||
get_ascii() {
|
||||
if [[ -f "$image_source" && ! "$image_source" =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then
|
||||
ascii_data="$(< "$image_source")"
|
||||
else
|
||||
err "Ascii: Ascii file not found, using distro ascii."
|
||||
fi
|
||||
[[ ! "$image_source" =~ (ascii|auto) ]] &&
|
||||
if [[ -f "$image_source" && ! "$image_source" =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then
|
||||
ascii_data="$(< "$image_source")"
|
||||
else
|
||||
ascii_data="$image_source"
|
||||
fi
|
||||
|
||||
# Set locale to get correct padding.
|
||||
LC_ALL="$sys_locale"
|
||||
|
||||
# Calculate size of ascii file in line length / line count.
|
||||
while IFS=$'\n' read -r line; do
|
||||
((++lines,${#line}>ascii_length)) && ascii_length="${#line}"
|
||||
line="${line//\\\\/\\}"
|
||||
((++lines,${#line}>ascii_len)) && ascii_len="${#line}"
|
||||
done <<< "${ascii_data//\$\{??\}}"
|
||||
|
||||
# Fallback if file not found.
|
||||
((lines==1)) && { lines=; ascii_len=; image_source="auto"; get_distro_ascii; get_ascii; return; }
|
||||
|
||||
# Colors.
|
||||
ascii_data="${ascii_data//\$\{c1\}/$c1}"
|
||||
ascii_data="${ascii_data//\$\{c2\}/$c2}"
|
||||
@@ -3428,7 +3477,7 @@ get_ascii() {
|
||||
ascii_data="${ascii_data//\$\{c5\}/$c5}"
|
||||
ascii_data="${ascii_data//\$\{c6\}/$c6}"
|
||||
|
||||
((text_padding=ascii_length+gap))
|
||||
((text_padding=ascii_len+gap))
|
||||
printf '%b\n' "$ascii_data${reset}"
|
||||
LC_ALL=C
|
||||
}
|
||||
@@ -3677,15 +3726,18 @@ get_image_size() {
|
||||
*) image_size="${image_size/px}" ;;
|
||||
esac
|
||||
|
||||
# Check for terminal padding.
|
||||
[[ $image_backend == w3m ]] && term_padding
|
||||
|
||||
width="${width:-$image_size}"
|
||||
height="${height:-$image_size}"
|
||||
text_padding="$((width / font_width + gap + xoffset/font_width))"
|
||||
text_padding="$(((width + padding + xoffset) / font_width + gap))"
|
||||
}
|
||||
|
||||
make_thumbnail() {
|
||||
# Name the thumbnail using variables so we can
|
||||
# use it later.
|
||||
image_name="${crop_mode}-${crop_offset}-${width}-${height}-${image##*/}"
|
||||
image_name="${crop_mode}-${crop_offset}-${width}-${height}-${image//\/}"
|
||||
|
||||
# Handle file extensions.
|
||||
case "${image##*.}" in
|
||||
@@ -3740,11 +3792,9 @@ make_thumbnail() {
|
||||
-background none \
|
||||
"$image" \
|
||||
-strip \
|
||||
-define "jpeg:size=100x100" \
|
||||
-gravity "$crop_offset" \
|
||||
-crop "${size}x${size}+0+0" \
|
||||
-quality 40 \
|
||||
-sample "${width}x${height}" \
|
||||
-scale "${width}x${height}" \
|
||||
"${thumbnail_dir}/${image_name}"
|
||||
;;
|
||||
esac
|
||||
@@ -3758,17 +3808,21 @@ display_image() {
|
||||
case "$image_backend" in
|
||||
"caca")
|
||||
img2txt \
|
||||
-W "$((width / font_width)))" \
|
||||
-W "$((width / font_width))" \
|
||||
-H "$((height / font_height))" \
|
||||
--gamma=0.6 \
|
||||
"$image"
|
||||
;;
|
||||
|
||||
"chafa")
|
||||
chafa --size="$((width / font_width))x$((height / font_height))" "$image"
|
||||
;;
|
||||
|
||||
"jp2a")
|
||||
jp2a \
|
||||
--colors \
|
||||
--width="$((width / font_width))" \
|
||||
--height="$((height / font_height))" \
|
||||
--colors \
|
||||
"$image"
|
||||
;;
|
||||
|
||||
@@ -3822,7 +3876,7 @@ display_image() {
|
||||
|
||||
# Add a tiny delay to fix issues with images not
|
||||
# appearing in specific terminal emulators.
|
||||
sleep 0.05
|
||||
((BASH_VERSINFO[0]>3)) && sleep 0.05
|
||||
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
|
||||
;;
|
||||
@@ -3899,7 +3953,7 @@ prin() {
|
||||
string="${subtitle_color}${bold}${string}"
|
||||
|
||||
# Print the info.
|
||||
printf '%b\n' "${text_padding:+\e[${text_padding}C}${zws}${string}${reset} "
|
||||
printf '%b\n' "${text_padding:+\e[${text_padding}C}${zws}${string//\\n}${reset} "
|
||||
|
||||
# Calculate info height.
|
||||
((++info_height))
|
||||
@@ -3920,17 +3974,6 @@ get_underline() {
|
||||
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() {
|
||||
case "$ascii_bold" in
|
||||
"on") ascii_bold='\e[1m' ;;
|
||||
@@ -4030,18 +4073,9 @@ color() {
|
||||
|
||||
stdout() {
|
||||
image_backend="off"
|
||||
unset subtitle_color
|
||||
unset colon_color
|
||||
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
|
||||
unset subtitle_color colon_color info_color underline_color bold title_color at_color \
|
||||
text_padding zws reset color_blocks bar_color_elapsed bar_color_total \
|
||||
c1 c2 c3 c4 c5 c6 c7 c8
|
||||
}
|
||||
|
||||
err() {
|
||||
@@ -4160,9 +4194,23 @@ 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() {
|
||||
[[ "$image_backend" == "off" ]] && { printf '\n'; return; }
|
||||
[[ "$image_backend" != "ascii" ]] && lines="$(((height + yoffset) / font_height + 1))"
|
||||
[[ $image_backend == off ]] && { printf '\n'; return; }
|
||||
[[ $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.
|
||||
((lines=lines>info_height?lines-info_height+1:1))
|
||||
@@ -4239,7 +4287,7 @@ decode_url() {
|
||||
# FINISH UP
|
||||
|
||||
usage() { printf "%s" "\
|
||||
Usage: neofetch --option \"value\" --option \"value\"
|
||||
Usage: neofetch 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,
|
||||
@@ -4250,6 +4298,23 @@ NOTE: Every launch flag has a config option.
|
||||
Options:
|
||||
|
||||
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
|
||||
in the output. 'infoname' is the function name from the
|
||||
'print_info()' function inside the config file.
|
||||
@@ -4320,8 +4385,10 @@ INFO:
|
||||
'dir' shows the basename of the disks's path. (/, Local Disk, etc)
|
||||
|
||||
--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_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.
|
||||
Available values are listed in the config file
|
||||
|
||||
@@ -4357,13 +4424,18 @@ BARS:
|
||||
|
||||
IMAGE BACKEND:
|
||||
--backend backend Which image backend to use.
|
||||
Possible values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off',
|
||||
'sixel', 'tycat', 'w3m'
|
||||
Possible values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2',
|
||||
'off', 'sixel', 'tycat', 'w3m'
|
||||
--source source Which image or ascii file to use.
|
||||
Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img',
|
||||
'/path/to/ascii', '/path/to/dir/'
|
||||
'/path/to/ascii', '/path/to/dir/', 'command output' [ascii]
|
||||
|
||||
--ascii source Shortcut to use 'ascii' backend.
|
||||
|
||||
NEW: neofetch --ascii \"\$(fortune | cowsay -W 30)\"
|
||||
|
||||
--caca source Shortcut to use 'caca' backend.
|
||||
--chafa source Shortcut to use 'chafa' backend.
|
||||
--iterm2 source Shortcut to use 'iterm2' backend.
|
||||
--jp2a source Shortcut to use 'jp2a' backend.
|
||||
--kitty source Shortcut to use 'kitty' backend.
|
||||
@@ -4468,9 +4540,11 @@ get_args() {
|
||||
"--shell_path") shell_path="$2" ;;
|
||||
"--shell_version") shell_version="$2" ;;
|
||||
"--ip_host") public_ip_host="$2" ;;
|
||||
"--ip_timeout") public_ip_timeout="$2" ;;
|
||||
"--song_format") song_format="$2" ;;
|
||||
"--song_shorthand") song_shorthand="$2" ;;
|
||||
"--music_player") music_player="$2" ;;
|
||||
"--memory_percent") memory_percent="$2" ;;
|
||||
"--cpu_temp")
|
||||
cpu_temp="$2"
|
||||
[[ "$cpu_temp" == "on" ]] && cpu_temp="C"
|
||||
@@ -4546,7 +4620,7 @@ get_args() {
|
||||
# Image backend
|
||||
"--backend") image_backend="$2" ;;
|
||||
"--source") image_source="$2" ;;
|
||||
"--ascii" | "--caca" | "--jp2a" | "--iterm2" | "--off" | "--pixterm" |\
|
||||
"--ascii" | "--caca" | "--chafa" | "--jp2a" | "--iterm2" | "--off" | "--pixterm" |\
|
||||
"--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty")
|
||||
image_backend="${1/--}"
|
||||
case "$2" in
|
||||
@@ -4585,13 +4659,12 @@ get_args() {
|
||||
"--ascii_distro")
|
||||
image_backend="ascii"
|
||||
ascii_distro="$2"
|
||||
case "$2" in "-"* | "") ascii_distro="$distro" ;; esac
|
||||
;;
|
||||
|
||||
"--ascii_bold") ascii_bold="$2" ;;
|
||||
"--logo" | "-L")
|
||||
image_backend="ascii"
|
||||
print_info() { info line_break; }
|
||||
print_info() { printf '\n'; }
|
||||
;;
|
||||
|
||||
# Other
|
||||
@@ -4621,7 +4694,7 @@ get_args() {
|
||||
|
||||
"--json")
|
||||
json="on"
|
||||
unset -f get_title get_cols get_line_break get_underline
|
||||
unset -f get_title get_cols get_underline
|
||||
|
||||
printf '{\n'
|
||||
print_info 2>/dev/null
|
||||
@@ -4663,9 +4736,7 @@ get_args() {
|
||||
info "Public IP" public_ip
|
||||
info "Users" users
|
||||
|
||||
info line_break
|
||||
info cols
|
||||
info line_break
|
||||
|
||||
# Testing.
|
||||
prin "prin"
|
||||
@@ -4693,6 +4764,24 @@ get_args() {
|
||||
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() {
|
||||
# This function gets the distro ascii art and colors.
|
||||
#
|
||||
@@ -5191,6 +5280,29 @@ ${c1}:syyyyyy/ :yyyyyy/${c2}-yyo.:syyyyyyyyyyy
|
||||
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"*)
|
||||
set_colors 2 7
|
||||
read -rd '' ascii_data <<'EOF'
|
||||
@@ -5626,7 +5738,7 @@ EOF
|
||||
"debian_small")
|
||||
set_colors 1 7 3
|
||||
read -rd '' ascii_data <<'EOF'
|
||||
${c1}_____
|
||||
${c1} _____
|
||||
/ __ \\
|
||||
| / |
|
||||
| \\___-
|
||||
@@ -6062,6 +6174,33 @@ yM${c2}MNNNNNNNmmmmmNNMmhs+/${c1}-`
|
||||
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"*)
|
||||
set_colors 4 5 7 6
|
||||
read -rd '' ascii_data <<'EOF'
|
||||
@@ -6107,8 +6246,8 @@ EOF
|
||||
"GoboLinux"*)
|
||||
set_colors 5 4 6 2
|
||||
read -rd '' ascii_data <<'EOF'
|
||||
${c1}_____ _
|
||||
/ ____| | |
|
||||
${c1} _____ _
|
||||
/ ____| | |
|
||||
| | __ ___ | |__ ___
|
||||
| | |_ |/ _ \| '_ \ / _ \
|
||||
| |__| | (_) | |_) | (_) |
|
||||
@@ -6179,6 +6318,29 @@ ${c2} :dc'
|
||||
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"*)
|
||||
set_colors 8
|
||||
read -rd '' ascii_data <<'EOF'
|
||||
@@ -8360,12 +8522,12 @@ EOF
|
||||
set_colors 2 8
|
||||
read -rd '' ascii_data <<'EOF'
|
||||
${c1} _______
|
||||
_ \______ -
|
||||
| \ ___ \ |
|
||||
_ \\______ -
|
||||
| \\ ___ \\ |
|
||||
| | / \ | |
|
||||
| | \___/ | |
|
||||
| \______ \_|
|
||||
-_______\
|
||||
| \\______ \\_|
|
||||
-_______\\
|
||||
EOF
|
||||
;;
|
||||
|
||||
@@ -8640,6 +8802,7 @@ main() {
|
||||
eval "$config"
|
||||
|
||||
get_args "$@"
|
||||
get_simple "$@"
|
||||
[[ "$verbose" != "on" ]] && exec 2>/dev/null
|
||||
get_distro
|
||||
get_bold
|
||||
@@ -8657,6 +8820,7 @@ main() {
|
||||
|
||||
image_backend
|
||||
get_cache_dir
|
||||
old_functions
|
||||
print_info
|
||||
dynamic_prompt
|
||||
|
||||
|
41
neofetch.1
41
neofetch.1
@@ -1,10 +1,10 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.7.
|
||||
.TH NEOFETCH "1" "October 2018" "Neofetch 5.0.1" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8.
|
||||
.TH NEOFETCH "1" "January 2019" "Neofetch 6.0.0" "User Commands"
|
||||
.SH NAME
|
||||
Neofetch \- A fast, highly customizable system info script
|
||||
.SH SYNOPSIS
|
||||
.B neofetch
|
||||
\fI\,--option "value" --option "value"\/\fR
|
||||
\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,
|
||||
@@ -14,6 +14,24 @@ NOTE: Every launch flag has a config option.
|
||||
.SH OPTIONS
|
||||
.SS "INFO:"
|
||||
.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
|
||||
Allows you to disable an info line from appearing
|
||||
in the output. 'infoname' is the function name from the
|
||||
@@ -120,12 +138,18 @@ Takes: name, mount, dir
|
||||
\fB\-\-ip_host\fR url
|
||||
URL to query for public IP
|
||||
.TP
|
||||
\fB\-\-ip_timeout\fR int
|
||||
Public IP timeout (in seconds).
|
||||
.TP
|
||||
\fB\-\-song_format\fR format
|
||||
Print the song data in a specific format (see config file).
|
||||
.TP
|
||||
\fB\-\-song_shorthand\fR on/off
|
||||
Print the Artist/Album/Title on separate lines.
|
||||
.TP
|
||||
\fB\-\-memory_percent\fR on/off
|
||||
Display memory percentage.
|
||||
.TP
|
||||
\fB\-\-music_player\fR player\-name
|
||||
Manually specify a player to use.
|
||||
Available values are listed in the config file
|
||||
@@ -193,20 +217,25 @@ Possible values: bar, infobar, barinfo, off
|
||||
.TP
|
||||
\fB\-\-backend\fR backend
|
||||
Which image backend to use.
|
||||
Possible values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off',
|
||||
\&'sixel', 'tycat', 'w3m'
|
||||
Possible values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2',
|
||||
\&'off', 'sixel', 'tycat', 'w3m'
|
||||
.TP
|
||||
\fB\-\-source\fR source
|
||||
Which image or ascii file to use.
|
||||
Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img',
|
||||
\&'/path/to/ascii', '/path/to/dir/'
|
||||
\&'/path/to/ascii', '/path/to/dir/', 'command output' [ascii]
|
||||
.TP
|
||||
\fB\-\-ascii\fR source
|
||||
Shortcut to use 'ascii' backend.
|
||||
.IP
|
||||
NEW: neofetch \fB\-\-ascii\fR "$(fortune | cowsay \fB\-W\fR 30)"
|
||||
.TP
|
||||
\fB\-\-caca\fR source
|
||||
Shortcut to use 'caca' backend.
|
||||
.TP
|
||||
\fB\-\-chafa\fR source
|
||||
Shortcut to use 'chafa' backend.
|
||||
.TP
|
||||
\fB\-\-iterm2\fR source
|
||||
Shortcut to use 'iterm2' backend.
|
||||
.TP
|
||||
|
Reference in New Issue
Block a user