Merge branch 'master' of github.com:dylanaraps/neofetch into irix

This commit is contained in:
Muhammad Herdiansyah 2017-06-10 13:07:44 +07:00
commit 69b642b759
9 changed files with 273 additions and 85 deletions

View File

@ -2,6 +2,26 @@
- **[@MatthewCox](https://github.com/MatthewCox)** - **[@MatthewCox](https://github.com/MatthewCox)**
- **[@dawidd6](https://github.com/dawidd6)** - **[@dawidd6](https://github.com/dawidd6)**
- **[@erikdubois](https://github.com/erikdubois)**
- **[@mstraube](https://github.com/mstraube)**
- **[@Artoriuz](https://github.com/Artoriuz)**
- **[@WilsonRU](https://github.com/WilsonRU)**
- **[@Takeya-Yuki](https://github.com/Takeya-Yuki)**
- **[@LER0ever](https://github.com/LER0ever)**
## Operating System
- Added support for Arch XFerience. **[@mstraube](https://github.com/mstraube)**
- Added support for Maui. **[@mstraube](https://github.com/mstraube)**
- Added support for KS Linux. **[@Takeya-Yuki](https://github.com/Takeya-Yuki)**
## General
- Minimum required BASH version is now 3.2.
- (Neofetch has always used 3.2+ features, I've just made it obvious now in the documentation.)
- Fixed config file not being created.
## Images ## Images
@ -9,13 +29,29 @@
- [w3m] Added `--loop` flag which makes Neofetch draw the image once per second. - [w3m] Added `--loop` flag which makes Neofetch draw the image once per second.
- This is a workaround to the images disappearing on resize and workspace switch. - This is a workaround to the images disappearing on resize and workspace switch.
- Use Ctrl+C to exit. - Use Ctrl+C to exit.
- [w3m] Fixed w3m-img not found on FreeBSD 12. **[@Artoriuz](https://github.com/Artoriuz)**
## Ascii
- Added Ubuntu-MATE ascii art.
- Fixed ArchLabs ascii art. **[@erikdubois](https://github.com/erikdubois)**
- Updated GoboLinux ascii art. **[@WilsonRU](https://github.com/WilsonRU)**
- Fixed `--ascii_distro windows10` not working.
## Info ## Info
**Distro**
- [Solaris, AIX, Haiku] The machine architecture will now be shown properly instead of machine ID.
**Terminal Emulator** **Terminal Emulator**
- Added font support for mate-terminal. **[@mstraube](https://github.com/mstraube)**
- [Termite] Fix font mismatch. **[@MatthewCox](https://github.com/MatthewCox)** - [Termite] Fix font mismatch. **[@MatthewCox](https://github.com/MatthewCox)**
- Use `$SSH_TTY` for terminal detection if machine is connected via SSH.
- Break from loop if PPID can't be accessed/not found.
**GPU** **GPU**
@ -24,3 +60,12 @@
**Song** **Song**
- Do not detect ibus\* or indicator\* as player. **[@dawidd6](https://github.com/dawidd6)** - Do not detect ibus\* or indicator\* as player. **[@dawidd6](https://github.com/dawidd6)**
**Model**
- Specify when running on a Hackintosh. **[@LER0ever](https://github.com/LER0ever)**
**Memory**
- [FreeBSD]: Fix inaccurate free memory calculation.

View File

@ -10,7 +10,7 @@ Neofetch is a CLI system information tool written in BASH. Neofetch displays inf
Neofetch is highly customizable through the use of command line flags or the user config file. There are over 50 config options to mess around with and there's the `print_info()` function and friends which let you add your own custom info. Neofetch is highly customizable through the use of command line flags or the user config file. There are over 50 config options to mess around with and there's the `print_info()` function and friends which let you add your own custom info.
Neofetch can be used on any OS that has BASH, it's just a matter of adding support. If your OS/Distro isn't in the list below, feel free to open an issue on the repo and I'll gladly add support. Neofetch currently supports `Linux`, `MacOS`, `iOS`, `BSD`, `Solaris`, `Android`, `Haiku`, `GNU Hurd`, `MINIX`, `AIX`, and `Windows (Cygwin/MSYS2/MinGW/Windows 10 Linux subsystem)`. Neofetch can be used on any OS that has BASH 3.2+, it's just a matter of adding support. If your OS/Distro isn't in the list below, feel free to open an issue on the repo and I'll gladly add support. Neofetch currently supports `Linux`, `MacOS`, `iOS`, `BSD`, `Solaris`, `Android`, `Haiku`, `GNU Hurd`, `MINIX`, `AIX`, and `Windows (Cygwin/MSYS2/MinGW/Windows 10 Linux subsystem)`.
For more information: For more information:

View File

@ -0,0 +1,19 @@
${c1} ``--:::::::-.`
.-/+++ooooooooo+++:-`
`-/+oooooooooooooooooo++:.
-/+oooooo/+ooooooooo+/ooo++:`
`/+oo++oo. .+oooooo+.-: +:-o+-
`/+o/. -o. :oooooo+ ```:.+oo+-
`:+oo- -/` :oooooo+ .`-`+oooo/.
.+ooo+. .` `://///+-+..oooooo+:`
-+ooo:` ``.-+oooooo+/`
-+oo/` :+oooo/.
.+oo: ..-/. . -+oo+/`
`/++- -:::++::/. -+oo+-
./o: `:///+- `./ooo+:`
.++- `` /-` -:/+oooo+:`
.:+/:`` `-:ooooooo++-
./+o+//:...../+oooooooo++:`
`:/++ooooooooooooo++/-`
`.-//++++++//:-.`
``````

View File

@ -1,4 +1,4 @@
${c1} sy ${c1} sy
h--d h--d
d---: d---:
:----/N :----/N
@ -15,4 +15,4 @@ ${c1} sy
/--::::::::::::dd::::::::::+N /--::::::::::::dd::::::::::+N
:-:::/+syhd NNN N dhys+/:::/ :-:::/+syhd NNN N dhys+/:::/
d::+ydN /s+/d d::+ydN /s+/d
hsd y\\. arc y\\.

View File

@ -1,13 +1,6 @@
${c1}+Nhsssss. `MM: ${c1}_____ _
${c2}MM/ ./:::/- `MMo::// ./:::/- / ____| | |
MM/-osdd-+mm---hNs`MM+--/Md.omd---dmo | | __ ___ | |__ ___
${c3}MM/ `MM:sMm yMh`MM: .MM-yMh hMy | | |_ |/ _ \| '_ \ / _ \
mM+..-MM:oNm...hNy`MM/..:Mm.sNd...dNs | |__| | (_) | |_) | (_) |
${c4}`+++++oo.`-o++++:``oo++++o` `:o+++o:` \_____|\___/|_.__/ \___/
${c1}oo- :o+
${c2}MM/ /yo
MM/ +mh mmyoosm/`+mh omy`od+..+mo
${c3}MM/ sMm MM/ `MM:sMm yMh -dmmm:
MM/ sMm MM/ `MM:sMm yMh .hNNm.
${c4}MMhsssss.sMm MM/ `MM:-yNsssmMh`sNs-.sMs

11
ascii/distro/kslinux Normal file
View File

@ -0,0 +1,11 @@
${c1} K K U U RRRR ooo
K K U U R R o o
KKK U U RRRR o o
K K U U R R o o
K K UUU R R ooo
${c2} SSS AAA W W AAA
S A A W W A A
SSS AAAAA W W W AAAAA
S A A WW WW A A
SSS A A W W A A

20
ascii/distro/maui Normal file
View File

@ -0,0 +1,20 @@
${c1} `.-://////:--`
.:/oooooooooooooooo+:.
`:+ooooooooooooooooooooooo:`
`:oooooooooooooooooooooooooooo/`
..```-oooooo/-`` `:oooooo+:.` `--
:. +oo+-` /ooo/` -/
-o. `o+- +o/` -o:
`oo` ::` :o/ `+. .+o` /oo.
/o+ . -+oo- ` /oo/ `ooo/
+o- /ooo+` .+ooo. :ooo+
++ .+oooo: -oooo+ `oooo+
:. .oooooo` :ooooo- :oooo:
` .oooooo: :ooooo+ `ooo+-`
.+oooooo` -oooooo: `o/-
+oooooo: .ooooooo.
/ooooooo` /ooooooo/ ..
`:oooooooo/:::/ooooooooo+:--:/:`
`:+oooooooooooooooooooooo+:`
.:+oooooooooooooooo+:.
`.-://////:-.`

20
ascii/distro/ubuntu-mate Normal file
View File

@ -0,0 +1,20 @@
${c1} `:+shmNNMMNNmhs+:`
.odMMMMMMMMMMMMMMMMMMdo.
/dMMMMMMMMMMMMMMMmMMMMMMMMd/
:mMMMMMMMMMMMMNNNNM/`/yNMMMMMMm:
`yMMMMMMMMMms:..-::oM: -omMMMMMy`
`dMMMMMMMMy-.odNMMMMMM: -odMMMMMMd`
hMMMMMMMm-.hMMy/....+M:`/yNm+mMMMMMMMh
/MMMMNmMN-:NMy`-yNMMMMMmNyyMN:`dMMMMMMM/
hMMMMm -odMMh`sMMMMMMMMMMs sMN..MMMMMMMh
NMMMMm `/yNMMMMMMMMMMMM: MM+ mMMMMMMN
NMMMMm `/yNMMMMMMMMMMMM: MM+ mMMMMMMN
hMMMMm -odMMh sMMMMMMMMMMs oMN..MMMMMMMh
/MMMMNNMN-:NMy`-yNMMMMMNNsyMN:`dMMMMMMM/
hMMMMMMMm-.hMMy/....+M:.+hNd+mMMMMMMMh
`dMMMMMMMMy-.odNMMMMMM: :smMMMMMMd`
yMMMMMMMMMms/..-::oM: .+dMMMMMy
:mMMMMMMMMMMMMNNNNM: :smMMMMMMm:
/dMMMMMMMMMMMMMMMdNMMMMMMMd/
.odMMMMMMMMMMMMMMMMMMdo.
`:+shmNNMMNNmhs+:`

218
neofetch
View File

@ -92,7 +92,10 @@ get_distro() {
distro="$(lsb_release $lsb_flags)" distro="$(lsb_release $lsb_flags)"
elif type -p guix >/dev/null; then elif type -p guix >/dev/null; then
distro="GuixSD" case "$distro_shorthand" in
"on" | "tiny") distro="GuixSD" ;;
*) distro="GuixSD $(guix system -V | awk 'NR==1{printf $5}')"
esac
elif type -p crux >/dev/null; then elif type -p crux >/dev/null; then
distro="$(crux)" distro="$(crux)"
@ -104,6 +107,9 @@ get_distro() {
elif type -p tazpkg >/dev/null; then elif type -p tazpkg >/dev/null; then
distro="SliTaz $(< /etc/slitaz-release)" distro="SliTaz $(< /etc/slitaz-release)"
elif type -p kpm > /dev/null; then
distro="KSLinux"
elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then
distro="Android $(getprop ro.build.version.release)" distro="Android $(getprop ro.build.version.release)"
@ -215,8 +221,14 @@ get_distro() {
[[ -z "$distro" ]] && distro="$os (Unknown)" [[ -z "$distro" ]] && distro="$os (Unknown)"
# Get OS architecture. # Get OS architecture.
[[ "$os_arch" == "on" ]] && \ if [[ "$os_arch" == "on" ]]; then
case "$os" in
"Solaris" | "AIX" | "BSD" | "Haiku") machine_arch="$(uname -p)" ;;
*) machine_arch="$(uname -m)" ;;
esac
distro+=" ${machine_arch}" distro+=" ${machine_arch}"
fi
[[ "${ascii_distro:-auto}" == "auto" ]] && \ [[ "${ascii_distro:-auto}" == "auto" ]] && \
ascii_distro="$(trim "$distro")" ascii_distro="$(trim "$distro")"
@ -241,7 +253,14 @@ get_model() {
fi fi
;; ;;
"Mac OS X") model="$(sysctl -n hw.model)" ;; "Mac OS X")
if [[ "$(kextstat | grep "FakeSMC")" != "" ]]; then
model="Hackintosh (SMBIOS: $(sysctl -n hw.model))"
else
model="$(sysctl -n hw.model)"
fi
;;
"iPhone OS") "iPhone OS")
case "$machine_arch" in case "$machine_arch" in
"iPad1,1") model="iPad" ;; "iPad1,1") model="iPad" ;;
@ -262,7 +281,7 @@ get_model() {
"iPhone2,1") model="iPhone 3GS" ;; "iPhone2,1") model="iPhone 3GS" ;;
"iPhone3,"[1-3]) model="iPhone 4" ;; "iPhone3,"[1-3]) model="iPhone 4" ;;
"iPhone4,1") model="iPhone 4S" ;; "iPhone4,1") model="iPhone 4S" ;;
"iPhone5,"[1-2]) model="iPhone 4" ;; "iPhone5,"[1-2]) model="iPhone 5" ;;
"iPhone5,"[3-4]) model="iPhone 5c" ;; "iPhone5,"[3-4]) model="iPhone 5c" ;;
"iPhone6,"[1-2]) model="iPhone 5s" ;; "iPhone6,"[1-2]) model="iPhone 5s" ;;
"iPhone7,2") model="iPhone 6" ;; "iPhone7,2") model="iPhone 6" ;;
@ -440,6 +459,9 @@ get_packages() {
type -p dpkg >/dev/null && \ type -p dpkg >/dev/null && \
packages="$((packages+=$(dpkg --get-selections | grep -cv deinstall$)))" packages="$((packages+=$(dpkg --get-selections | grep -cv deinstall$)))"
type -p kpm >/dev/null && \
packages="$((packages+=$(kpm --get-selections | grep -cv deinstall$)))"
type -p pkgtool >/dev/null && \ type -p pkgtool >/dev/null && \
packages="$((packages+=$(ls -1 /var/log/packages | wc -l)))" packages="$((packages+=$(ls -1 /var/log/packages | wc -l)))"
@ -942,6 +964,7 @@ get_cpu() {
cpu="${cpu//*$'\n'}" cpu="${cpu//*$'\n'}"
cpu="${cpu/[0-9]\.*}" cpu="${cpu/[0-9]\.*}"
cpu="${cpu/ @*}" cpu="${cpu/ @*}"
cpu="${cpu/\(portid*}"
# Get CPU speed. # Get CPU speed.
speed="$(psrinfo -v | awk '/operates at/ {print $6; exit}')" speed="$(psrinfo -v | awk '/operates at/ {print $6; exit}')"
@ -1194,7 +1217,16 @@ get_gpu() {
esac esac
;; ;;
"BSD" | "Solaris" | "MINIX" | "AIX") "Windows")
gpu="$(wmic path Win32_VideoController get caption)"
gpu="${gpu//Caption}"
;;
"Haiku")
gpu="$(listdev | grep -A2 -F 'device Display controller' | awk -F':' '/device beef/ {print $2}')"
;;
*)
case "$kernel_name" in case "$kernel_name" in
"FreeBSD"* | "DragonFly"*) "FreeBSD"* | "DragonFly"*)
gpu="$(pciconf -lv | grep -B 4 -F "VGA" | grep -F "device")" gpu="$(pciconf -lv | grep -B 4 -F "VGA" | grep -F "device")"
@ -1208,15 +1240,6 @@ get_gpu() {
;; ;;
esac esac
;; ;;
"Windows")
gpu="$(wmic path Win32_VideoController get caption)"
gpu="${gpu//Caption}"
;;
"Haiku")
gpu="$(listdev | grep -A2 -F 'device Display controller' | awk -F':' '/device beef/ {print $2}')"
;;
esac esac
if [[ "$gpu_brand" == "off" ]]; then if [[ "$gpu_brand" == "off" ]]; then
@ -1262,8 +1285,11 @@ get_memory() {
case "$kernel_name" in case "$kernel_name" in
"NetBSD"*) mem_free="$(($(awk -F ':|kB' '/MemFree:/ {printf $2}' /proc/meminfo) / 1024))" ;; "NetBSD"*) mem_free="$(($(awk -F ':|kB' '/MemFree:/ {printf $2}' /proc/meminfo) / 1024))" ;;
"FreeBSD"* | "DragonFly"*) "FreeBSD"* | "DragonFly"*)
mem_free="$(top -d 1 | awk -F ',' '/^Mem:/ {print $5}')" hw_pagesize="$(sysctl -n hw.pagesize)"
mem_free="${mem_free/M Free}" mem_inactive="$(($(sysctl -n vm.stats.vm.v_inactive_count) * hw_pagesize))"
mem_unused="$(($(sysctl -n vm.stats.vm.v_free_count) * hw_pagesize))"
mem_cache="$(($(sysctl -n vm.stats.vm.v_cache_count) * hw_pagesize))"
mem_free="$(((mem_inactive + mem_unused + mem_cache) / 1024 / 1024))"
;; ;;
"MINIX") "MINIX")
mem_free="$(top -d 1 | awk -F ',' '/^Memory:/ {print $2}')" mem_free="$(top -d 1 | awk -F ',' '/^Memory:/ {print $2}')"
@ -1422,19 +1448,6 @@ get_song() {
get_resolution() { get_resolution() {
case "$os" in case "$os" in
"Linux" | "BSD" | "Solaris" | "MINIX" | "AIX")
if type -p xrandr >/dev/null; then
case "$refresh_rate" in
"on") resolution="$(xrandr --nograb --current | awk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')" ;;
"off") resolution="$(xrandr --nograb --current | awk '/\*/ {printf $1 ", "}')" ;;
esac
resolution="${resolution//\*}"
elif type -p xdpyinfo >/dev/null; then
resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')"
fi
;;
"Mac OS X") "Mac OS X")
if type -p screenresolution >/dev/null; then if type -p screenresolution >/dev/null; then
resolution="$(screenresolution get 2>&1 | awk '/Display/ {printf $6 "Hz, "}')" resolution="$(screenresolution get 2>&1 | awk '/Display/ {printf $6 "Hz, "}')"
@ -1479,6 +1492,19 @@ get_resolution() {
[[ "$refresh_rate" == "off" ]] && resolution="${resolution/ @*}" [[ "$refresh_rate" == "off" ]] && resolution="${resolution/ @*}"
;; ;;
*)
if type -p xrandr >/dev/null; then
case "$refresh_rate" in
"on") resolution="$(xrandr --nograb --current | awk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')" ;;
"off") resolution="$(xrandr --nograb --current | awk '/\*/ {printf $1 ", "}')" ;;
esac
resolution="${resolution//\*}"
elif type -p xdpyinfo >/dev/null; then
resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')"
fi
;;
esac esac
resolution="${resolution%,*}" resolution="${resolution%,*}"
@ -1660,16 +1686,20 @@ get_term() {
# Check $PPID for terminal emulator. # Check $PPID for terminal emulator.
while [[ -z "$term" ]]; do while [[ -z "$term" ]]; do
parent="$(get_ppid "$parent")" if [[ "$SSH_CONNECTION" ]]; then
name="$(get_process_name "$parent")" term="$SSH_TTY"
else
case "${name// }" in parent="$(get_ppid "$parent")"
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;; [[ -z "$parent" ]] && break
"login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;; name="$(get_process_name "$parent")"
"ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;; case "${name// }" in
"gnome-terminal-") term="gnome-terminal" ;; "${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;;
*) term="${name##*/}" ;; "login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;;
esac "ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;;
"gnome-terminal-") term="gnome-terminal" ;;
*) term="${name##*/}" ;;
esac
fi
done done
# Log that the function was run. # Log that the function was run.
@ -1762,6 +1792,34 @@ get_term_font() {
[[ "$profile_filename" ]] && term_font="$(awk -F '=|,' '/Font=/ {print $2 " " $3}' "$profile_filename")" [[ "$profile_filename" ]] && term_font="$(awk -F '=|,' '/Font=/ {print $2 " " $3}' "$profile_filename")"
;; ;;
"mate-terminal")
# To get the actual config we have to create a temporarily file with the --save-config option.
mateterm_config="/tmp/mateterm.cfg"
# Ensure /tmp exists and we do not overwrite anything.
if [[ -d /tmp && ! -f "$mateterm_config" ]]; then
mate-terminal --save-config="$mateterm_config"
role="$(xprop -id "${WINDOWID}" WM_WINDOW_ROLE)"
role="${role##*= }"
term_id="$(grep -A1 "${role//\"}" "$mateterm_config")"
term_id="${term_id##*=}"
profile="$(grep -A1 "\[$term_id\]" "$mateterm_config")"
profile="${profile##*=}"
rm -f "$mateterm_config"
if [[ "$(gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/"${profile}"/ use-system-font)" == "true" ]]; then
term_font="$(gsettings get org.mate.interface monospace-font-name)"
else
term_font="$(gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/"${profile}"/ font)"
fi
term_font="$(trim_quotes "$term_font")"
fi
;;
"mintty") "mintty")
term_font="$(awk -F '=' '!/^($|#)/ && /Font/ {printf $2; exit}' "${HOME}/.minttyrc")" term_font="$(awk -F '=' '!/^($|#)/ && /Font/ {printf $2; exit}' "${HOME}/.minttyrc")"
;; ;;
@ -2224,7 +2282,29 @@ get_image_source() {
get_wallpaper() { get_wallpaper() {
case "$os" in case "$os" in
"Linux" | "BSD" | "Solaris" | "MINIX" | "AIX") "Mac OS X")
image="$(osascript -e 'tell application "System Events" to picture of current desktop')"
;;
"Windows")
case "$distro" in
"Windows XP")
case "$kernel_name" in
"CYGWIN"*) image="/cygdrive/c/Documents and Settings/${USER}" ;;
"MSYS2"* | "MINGW*") image="/c/Documents and Settings/${USER}" ;;
esac
image+="/Local Settings/Application Data/Microsoft"
image+="/Wallpaper1.bmp"
;;
"Windows"*)
image="$APPDATA/Microsoft/Windows/Themes"
image+="/TranscodedWallpaper.jpg"
;;
esac
;;
*)
# Get DE if user has disabled the function. # Get DE if user has disabled the function.
((de_run != 1)) && get_de ((de_run != 1)) && get_de
@ -2255,28 +2335,6 @@ get_wallpaper() {
image="${image/'file://'}" image="${image/'file://'}"
image="$(trim_quotes "$image")" image="$(trim_quotes "$image")"
;; ;;
"Mac OS X")
image="$(osascript -e 'tell application "System Events" to picture of current desktop')"
;;
"Windows")
case "$distro" in
"Windows XP")
case "$kernel_name" in
"CYGWIN"*) image="/cygdrive/c/Documents and Settings/${USER}" ;;
"MSYS2"* | "MINGW*") image="/c/Documents and Settings/${USER}" ;;
esac
image+="/Local Settings/Application Data/Microsoft"
image+="/Wallpaper1.bmp"
;;
"Windows"*)
image="$APPDATA/Microsoft/Windows/Themes"
image+="/TranscodedWallpaper.jpg"
;;
esac
;;
esac esac
# If image is an xml file, don't use it. # If image is an xml file, don't use it.
@ -2297,6 +2355,9 @@ get_w3m_img_path() {
elif [[ -x "/usr/libexec64/w3m/w3mimgdisplay" ]]; then elif [[ -x "/usr/libexec64/w3m/w3mimgdisplay" ]]; then
w3m_img_path="/usr/libexec64/w3m/w3mimgdisplay" w3m_img_path="/usr/libexec64/w3m/w3mimgdisplay"
elif [[ -x "/usr/local/libexec/w3m/w3mimgdisplay" ]]; then
w3m_img_path="/usr/local/libexec/w3m/w3mimgdisplay"
else else
err "Image: w3m-img wasn't found on your system" err "Image: w3m-img wasn't found on your system"
fi fi
@ -2534,7 +2595,7 @@ display_image() {
printf "%b\n" "0;1;$xoffset;$yoffset;$width;$height;;;;;$image\n4;\n3;" |\ printf "%b\n" "0;1;$xoffset;$yoffset;$width;$height;;;;;$image\n4;\n3;" |\
"${w3m_img_path:-false}" -bg "$background_color" >/dev/null & 2>&1 || to_off "Image: w3m-img failed to display the image." "${w3m_img_path:-false}" -bg "$background_color" >/dev/null & 2>&1 || to_off "Image: w3m-img failed to display the image."
zws=" " zws="\xE2\x80\x8B\x20"
;; ;;
esac esac
} }
@ -2741,11 +2802,11 @@ get_underline() {
get_line_break() { get_line_break() {
# Print it directly. # Print it directly.
printf "%s\n" "${zws}" printf "%b\n" "${zws}"
# Calculate info height. # Calculate info height.
((++info_height)) ((++info_height))
line_breaks+=$'\n' line_breaks+="\n"
# Tell info() that we printed manually. # Tell info() that we printed manually.
prin=1 prin=1
@ -2868,6 +2929,11 @@ get_distro_colors() {
ascii_file="archlabs" ascii_file="archlabs"
;; ;;
*"XFerience"*)
set_colors 6 6 7 1
ascii_file="arch_xferience"
;;
"Arch"*) "Arch"*)
set_colors 6 6 7 1 set_colors 6 6 7 1
ascii_file="arch" ascii_file="arch"
@ -3063,6 +3129,11 @@ get_distro_colors() {
ascii_file="korora" ascii_file="korora"
;; ;;
"KSLinux"*)
set_colors 4 7 1
ascii_file="kslinux"
;;
"Kubuntu"*) "Kubuntu"*)
set_colors 4 7 1 set_colors 4 7 1
ascii_file="kubuntu" ascii_file="kubuntu"
@ -3098,6 +3169,11 @@ get_distro_colors() {
ascii_file="manjaro" ascii_file="manjaro"
;; ;;
"Maui"*)
set_colors 6 7
ascii_file="maui"
;;
"Mer"*) "Mer"*)
set_colors 4 7 1 set_colors 4 7 1
ascii_file="mer" ascii_file="mer"
@ -3333,6 +3409,11 @@ get_distro_colors() {
ascii_file="ubuntu-gnome" ascii_file="ubuntu-gnome"
;; ;;
"Ubuntu-MATE"*)
set_colors 2 7
ascii_file="ubuntu-mate"
;;
"ubuntu_old") "ubuntu_old")
set_colors 1 7 3 set_colors 1 7 3
ascii_file="ubuntu_old" ascii_file="ubuntu_old"
@ -3358,7 +3439,7 @@ get_distro_colors() {
ascii_file="void" ascii_file="void"
;; ;;
*"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* | "Windows 10"*) *"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* | "Windows 10"* | "windows10" | "windows8" )
set_colors 6 7 set_colors 6 7
ascii_file="windows10" ascii_file="windows10"
;; ;;
@ -3554,7 +3635,7 @@ get_user_config() {
config_file="${XDG_CONFIG_HOME}/neofetch/config" config_file="${XDG_CONFIG_HOME}/neofetch/config"
elif [[ -f "/etc/neofetch/config" ]]; then elif [[ -f "/etc/neofetch/config" ]]; then
cp "/usr/share/neofetch/config" "${XDG_CONFIG_HOME}/neofetch" cp "/etc/neofetch/config" "${XDG_CONFIG_HOME}/neofetch"
config_file="${XDG_CONFIG_HOME}/neofetch/config" config_file="${XDG_CONFIG_HOME}/neofetch/config"
elif [[ -f "/usr/local/etc/neofetch/config" ]]; then elif [[ -f "/usr/local/etc/neofetch/config" ]]; then
@ -3734,11 +3815,10 @@ old_options() {
cache_uname() { cache_uname() {
# Cache the output of uname so we don't # Cache the output of uname so we don't
# have to spawn it multiple times. # have to spawn it multiple times.
uname=($(uname -srm)) uname=($(uname -sr))
kernel_name="${uname[0]}" kernel_name="${uname[0]}"
kernel_version="${uname[1]}" kernel_version="${uname[1]}"
machine_arch="${uname[2]}"
} }
convert_time() { convert_time() {