Compare commits

..

4 Commits

Author SHA1 Message Date
Dylan Araps
c902c2d69e general: Fix travis 2017-12-23 22:35:25 +11:00
Dylan Araps
efa9ff6726 gpu [linux]: Add clock speed 2017-12-23 22:28:13 +11:00
Dylan Araps
0e59d6c041 gpu [linux]: Add clock speed 2017-12-23 22:25:13 +11:00
Dylan Araps
8e29cd00b3 gpu [linux]: Add clock speed 2017-12-23 22:20:50 +11:00
17 changed files with 138 additions and 679 deletions

View File

@@ -6,86 +6,51 @@
- [**@dawidd6**](https://github.com/dawidd6)
- [**@MitchWeaver**](https://github.com/MitchWeaver)
- [**@StarryTony**](https://github.com/StarryTony)
- [**@rage311**](https://github.com/rage311)
- [**@matoro**](https://github.com/matoro)
- [**@szfcbr**](https://github.com/szfcbr)
- [**@ArmstrongJ**](https://github.com/ArmstrongJ)
- [**@robertwolter**](https://github.com/robertwolter)
- [**@JadeMatrix**](https://github.com/JadeMatrix)
- [**@MindTooth**](https://github.com/MindTooth)
- [**@aidanharris**](https://github.com/aidanharris)
- [**@khoacao96**](https://github.com/khoacao96)
## OS
- Added support for ArchMerge.
- Added support for MagpieOS.
- Added support for PostMarketOS.
- Added support for Hyperbola GNU/Linux-libre [**@mstraube**](https://github.com/mstraube)
- Fixed detection bug with Gentoo.
- Fixed detection bug with TrueOS. [**@dawidd6**](https://github.com/dawidd6)
- Added support for macOS High Sierra. [**@yslgirl**](https://github.com/yslgirl)
- Added support for Container Linux by CoreOS. [**@chrisweeksnz**](https://github.com/chrisweeksnz)
- Added support for 2017 iOS devices. [**@iandrewt**](https://github.com/iandrewt)
- Added support for LEDE. [**@dawidd6**](https://github.com/dawidd6)
- Added support for Pop!\_OS. [**@jliles**](https://github.com/jliles)
- Added support for Lunar Linux.
- Added support for 32-bit IRIX. [**@szfcbr**](https://github.com/szfcbr)
- Added support for FreeMINT. [**@ArmstrongJ**](https://github.com/ArmstrongJ)
- Added support for Anarchy Linux. [**@robertwolter**](https://github.com/robertwolter)
- Added support for Calculate Linux. [**@robertwolter**](https://github.com/robertwolter)
- Added support for NuTyX. [**@robertwolter**](https://github.com/robertwolter)
- Added suport for openSUSE Tumbleweed. [**@robertwolter**](http://github.com/robertwolter)
- Fixed detection bug with Gentoo.
- Fixed detection bug with OpenWRT. [**@dawidd6**](https://github.com/dawidd6)
- Fixed detection bug with LEDE. [**@dawidd6**](https://github.com/dawidd6)
- Fixed detection bug with TrueOS. [**@dawidd6**](https://github.com/dawidd6)
- Fixed detection bug with Windows Subsystem for Linux and Crouton when an OS without lsb_release is installed.
- Fixed ChromeOS detection.
## General
- Added more info to verbose mode for debugging.
- Fixed bug in prompt location calculation.
- Fixed prompt bug in OpenBSD.
- Fixed broken AppleScript blocks. [**@JadeMatrix**](https://github.com/JadeMatrix)
- Fixed function not working in bash 3. [**@JadeMatrix**](https://github.com/JadeMatrix)
- Swapped sequences from `\033` to `\e`.
- Fixed Pacman name conflict with the game. [**@MitchWeaver**](https://github.com/MitchWeaver)
- Removed the last `echo` in the script.
- Fixed typo. [**@khoacao96**](https://github.com/khoacao96)
## Ascii
- Added color updates for Kubuntu logo. **Maulik Mistry**
- Added new DragonflyBSD log. [**@MitchWeaver**](https://github.com/MitchWeaver)
## Images
- [MacOS/iTerm2] Fixed thumbnail not appearing. [**@StarryTony**](https://github.com/StarryTony)
- Fixed bug with getting wallpaper from feh.
- Fixed bug with getting wallpaper from feh.
- Added `pixterm` backend.
- Don't force resolution in `catimg`.
## Info
**Desktop Environment**
- Added GNOME version.
- Added support for TDE.
**Window Manager**
- Added support for most (*if not all*) current Wayland compositors/window manager's.
- Added support for some non-EWMH window managers.
- [macOS] Fixed `chunkwm` being detected as `Kwm`. [**@iandrewt**](https://github.com/iandrewt)
**Window Manager Theme**
- Fixed `sawfish` detection.
- [macOS] Now detects Light/Dark theme. [**@JadeMatrix**](https://github.com/JadeMatrix)
**Install Date**
@@ -99,22 +64,15 @@
- [linux] Detect the correct temperature file to use.
- [windows] Removed `$temp` usage as it's an envar.
- [OpenBSD] Fixed CPU temperature that fails to appear in some systems. [**@rage311**](https://github.com/rage311)
**GPU**
- [linux] Added driver version to NVIDIA output.
- [linux] Added driver version to Intel output.
- [macOS] Added NVIDIA support. [**@iandrewt**](https://github.com/iandrewt)
**Memory**
- [OpenBSD] Fixed memory usage values. [**@rage311**](https://github.com/rage311)
**Package Manager**
- Added detection for Sabotage Linux's `butch` [**@MitchWeaver**](https://github.com/MitchWeaver)
- Changed `pacman` detection to fix issues in other distros. [**@MitchWeaver**](https://github.com/MitchWeaver)
**Resolution**
@@ -122,9 +80,7 @@
**Song**
- Added option to manually specify the player to use.
- Added support for Elisa. [**@mstraube**](https://github.com/mstraube)
- macOS detection is now more reliable. [**@JadeMatrix**](https://github.com/JadeMatrix)
**Model**
@@ -133,18 +89,3 @@
**Disk**
- Update Haiku's detection. [**@dawidd6**](https://github.com/dawidd6)
**Battery**
- Fixed Windows detection. [**@matoro**](https://github.com/matoro)
**Shell**
- Added support for `tcsh`. [**@szfcbr**](https://github.com/szfcbr)
**Terminal Font**
- Added more paths for Alacritty.
- Added font support for Kitty. [**@MindTooth**](https://github.com/MindTooth)
- Fixed Kitty `font_size` regex. [**@aidanharris**](https://github.com/aidanharris)
- Added support for `XTerm.vt11.facename`. [**@aidanharris**](https://github.com/aidanharris)

View File

@@ -1,28 +1,22 @@
# Neofetch
<a href="https://repology.org/metapackage/neofetch">
<img src="https://repology.org/badge/vertical-allrepos/neofetch.svg" alt="Packaging status" align="right" height="400px">
</a>
[![Gitter](https://badges.gitter.im/dylanaraps/fetch.svg)](https://gitter.im/dylanaraps/fetch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Build Status](https://travis-ci.org/dylanaraps/neofetch.svg?branch=master)](https://travis-ci.org/dylanaraps/neofetch)
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.md)
[![Latest release](https://img.shields.io/github/release/dylanaraps/neofetch.svg)](https://github.com/dylanaraps/neofetch/releases)
[![Donate](https://img.shields.io/badge/donate-patreon-yellow.svg)](https://www.patreon.com/dyla)
Neofetch is a CLI system information tool written in BASH. Neofetch displays information about your system next to an image, your OS logo, or any ASCII file of your choice. The main purpose of Neofetch is to be used in screenshots to show other users what OS/Distro you're running, what Theme/Icons you're using etc.
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 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`, `IRIX`, `FreeMint`, 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`, `IRIX`, and `Windows (Cygwin/MSYS2/MinGW/Windows 10 Linux subsystem)`.
For more information:
**https://github.com/dylanaraps/neofetch/wiki**
<img src="https://i.imgur.com/lUrkQBN.png" alt="neofetch" align="right" width="434px">
<img src="https://i.imgur.com/GFmC5Ad.png" alt="neofetch" width="434px">
![neofetch screenshot](https://u.teknik.io/KlBsD.png)
## Dependencies
@@ -95,6 +89,3 @@ Donations will allow me to spend more time working on `neofetch`.
If you like `neofetch` and want to give back in some way you can donate here:
**https://patreon.com/dyla**
<sup><sub>hey rtexel</sub></sup>

View File

@@ -1,28 +0,0 @@
${c2}..${c1}
${c2}..${c1}
${c2}:..${c1}
${c2}:+++.${c1}
.:::++${c2}++++${c1}+::.
.:+######${c2}++++${c1}######+:.
.+#########${c2}+++++${c1}##########:.
.+##########${c2}+++++++${c1}##${c2}+${c1}#########+.
+###########${c2}+++++++++${c1}############:
+##########${c2}++++++${c1}#${c2}++++${c1}#${c2}+${c1}###########+
+###########${c2}+++++${c1}###${c2}++++${c1}#${c2}+${c1}###########+
:##########${c2}+${c1}#${c2}++++${c1}####${c2}++++${c1}#${c2}+${c1}############:
###########${c2}+++++${c1}#####${c2}+++++${c1}#${c2}+${c1}###${c2}++${c1}######+
.##########${c2}++++++${c1}#####${c2}++++++++++++${c1}#######.
.##########${c2}+++++++++++++++++++${c1}###########.
#####${c2}++++++++++++++${c1}###${c2}++++++++${c1}#########+
:###${c2}++++++++++${c1}#########${c2}+++++++${c1}#########:
+######${c2}+++++${c1}##########${c2}++++++++${c1}#######+
+####${c2}+++++${c1}###########${c2}+++++++++${c1}#####+
:##${c2}++++++${c1}############${c2}++++++++++${c1}##:
.${c2}++++++${c1}#############${c2}++++++++++${c1}+.
:${c2}++++${c1}###############${c2}+++++++${c1}::
.${c2}++. .:+${c1}##############${c2}+++++++${c1}..
${c2}.:.${c1} ..::++++++::..:${c2}++++${c1}+.
${c2}.${c1} ${c2}.:+++${c1}.
${c2}.:${c1}:
${c2}..${c1}
${c2}..${c1}

View File

@@ -1,20 +0,0 @@
${c1} y:
sMN-
+MMMm`
/MMMMMd`
:NMMMMMMy
-NMMMMMMMMs
.NMMMMMMMMMM+
.mMMMMMMMMMMMM+
oNMMMMMMMMMMMMM+
`+:-+NMMMMMMMMMMMM+
.sNMNhNMMMMMMMMMMMM/
`hho/sNMMMMMMMMMMMMMMM/
`.`omMMmMMMMMMMMMMMMMMMM+
.mMNdshMMMMd+::oNMMMMMMMMMo
.mMMMMMMMMM+ `yMMMMMMMMMs
.NMMMMMMMMM/ yMMMMMMMMMy
-NMMMMMMMMMh `mNMMMMMMMMd`
/NMMMNds+:.` `-/oymMMMm.
+Mmy/. `:smN:
/+. -o.

View File

@@ -1,20 +0,0 @@
${c1} ......
,,+++++++,.
.,,,....,,,${c2}+**+,,.${c1}
............,${c2}++++,,,${c1}
...............
......,,,........
.....+*#####+,,,*+.
.....,*###############,..,,,,,,..
......,*#################*..,,,,,..,,,..
.,,....*####################+***+,,,,...,++,
.,,..,..*#####################*,
,+,.+*..*#######################.
,+,,+*+..,########################*
.,++++++. ..+##**###################+
..... ..+##***#################*.
.,.*#*****##############*.
..,,*********#####****+.
${c2}.,++*****+++${c1}*****************${c2}+++++,.${c1}
${c2},++++++**+++++${c1}***********${c2}+++++++++,${c1}
${c2}.,,,,++++,.. .,,,,,.....,+++,.,,${c1}

View File

@@ -1,15 +1,18 @@
${c2},--, ${c1}| ${c2},--,
${c2}| `-, ${c1},^, ${c2},-' |
${c2} `, `-, ${c3}(/ \) ${c2},-' ,'
${c2} `-, `-,${c1}/ \${c2},-' ,-'
${c2} `------${c1}( )${c2}------'
${c2} ,----------${c1}( )${c2}----------,
${c2} | _,-${c1}( )${c2}-,_ |
${c2} `-,__,-' ${c1}\ /${c2} `-,__,-'
${c1} | |
| |
| |
| |
| |
| |
`|'
${c1} |
.-.
${c3} ()${c1}I${c3}()
${c1} "==.__:-:__.=="
"==.__/~|~\__.=="
"==._( Y )_.=="
${c2}.-'~~""~=--...,__${c1}\/|\/${c2}__,...--=~""~~'-.
( ..=${c1}\\=${c1}/${c2}=.. )
`'-. ,.-"`;${c1}/=\\${c2};"-.,_ .-'`
`~"-=-~` .-~` ${c1}|=|${c2} `~-. `~-=-"~`
.-~` /${c1}|=|${c2}\ `~-.
.~` / ${c1}|=|${c2} \ `~.
.-~` .' ${c1}|=|${c2} `. `~-.
(` _,.-="` ${c1} |=|${c2} `"=-.,_ `)
`~"~"` ${c1} |=|${c2} `"~"~`
${c1} /=\\
\\=/
^

View File

@@ -1,18 +0,0 @@
${c1} |
.-.
${c3} ()${c1}I${c3}()
${c1} "==.__:-:__.=="
"==.__/~|~\__.=="
"==._( Y )_.=="
${c2}.-'~~""~=--...,__${c1}\/|\/${c2}__,...--=~""~~'-.
( ..=${c1}\\=${c1}/${c2}=.. )
`'-. ,.-"`;${c1}/=\\${c2};"-.,_ .-'`
`~"-=-~` .-~` ${c1}|=|${c2} `~-. `~-=-"~`
.-~` /${c1}|=|${c2}\ `~-.
.~` / ${c1}|=|${c2} \ `~.
.-~` .' ${c1}|=|${c2} `. `~-.
(` _,.-="` ${c1} |=|${c2} `"=-.,_ `)
`~"~"` ${c1} |=|${c2} `"~"~`
${c1} /=\\
\\=/
^

View File

@@ -1,4 +0,0 @@
${c2}(\${c3}"${c2}/)
${c2}(/${c1}|${c2}\)
${c1} |
|

View File

@@ -1,15 +0,0 @@
${c1} ##
## #########
#### ##
#### #### ##
#### #### ## ##
#### #### ## ##
#### #### ## ## ##
#### ######
###### ## ## ####
#### ################
#### ## ####
## #### ######
## ## #### ####
## ## ## ## ## ####
#### ## ## ##

View File

@@ -1,16 +0,0 @@
${c1} WW
KX W
WO0W NX0O
NOO0NW WNXK0OOKW
W0OOOOOOOOOOOOKN
N0OOOOOOO0KXW
WNXXXNW
NXK00000KN
WNK0OOOOOOOOOO0W
NK0OOOOOOOOOOOOOO0W
X0OOOOOOO00KK00OOOOOK
X0OOOO0KNWW WX0OO0W
X0OO0XNW KOOW
N00KNW KOW
NKXN W0W
WW W

View File

@@ -1,20 +0,0 @@
${c1} ;00000 :000Ol
.x00kk00: O0kk00k;
l00: :00. o0k :O0k.
.k0k. x${c2}d$dddd${c1}k' .d00;
k0k. ${c2}.dddddl ${c1}o00,
o00. ${c2}':cc:. ${c1}d0O
.00l ,00.
l00. d0x
k0O .:k0o
O0k ;dO0000d.
k0O .O0O${c2}xxxxk${c1}00:
o00. k0O${c2}dddddd${c1}occ
'00l x0O${c2}dddddo${c3};..${c1}
x00. .x00${c2}kxxd${c3}:..${c1}
.O0x .:oxxx${c4}Okl.${c1}
.x0d ${c4},xx,${c1}
.:o. ${c4}.xd ckd${c1}
.. ${c4}dxl .xx;
:xxolldxd'
;oxdl.

View File

@@ -1,23 +0,0 @@
${c1} .
.
...
...
.... .........--.
..-++-----....--++++++---.
.-++++++-. .-++++++++++++-----..
.--... .++..-+++--.....-++++++++++--..
. .-+-. .**- .... ..-+----..
.+++. .*+. + -++-----.
.+++++- ++. .*+. .....-+++-----.
-+++-++. .+. .-+***++***++--++++. .
-+-. -- -. -*- ...... ..--.
.-. .+- . -+.
. .+- +.
-- --
-+----. .-
-++-.+. .
.++. --
+. ----.
. .+. ..
- .
.

View File

@@ -1,17 +0,0 @@
${c1} ss
`hMMh`
.dMMMMd.
-NMMMMMMN-
/MMMMMMMMMN/
hMMMMMMMMMMMo
y+`mMMmdNMMMMMMy
`dMM-.-:- .mMMMMMMh`
.mMMMMMMd` `dMMMMMMm.
:NMMMMMMy yMMMMMMN:
/MMMMMMMo oMMMmdmN/
oMMMMMMM/ /MN.-/:-.
`yMMMMMMN- -:.NMMMMy`
`dMMMMMMM- -/////////////dMMMMMMd`
-mMMMMMMMMN+`sMMMMMMMMMMMMMMMMMMMMm-
:NMMMMMMMMMMM/ yMMMMMMMMMMMMMMMMMMMMN:
+MMMMMMMMMMMh.:mMMMMMMMMMMMMMMMMMMMMMMM+

View File

@@ -1,13 +0,0 @@
${c2} ......
.,cdxxxoc,. .:kKMMMNWMMMNk:.
cKMMN0OOOKWMMXo. ; ;0MWk:. .:OMMk.
;WMK;. .lKMMNM, :NMK, .OMW;
cMW; 'WMMMN ,XMK, oMM'
.MMc ..;l. xMN: KM0
'MM. 'NMO oMM
.MM, .kMMl xMN
KM0 .kMM0. .dl:,.. .WMd
.XM0. ,OMMK, OMMMK. .XMK
oWMO:. .;xNMMk, NNNMKl. .xWMx
:ONMMNXMMMKx; . ,xNMWKkxllox0NMWk,
..... .:dOOXXKOxl,

View File

@@ -348,45 +348,6 @@ disk_subtitle="mount"
# Song
# Manually specify a music player.
#
# Default: 'auto'
# Values: 'auto', 'player-name'
# Flag: --music_player
#
# Available values for 'player-name':
#
# Google Play
# Spotify
# amarok
# audacious
# banshee
# bluemindo
# clementine
# cmus
# deadbeef
# deepin-music
# elisa
# exaile
# gnome-music
# guayadeque
# iTunes$
# juk
# lollypop
# mocp
# mopidy
# mpd
# pogo
# pragha
# qmmp
# quodlibet
# rhythmbox
# spotify
# tomahawk
# xmms2d
# yarock
music_player="auto"
# Print the Artist and Title on separate lines
#
# Default: 'off'
@@ -684,7 +645,7 @@ crop_offset="center"
# --size
image_size="auto"
# Gap between image and text
# Ggap between image and text
#
# Default: '3'
# Values: 'num', '-num'
@@ -768,4 +729,4 @@ stdout="off"
#
# NOTE: Don't change this value, neofetch reads this to determine
# how to handle backwards compatibility.
config_version="3.4.0"
config_version="3.3.1-git"

461
neofetch
View File

@@ -9,7 +9,7 @@
# https://github.com/dylanaraps/
# Neofetch version.
version="3.4.0"
version="3.3.1-git"
bash_version="${BASH_VERSION/.*}"
sys_locale="${LANG:-C}"
@@ -27,7 +27,7 @@ export PATH="/usr/xpg4/bin:/usr/sbin:/sbin:/usr/etc:/usr/libexec:${PATH}"
shopt -s nocasematch
# Reset colors and bold.
reset="\\e[0m"
reset="\033[0m"
# DETECT INFORMATION
@@ -43,8 +43,7 @@ get_os() {
"Haiku") os="Haiku" ;;
"MINIX") os="MINIX" ;;
"AIX") os="AIX" ;;
"IRIX"*) os="IRIX" ;;
"FreeMiNT") os="FreeMiNT" ;;
"IRIX64") os="IRIX" ;;
*)
printf "%s\n" "Unknown OS detected: '$kernel_name', aborting..." >&2
printf "%s\n" "Open an issue on GitHub to add support for your OS." >&2
@@ -58,7 +57,22 @@ get_distro() {
case "$os" in
"Linux" | "BSD" | "MINIX")
if [[ -f "/etc/redstar-release" ]]; then
if [[ "$(< /proc/version)" == *"Microsoft"* ||
"$kernel_version" == *"Microsoft"* ]]; then
case "$distro_shorthand" in
"on") distro="$(lsb_release -sir) [Windows 10]" ;;
"tiny") distro="Windows 10" ;;
*) distro="$(lsb_release -sd) on Windows 10" ;;
esac
elif [[ "$(< /proc/version)" == *"chrome-bot"* || -f "/dev/cros_ec" ]]; then
case "$distro_shorthand" in
"on") distro="$(lsb_release -sir) [Chrome OS]" ;;
"tiny") distro="Chrome OS" ;;
*) distro="$(lsb_release -sd) on Chrome OS" ;;
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)"
@@ -107,16 +121,8 @@ get_distro() {
elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then
distro="Android $(getprop ro.build.version.release)"
# Chrome OS doesn't conform to the /etc/*-release standard.
# While the file is a series of variables they can't be sourced
# by the shell since the values aren't quoted.
elif [[ -f "/etc/lsb-release" && "$(< /etc/lsb-release)" == *CHROMEOS* ]]; then
distro="$(awk -F '=' '/NAME|VERSION/ {printf $2 " "}' /etc/lsb-release)"
elif [[ -f "/etc/os-release" || \
-f "/usr/lib/os-release" || \
-f "/etc/openwrt_release" ]]; then
files=("/etc/os-release" "/usr/lib/os-release" "/etc/openwrt_release")
elif [[ -f "/etc/os-release" || -f "/usr/lib/os-release" ]]; then
files=("/etc/os-release" "/usr/lib/os-release")
# Source the os-release file
for file in "${files[@]}"; do
@@ -154,23 +160,6 @@ get_distro() {
[[ -f "/etc/pacbsd-release" ]] && distro="PacBSD"
fi
fi
if [[ "$(< /proc/version)" == *"Microsoft"* ||
"$kernel_version" == *"Microsoft"* ]]; then
case "$distro_shorthand" in
"on") distro+=" [Windows 10]" ;;
"tiny") distro="Windows 10" ;;
*) distro+=" on Windows 10" ;;
esac
elif [[ "$(< /proc/version)" == *"chrome-bot"* || -f "/dev/cros_ec" ]]; then
case "$distro_shorthand" in
"on") distro+=" [Chrome OS]" ;;
"tiny") distro="Chrome OS" ;;
*) distro+=" on Chrome OS" ;;
esac
fi
distro="$(trim_quotes "$distro")"
distro="${distro/'NAME='}"
;;
@@ -241,10 +230,6 @@ get_distro() {
"IRIX")
distro="IRIX ${kernel_version}"
;;
"FreeMiNT")
distro="FreeMiNT"
;;
esac
distro="${distro//Enterprise Server}"
@@ -253,7 +238,7 @@ get_distro() {
# Get OS architecture.
case "$os" in
"Solaris" | "AIX" | "Haiku" | "IRIX" | "FreeMiNT") machine_arch="$(uname -p)" ;;
"Solaris" | "AIX" | "Haiku" | "IRIX") machine_arch="$(uname -p)" ;;
*) machine_arch="$(uname -m)" ;;
esac
@@ -355,10 +340,6 @@ get_model() {
"AIX")
model="$(/usr/bin/uname -M)"
;;
"FreeMiNT")
model="$(sysctl -n hw.model)"
;;
esac
# Remove dummy OEM info.
@@ -422,7 +403,7 @@ get_uptime() {
seconds="${seconds/.*}"
;;
"Mac OS X" | "iPhone OS" | "BSD" | "FreeMiNT")
"Mac OS X" | "iPhone OS" | "BSD")
boot="$(sysctl -n kern.boottime)"
boot="${boot/'{ sec = '}"
boot="${boot/,*}"
@@ -492,9 +473,16 @@ get_uptime() {
}
get_packages() {
# Remove /usr/games from $PATH.
# This solves issues with neofetch opening the "pacman" game.
local PATH=":${PATH}:"
local PATH="${PATH/':/usr/games:'/:}"
local PATH="${PATH%:}"
local PATH="${PATH#:}"
case "$os" in
"Linux" | "BSD" | "iPhone OS" | "Solaris")
type -p paclog-pkglist >/dev/null && \
type -p pacman >/dev/null && \
packages="$(pacman -Qq --color never | wc -l)"
type -p dpkg >/dev/null && \
@@ -616,11 +604,6 @@ get_packages() {
"IRIX")
packages="$(($(versions -b | wc -l)-3))"
;;
"FreeMiNT")
type -p rpm >/dev/null && \
packages="$((packages+=$(rpm -qa | wc -l)))"
;;
esac
((packages == 0)) && unset packages
@@ -643,10 +626,6 @@ get_shell() {
shell="${shell/version}"
;;
"tcsh")
shell+="$("$SHELL" -c 'printf "%s" "$tcsh"')"
;;
*)
shell+="$("$SHELL" --version 2>&1)"
shell="${shell/ "${shell_name}"}"
@@ -674,21 +653,6 @@ get_de() {
esac
;;
"FreeMiNT")
get_wm
for files in /proc/*; do
case "$files" in
*thing*) de="Thing" ;;
*jinnee*) de="Jinnee" ;;
*tera*) de="Teradesk" ;;
*neod*) de="NeoDesk" ;;
*zdesk*) de="zDesk" ;;
*mdesk*) de="mDesk" ;;
esac
done
;;
*)
((wm_run != 1)) && get_wm
@@ -763,7 +727,7 @@ get_wm() {
-e "westford" \
-e "weston")"
elif [[ "$DISPLAY" && "$os" != "Mac OS X" && "$os" != "FreeMiNT" ]]; then
elif [[ "$DISPLAY" && "$os" != "Mac OS X" ]]; then
id="$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)"
id="${id##* }"
wm="$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)"
@@ -774,13 +738,6 @@ get_wm() {
# Window Maker does not set _NET_WM_NAME
[[ "$wm" =~ "WINDOWMAKER" ]] && wm="wmaker"
# Fallback for non-EWMH WMs.
[[ -z "$wm" ]] && \
wm="$(ps -e | grep -m 1 -o -F \
-e "catwm" \
-e "monsterwm" \
-e "tinywm")"
else
case "$os" in
"Mac OS X")
@@ -806,18 +763,6 @@ get_wm() {
[[ "$wm" == "blackbox" ]] && wm="bbLean (Blackbox)"
wm="${wm:+$wm, }Explorer"
;;
"FreeMiNT")
wm="Atari AES"
for files in /proc/*; do
case "$files" in
*xaaes*) wm="XaAES" ;;
*myaes*) wm="MyAES" ;;
*naes*) wm="N.AES" ;;
geneva) wm="Geneva" ;;
esac
done
;;
esac
fi
@@ -934,19 +879,14 @@ get_wm_theme() {
;;
"Quartz Compositor")
global_preferences="${HOME}/Library/Preferences/.GlobalPreferences.plist"
wm_theme="$(PlistBuddy -c "Print AppleInterfaceStyle" "$global_preferences")"
wm_theme_color="$(PlistBuddy -c "Print AppleAquaColorVariant" "$global_preferences")"
wm_theme="$(PlistBuddy -c "Print AppleAquaColorVariant" \
"${HOME}/Library/Preferences/.GlobalPreferences.plist")"
[[ -z "$wm_theme" ]] && wm_theme="Light"
if [[ -z "$wm_theme_color" ]] || ((wm_theme_color == 1)); then
wm_theme_color="Blue"
if [[ -z "$wm_theme" ]] || ((wm_theme == 1)); then
wm_theme="Blue"
else
wm_theme_color="Graphite"
wm_theme="Graphite"
fi
wm_theme="$wm_theme_color ($wm_theme)"
;;
*"Explorer")
@@ -1099,9 +1039,8 @@ get_cpu() {
deg="${deg/C}"
;;
"OpenBSD"* | "Bitrig"*)
deg="$(sysctl hw.sensors | \
awk -F '=| degC' '/lm0.temp|cpu0.temp/ {print $2; exit}')"
deg="${deg/00/0}"
deg="$(sysctl -n hw.sensors.lm0.temp0)"
deg="${deg/ degC}"
;;
esac
;;
@@ -1165,11 +1104,6 @@ get_cpu() {
# Get CPU cores.
cores="$(sysconf NPROC_ONLN)"
;;
"FreeMiNT")
cpu="$(awk -F':' '/CPU:/ {printf $2}' /kern/cpuinfo)"
speed="$(awk -F '[:.M]' '/Clocking:/ {printf $2}' /kern/cpuinfo)"
;;
esac
# Remove un-needed patterns from cpu output.
@@ -1184,14 +1118,13 @@ get_cpu() {
cpu="${cpu//Six-Core}"
cpu="${cpu//Eight-Core}"
cpu="${cpu//, * Compute Cores}"
cpu="${cpu//Core / }"
cpu="${cpu//Core}"
cpu="${cpu//(\"AuthenticAMD\"*)}"
cpu="${cpu//with Radeon * Graphics}"
cpu="${cpu//, altivec supported}"
cpu="${cpu//FPU*}"
cpu="${cpu//Chip Revision*}"
cpu="${cpu//Technologies, Inc}"
cpu="${cpu//Core2/Core 2}"
# Trim spaces from core and speed output
cores="${cores//[[:space:]]}"
@@ -1255,8 +1188,7 @@ get_cpu_usage() {
"Haiku") cores="$(sysinfo -cpu | grep -c -F 'CPU #')" ;;
"iPhone OS") cores="${cpu/*\(}"; cores="${cores/\)*}" ;;
"AIX") cores="$(lparstat -i | awk -F':' '/Online Virtual CPUs/ {printf $2}')" ;;
"IRIX") cores="$(sysconf NPROC_ONLN)" ;;
"FreeMiNT") cores="$(sysctl -n hw.ncpu)"
"IRIX") cores="$(sysconf NPROC_ONLN)"
esac
fi
@@ -1280,7 +1212,7 @@ get_gpu() {
# Read GPUs into array.
IFS=$'\n'
gpus=($(lspci -mm | awk -F '\\"|\\" \\"|\\(' \
'/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END{for(i in a)
'/"Display|"3D|"VGA/ {a[$0] = $1 $3 " " $4} END{for(i in a)
{if(!seen[a[i]]++) print a[i]}}'))
IFS="$old_ifs"
@@ -1312,6 +1244,10 @@ get_gpu() {
;;
*"intel"*)
# (sorry)
freq="$(< /sys/devices/pci0000:00/0000:\
"${gpu/ *}"/drm/card0/gt_cur_freq_mhz)"
type -p glxinfo >/dev/null && \
gpu="$(glxinfo | grep "Device:.*Intel")"
@@ -1319,7 +1255,6 @@ get_gpu() {
gpu="${gpu/'(R)'}"
gpu="${gpu/'Corporation'}"
gpu="${gpu/ \(*}"
gpu="${gpu/Integrated Graphics Controller}"
[[ -z "$(trim "$gpu")" ]] && gpu="Intel Integrated Graphics"
;;
@@ -1335,7 +1270,8 @@ get_gpu() {
gpu="${gpu/Intel }"
fi
prin "${subtitle:+${subtitle}${gpu_name}}" "$gpu"
prin "${subtitle:+${subtitle}${gpu_name}}" "$gpu ${freq:+@ ${freq}Mhz}"
((++gpu_num))
done
@@ -1480,11 +1416,7 @@ get_memory() {
# Mem used.
case "$kernel_name" in
"OpenBSD"*)
mem_used="$(vmstat | awk 'END{printf $3}')"
mem_used="${mem_used/M}"
;;
"OpenBSD"*) mem_used="$(($(vmstat | awk 'END{printf $4}') / 1024))" ;;
*) mem_used="$((mem_total - mem_free))" ;;
esac
;;
@@ -1515,16 +1447,6 @@ get_memory() {
mem_free="$((mem_stat[5] / 1024))"
mem_used="$((mem_total - mem_free))"
;;
"FreeMiNT")
mem="$(awk -F ':|kB' '/MemTotal:|MemFree:/ {printf $2, " "}' /kern/meminfo)"
mem_free="${mem/* }"
mem_total="${mem/ *}"
mem_used="$((mem_total - mem_free))"
mem_total="$((mem_total / 1024))"
mem_used="$((mem_used / 1024))"
;;
esac
memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}"
@@ -1537,39 +1459,10 @@ get_memory() {
}
get_song() {
player="$(ps -e | grep -m 1 -o \
-e "Google Play" \
-e "Spotify" \
-e "amarok" \
-e "audacious" \
-e "banshee" \
-e "bluemindo" \
-e "clementine" \
-e "cmus" \
-e "deadbeef" \
-e "deepin-music" \
-e "elisa" \
-e "exaile" \
-e "gnome-music" \
-e "guayadeque" \
-e "iTunes$" \
-e "juk" \
-e "lollypop" \
-e "mocp" \
-e "mopidy" \
-e "mpd" \
-e "pogo" \
-e "pragha" \
-e "qmmp" \
-e "quodlibet" \
-e "rhythmbox" \
-e "spotify" \
-e "tomahawk" \
-e "xmms2d" \
-e "yarock")"
[[ "$music_player" && "$music_player" != "auto" ]] && \
player="$music_player"
player="$(ps x | awk '!(/ awk|Helper|Cache|ibus|indicator/) && /mpd|mopidy|cmus|mocp|spotify|\
Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|\
xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|\
guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk|pogo|elisa/ {printf $5 " " $6; exit}')"
get_song_dbus() {
# Multiple players use an almost identical dbus command to get the information.
@@ -1621,29 +1514,15 @@ get_song() {
"Linux") get_song_dbus "spotify" ;;
"Mac OS X")
song="$(osascript <<END
if application "Spotify" is running then
tell application "Spotify"
artist of current track as string & \
" - " & name of current track as string
end tell
end if
END
)"
song="$(osascript -e 'tell application "Spotify" to artist of current track as \
string & " - " & name of current track as string')"
;;
esac
;;
"itunes"*)
song="$(osascript <<END
if application "iTunes" is running then
tell application "iTunes"
artist of current track as string & \
" - " & name of current track as string
end tell
end if
END
)"
song="$(osascript -e 'tell application "iTunes" to artist of current track as \
string & " - " & name of current track as string')"
;;
"banshee"*)
@@ -1956,10 +1835,6 @@ get_term() {
*) term="${TERM_PROGRAM/\.app}" ;;
esac
# Most likely TosWin2 on FreeMiNT - quick check
[[ "$TERM" == "tw52" || "$TERM" == "tw100" ]] && \
term="TosWin2"
# Check $PPID for terminal emulator.
while [[ -z "$term" ]]; do
if [[ "$SSH_CONNECTION" ]]; then
@@ -1991,28 +1866,16 @@ get_term_font() {
case "$term" in
"alacritty"*)
if [[ -f "${XDG_CONFIG_HOME}/alacritty.yml" ]]; then
alacritty_file="${XDG_CONFIG_HOME}/alacritty.yml"
elif [[ -f "${XDG_CONFIG_HOME}/alacritty/alacritty.yml" ]]; then
alacritty_file="${XDG_CONFIG_HOME}/alacritty/alacritty.yml"
elif [[ -f "${HOME}/.alacritty.yml" ]]; then
alacritty_file="${HOME}/.alacritty.yml"
fi
term_font="$(awk -F ':|#' '/normal:/ {getline; print}' \
"$alacritty_file")"
"${XDG_CONFIG_HOME}/alacritty/alacritty.yml")"
term_font="${term_font/*family:}"
term_font="${term_font/$'\n'*}"
term_font="${term_font/\#*}"
;;
"Apple_Terminal")
term_font="$(osascript <<END
tell application "Terminal" to font name of window frontmost
END
)"
term_font="$(osascript -e 'tell application "Terminal" to \
font name of window frontmost')"
;;
"iTerm2")
@@ -2023,11 +1886,8 @@ END
# See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg
local current_profile_name profiles_count profile_name diff_font none_ascii
current_profile_name="$(osascript <<END
tell application "iTerm2" to profile name \
of current session of current window
END
)"
current_profile_name="$(osascript -e 'tell application "iTerm2" to profile name \
of current session of current window')"
# Warning: Dynamic profiles are not taken into account here!
# https://www.iterm2.com/documentation-dynamic-profiles.html
@@ -2077,26 +1937,6 @@ END
term_font="$(trim_quotes "$term_font")"
;;
"kitty"*)
if [[ -f "${KITTY_CONFIG_DIRECTORY}/kitty/kitty.conf" ]]; then
kitty_file="${KITTY_CONFIG_DIRECTORY}/kitty/kitty.conf"
elif [[ -f "${XDG_CONFIG_HOME}/kitty/kitty.conf" ]]; then
kitty_file="${XDG_CONFIG_HOME}/kitty/kitty.conf"
elif [[ -f "${HOME}/.config/kitty/kitty.conf" ]]; then
kitty_file="${HOME}/.config/kitty/kitty.conf"
elif [[ -f "${HOME}/Library/Preferences/kitty/kitty.conf" ]]; then
kitty_file="${HOME}/Library/Preferences/kitty/kitty.conf"
fi
term_font="$(awk '/font_family/ { $1 = ""; gsub(/^[[:space:]]/, ""); font = $0 } \
/\s?font_size\s/ { size = $2 } END { print font " " size}' \
"${kitty_file}")"
;;
"konsole"*)
# Get Process ID of current konsole window / tab
child="$(get_ppid "$$")"
@@ -2194,24 +2034,12 @@ END
;;
"urxvt" | "urxvtd" | "rxvt-unicode" | "xterm")
xrdb="$(xrdb -query)"
term_font="$(grep -i "${term/d}\**\.*font" <<< "$xrdb")"
term_font="$(grep -i "${term/d}\**\.*font" < <(xrdb -query))"
term_font="${term_font/*"*font:"}"
term_font="${term_font/*".font:"}"
term_font="${term_font/*"*.font:"}"
term_font="$(trim "$term_font")"
if [[ -z "$term_font" && "$term" == "xterm" ]]; then
term_font="$(grep -E '^XTerm.vt100.faceName' <<< "$xrdb")"
term_font="${term_font/*"faceName:"}"
fi
# xft: isn't required at the beginning so we prepend it if it's missing
if [[ "${term_font:0:1}" != "-" && \
"${term_font:0:4}" != "xft:" ]]; then
term_font="xft:$term_font"
fi
# Xresources has two different font formats, this checks which
# one is in use and formats it accordingly.
case "$term_font" in
@@ -2366,7 +2194,7 @@ get_battery() {
"Windows")
battery="$(wmic Path Win32_Battery get EstimatedChargeRemaining)"
battery="${battery/EstimatedChargeRemaining}"
batttery="$(trim "$battery")%"
[[ "$(trim "$battery")" ]] && battery="%"
;;
"Haiku")
@@ -2533,9 +2361,9 @@ get_cols() {
# Generate the string.
for ((start; start<=end; start++)); do
case "$start" in
[0-6]) blocks+="${reset}\\e[3${start}m\\e[4${start}m${block_width}" ;;
7) blocks+="${reset}\\e[3${start}m\\e[4${start}m${block_width}" ;;
*) blocks2+="\\e[38;5;${start}m\\e[48;5;${start}m${block_width}" ;;
[0-6]) blocks+="${reset}\033[3${start}m\033[4${start}m${block_width}" ;;
7) blocks+="${reset}\033[3${start}m\033[4${start}m${block_width}" ;;
*) blocks2+="\033[38;5;${start}m\033[48;5;${start}m${block_width}" ;;
esac
done
@@ -2548,21 +2376,16 @@ get_cols() {
# Add newlines to the string.
cols="${cols%%'nl'}"
cols="${cols//nl/\\n\\\e[${text_padding}C${zws}}"
cols="${cols//nl/\\n\\033[${text_padding}C${zws}}"
# Add block height to info height.
info_height="$((info_height+=block_height+2))"
printf "%b\n" "\\e[${text_padding}C${zws}${cols}"
printf "%b\n" "\033[${text_padding}C${zws}${cols}"
fi
unset -v blocks blocks2 cols
# TosWin2 on FreeMiNT is terrible at this,
# so we'll reset colors arbitrarily.
[[ "$term" == "TosWin2" ]] && \
printf "%b\n" "\\e[30;47m"
# Tell info() that we printed manually.
prin=1
}
@@ -2615,7 +2438,7 @@ image_backend() {
esac
# Set cursor position next image/ascii.
[[ "$image_backend" != "off" ]] && printf "%b" "\\e[${lines:-0}A\\e[9999999D"
[[ "$image_backend" != "off" ]] && printf "%b" "\033[${lines:-0}A\033[9999999D"
}
get_ascii() {
@@ -2703,10 +2526,7 @@ get_image_source() {
get_wallpaper() {
case "$os" in
"Mac OS X")
image="$(osascript <<END
tell application "System Events" to picture of current desktop
END
)"
image="$(osascript -e 'tell application "System Events" to picture of current desktop')"
;;
"Windows")
@@ -2806,14 +2626,14 @@ get_term_size() {
# so we have to use a slightly different sequence to
# get the terminal size.
if [[ -n "$TMUX" ]]; then
printf "%b" "\\ePtmux;\\e\\e[14t\\e\\e[c\\e\\"
printf "%b" "\033Ptmux;\033\033[14t\033\033[c\033\\"
read_flags=(-d c)
elif [[ "$image_backend" == "tycat" ]]; then
printf "%b" "\\e}qs\000"
printf "%b" "\033}qs\000"
else
printf "%b" "\\e[14t\\e[c"
printf "%b" "\033[14t\033[c"
read_flags=(-d c)
fi
@@ -2832,7 +2652,7 @@ get_term_size() {
term_width="${term_size[2]/t*}"
fi
# Get terminal width/height if \\e[14t is unsupported.
# Get terminal width/height if \033[14t is unsupported.
if [[ -z "$term_width" ]] || (( "$term_width" < 50 )); then
if type -p xdotool >/dev/null 2>&1; then
current_window="$(xdotool getactivewindow)"
@@ -3002,7 +2822,7 @@ display_image() {
;;
"catimg")
catimg -w "$((width * 2 / font_width))" "$image" ||\
catimg -w "$((width * 2 / font_width))" -r 0 "$image" ||\
to_off "Image: catimg failed to display the image."
;;
@@ -3030,10 +2850,10 @@ display_image() {
"iterm2")
image="$(base64 < "$image")"
iterm_cmd="\\e]1337;File=width=${width}px;height=${height}px;inline=1:${image}"
iterm_cmd="\033]1337;File=width=${width}px;height=${height}px;inline=1:${image}"
# Tmux requires an additional escape sequence for this to work.
[[ -n "$TMUX" ]] && iterm_cmd="\\ePtmux;\\e${iterm_cmd}\\e\\"
[[ -n "$TMUX" ]] && iterm_cmd="\033Ptmux;\033${iterm_cmd}\033\\"
printf "%b\a\n" "$iterm_cmd"
;;
@@ -3069,7 +2889,7 @@ to_ascii() {
get_ascii
# Set cursor position next image/ascii.
printf "%b" "\\e[${lines:-0}A\\e[9999999D"
printf "%b" "\033[${lines:-0}A\033[9999999D"
}
to_off() {
@@ -3229,7 +3049,7 @@ prin() {
string="${2:-$1}"
local subtitle_color="$info_color"
fi
string="$(trim "${string//$'\\e[0m'}")"
string="$(trim "${string//$'\033[0m'}")"
# Log length if it doesn't exist.
if [[ -z "$length" ]]; then
@@ -3242,7 +3062,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:+\033[${text_padding}C}${zws}${string}${reset} "
# Calculate info height.
((++info_height))
@@ -3254,7 +3074,7 @@ prin() {
get_underline() {
if [[ "$underline_enabled" == "on" ]]; then
printf -v underline "%${length}s"
printf "%b%b\n" "${text_padding:+\\e[${text_padding}C}${zws}${underline_color}" \
printf "%b%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline_color}" \
"${underline// /$underline_char}${reset} "
unset -v length
fi
@@ -3275,21 +3095,30 @@ get_line_break() {
get_bold() {
case "$ascii_bold" in
"on") ascii_bold="\\e[1m" ;;
"on") ascii_bold="\033[1m" ;;
"off") ascii_bold="" ;;
esac
case "$bold" in
"on") bold="\\e[1m" ;;
"on") bold="\033[1m" ;;
"off") bold="" ;;
esac
}
trim() {
# When a string is passed to "echo" all trailing and leading
# whitespace is removed and inside the string multiple spaces are
# condensed into single spaces.
#
# The "set -f/+f" is here so that "echo" doesn't cause any expansion
# of special characters.
#
# The whitespace trim doesn't work with multiline strings so we use
# "${1//[[:space:]]/ }" to remove newlines before we trim the whitespace.
set -f
# shellcheck disable=2048,2086
set -- $*
printf "%s\\n" "${*//[[:space:]]/ }"
# shellcheck disable=2086
builtin echo -E ${1//[[:space:]]/ }
set +f
}
@@ -3300,20 +3129,16 @@ trim_quotes() {
}
strip_sequences() {
strip="${1//$'\\e['3[0-9]m}"
strip="${strip//$'\\e['38\;5\;[0-9]m}"
strip="${strip//$'\\e['38\;5\;[0-9][0-9]m}"
strip="${strip//$'\\e['38\;5\;[0-9][0-9][0-9]m}"
strip="${1//$'\033['3[0-9]m}"
strip="${strip//$'\033['38\;5\;[0-9]m}"
strip="${strip//$'\033['38\;5\;[0-9][0-9]m}"
strip="${strip//$'\033['38\;5\;[0-9][0-9][0-9]m}"
printf "%s\n" "$strip"
}
uppercase() {
if ((bash_version >= 4)); then
printf "%s" "${1^}"
else
printf "%s" "$1"
fi
((bash_version >= 4)) && printf "%s" "${1^}"
}
# COLORS
@@ -3344,11 +3169,6 @@ get_distro_colors() {
ascii_file="amazon"
;;
"Anarchy"*)
set_colors 7 4
ascii_file="anarchy"
;;
"Android"*)
set_colors 2 7
ascii_file="android"
@@ -3400,11 +3220,6 @@ get_distro_colors() {
ascii_file="arch_xferience"
;;
"ArchMerge"*)
set_colors 6 6 7 1
ascii_file="archmerge"
;;
"Arch"*)
set_colors 6 6 7 1
ascii_file="arch"
@@ -3445,11 +3260,6 @@ get_distro_colors() {
ascii_file="bunsenlabs"
;;
"Calculate"*)
set_colors 7 3
ascii_file="calculate"
;;
"CentOS"*)
set_colors 3 2 4 5 7
ascii_file="centos"
@@ -3525,16 +3335,6 @@ get_distro_colors() {
ascii_file="dracos"
;;
"dragonfly_old"*)
set_colors 1 7 3
ascii_file="dragonflybsd_old"
;;
"dragonfly_small"*)
set_colors 1 7 3
ascii_file="dragonflybsd_small"
;;
"DragonFly"*)
set_colors 1 7 3
ascii_file="dragonflybsd"
@@ -3570,12 +3370,6 @@ get_distro_colors() {
ascii_file="freebsd"
;;
"FreeMiNT"*)
# Don't explicitly set colors since
# TosWin2 doesn't reset well.
ascii_file="gem"
;;
"Frugalware"*)
set_colors 4 7 1
ascii_file="frugalware"
@@ -3631,11 +3425,6 @@ get_distro_colors() {
ascii_file="haiku"
;;
"Hyperbola"*)
set_colors 8
ascii_file="hyperbola"
;;
"Kali"*)
set_colors 4 8
ascii_file="kali"
@@ -3711,11 +3500,6 @@ get_distro_colors() {
ascii_file="mageia"
;;
"MagpieOS"*)
set_colors 2 1 3 5
ascii_file="magpieos"
;;
"Manjaro"*)
set_colors 2 7
ascii_file="manjaro"
@@ -3776,11 +3560,6 @@ get_distro_colors() {
ascii_file="nurunner"
;;
"NuTyX"*)
set_colors 4 1
ascii_file="nutyx"
;;
"OBRevenge"*)
set_colors 1 7 3
ascii_file="obrevenge"
@@ -3871,11 +3650,6 @@ get_distro_colors() {
ascii_file="porteus"
;;
"PostMarketOS"*)
set_colors 2 7
ascii_file="postmarketos"
;;
"Puppy"* | "Quirky Werewolf"* | "Precise Puppy"*)
set_colors 4 7
ascii_file="puppy"
@@ -3936,7 +3710,7 @@ get_distro_colors() {
ascii_file="scientific"
;;
"Siduction"*)
"Siduction"*)
set_colors 4 4
ascii_file="siduction"
;;
@@ -3981,11 +3755,6 @@ get_distro_colors() {
ascii_file="solaris"
;;
"openSUSE Tumbleweed"*)
set_colors 2 7
ascii_file="tumbleweed"
;;
"openSUSE"* | "open SUSE"* | "SUSE"*)
set_colors 2 7
ascii_file="suse"
@@ -4162,9 +3931,9 @@ set_text_colors() {
color() {
case "$1" in
[0-6]) printf "%b" "${reset}\\e[3${1}m" ;;
7 | "fg") printf "%b" "\\e[37m${reset}" ;;
*) printf "%b" "\\e[38;5;${1}m" ;;
[0-6]) printf "%b" "${reset}\033[3${1}m" ;;
7 | "fg") printf "%b" "\033[37m${reset}" ;;
*) printf "%b" "\033[38;5;${1}m" ;;
esac
}
@@ -4187,7 +3956,7 @@ stdout() {
}
err() {
err+="$(color 1)[!]\\e[0m $1\n"
err+="$(color 1)[!]\033[0m $1\n"
}
get_full_path() {
@@ -4364,16 +4133,11 @@ dynamic_prompt() {
return
else
[[ "$image_prompt" ]] && printf "%b\n" "$line_breaks"
lines="$((lines - info_height + 1))"
lines="$((lines - info_height))"
fi
# Set the prompt location.
if ((lines > 1)); then
case "$kernel_name" in
"OpenBSD") tput cud "$lines" ;;
*) printf "%b" "\\e[${lines}B" ;;
esac
fi
((lines > 1)) && printf "%b" "\033[${lines}B"
}
old_functions() {
@@ -4660,8 +4424,6 @@ INFO:
--ip_host url URL to query for public IP
--song_shorthand on/off Print the Artist/Title on separate lines
--music_player player-name Manually specify a player to use.
Available values are listed in the config file
--install_time on/off Enable/Disable showing the time in Install Date output.
--install_time_format 12h/24h
Set time format in Install Date to be 12 hour or 24 hour.
@@ -4707,7 +4469,7 @@ IMAGE BACKEND:
--catimg source Shortcut to use 'catimg' backend.
--iterm2 source Shortcut to use 'iterm2' backend.
--jp2a source Shortcut to use 'jp2a' backend.
--pixterm source Shortcut to use 'pixterm' backend.
--pixterm source Shortcut to use 'pixterm' backend.
--sixel source Shortcut to use 'sixel' backend.
--termpix source Shortcut to use 'termpix' backend.
--tycat source Shortcut to use 'tycat' backend.
@@ -4847,7 +4609,6 @@ get_args() {
"--shell_version") shell_version="$2" ;;
"--ip_host") public_ip_host="$2" ;;
"--song_shorthand") song_shorthand="$2" ;;
"--music_player") music_player="$2" ;;
"--install_time") install_time="$2" ;;
"--install_time_format") install_time_format="$2" ;;
"--cpu_temp")
@@ -5024,10 +4785,10 @@ main() {
# Minix doesn't support these sequences.
if [[ "$TERM" != "minix" && "$stdout" != "on" ]]; then
# If the script exits for any reason, unhide the cursor.
trap 'printf "\\e[?25h\\e[?7h"' EXIT
trap 'printf "\033[?25h\033[?7h"' EXIT
# Hide the cursor and disable line wrap.
printf "\\e[?25l\\e[?7l"
printf "\033[?25l\033[?7l"
fi
image_backend

View File

@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH NEOFETCH "1" "April 2018" "Neofetch 3.4.0" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.5.
.TH NEOFETCH "1" "December 2017" "Neofetch 3.3.1-git" "User Commands"
.SH NAME
Neofetch \- A fast, highly customizable system info script
.SH SYNOPSIS
@@ -118,10 +118,6 @@ URL to query for public IP
\fB\-\-song_shorthand\fR on/off
Print the Artist/Title on separate lines
.TP
\fB\-\-music_player\fR player\-name
Manually specify a player to use.
Available values are listed in the config file
.TP
\fB\-\-install_time\fR on/off
Enable/Disable showing the time in Install Date output.
.TP