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,60 +6,29 @@
- [**@dawidd6**](https://github.com/dawidd6) - [**@dawidd6**](https://github.com/dawidd6)
- [**@MitchWeaver**](https://github.com/MitchWeaver) - [**@MitchWeaver**](https://github.com/MitchWeaver)
- [**@StarryTony**](https://github.com/StarryTony) - [**@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 ## OS
- Added support for ArchMerge. - Fixed detection bug with Gentoo.
- Added support for MagpieOS. - Fixed detection bug with TrueOS. [**@dawidd6**](https://github.com/dawidd6)
- Added support for PostMarketOS.
- Added support for Hyperbola GNU/Linux-libre [**@mstraube**](https://github.com/mstraube)
- Added support for macOS High Sierra. [**@yslgirl**](https://github.com/yslgirl) - 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 Container Linux by CoreOS. [**@chrisweeksnz**](https://github.com/chrisweeksnz)
- Added support for 2017 iOS devices. [**@iandrewt**](https://github.com/iandrewt) - Added support for 2017 iOS devices. [**@iandrewt**](https://github.com/iandrewt)
- Added support for LEDE. [**@dawidd6**](https://github.com/dawidd6) - Added support for LEDE. [**@dawidd6**](https://github.com/dawidd6)
- Added support for Pop!\_OS. [**@jliles**](https://github.com/jliles) - Added support for Pop!\_OS. [**@jliles**](https://github.com/jliles)
- Added support for Lunar Linux. - 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 ## General
- Added more info to verbose mode for debugging. - Added more info to verbose mode for debugging.
- Fixed bug in prompt location calculation. - 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 ## Ascii
- Added color updates for Kubuntu logo. **Maulik Mistry** - Added color updates for Kubuntu logo. **Maulik Mistry**
- Added new DragonflyBSD log. [**@MitchWeaver**](https://github.com/MitchWeaver)
## Images ## Images
@@ -67,25 +36,21 @@
- [MacOS/iTerm2] Fixed thumbnail not appearing. [**@StarryTony**](https://github.com/StarryTony) - [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. - Added `pixterm` backend.
- Don't force resolution in `catimg`.
## Info ## Info
**Desktop Environment** **Desktop Environment**
- Added GNOME version. - Added GNOME version.
- Added support for TDE.
**Window Manager** **Window Manager**
- Added support for most (*if not all*) current Wayland compositors/window manager's. - 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) - [macOS] Fixed `chunkwm` being detected as `Kwm`. [**@iandrewt**](https://github.com/iandrewt)
**Window Manager Theme** **Window Manager Theme**
- Fixed `sawfish` detection. - Fixed `sawfish` detection.
- [macOS] Now detects Light/Dark theme. [**@JadeMatrix**](https://github.com/JadeMatrix)
**Install Date** **Install Date**
@@ -99,22 +64,15 @@
- [linux] Detect the correct temperature file to use. - [linux] Detect the correct temperature file to use.
- [windows] Removed `$temp` usage as it's an envar. - [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** **GPU**
- [linux] Added driver version to NVIDIA output. - [linux] Added driver version to NVIDIA output.
- [linux] Added driver version to Intel output.
- [macOS] Added NVIDIA support. [**@iandrewt**](https://github.com/iandrewt) - [macOS] Added NVIDIA support. [**@iandrewt**](https://github.com/iandrewt)
**Memory**
- [OpenBSD] Fixed memory usage values. [**@rage311**](https://github.com/rage311)
**Package Manager** **Package Manager**
- Added detection for Sabotage Linux's `butch` [**@MitchWeaver**](https://github.com/MitchWeaver) - 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** **Resolution**
@@ -122,9 +80,7 @@
**Song** **Song**
- Added option to manually specify the player to use.
- Added support for Elisa. [**@mstraube**](https://github.com/mstraube) - Added support for Elisa. [**@mstraube**](https://github.com/mstraube)
- macOS detection is now more reliable. [**@JadeMatrix**](https://github.com/JadeMatrix)
**Model** **Model**
@@ -133,18 +89,3 @@
**Disk** **Disk**
- Update Haiku's detection. [**@dawidd6**](https://github.com/dawidd6) - 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 # 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) [![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) [![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) [![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) [![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) [![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 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 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: For more information:
**https://github.com/dylanaraps/neofetch/wiki** **https://github.com/dylanaraps/neofetch/wiki**
<img src="https://i.imgur.com/lUrkQBN.png" alt="neofetch" align="right" width="434px"> ![neofetch screenshot](https://u.teknik.io/KlBsD.png)
<img src="https://i.imgur.com/GFmC5Ad.png" alt="neofetch" width="434px">
## Dependencies ## 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: If you like `neofetch` and want to give back in some way you can donate here:
**https://patreon.com/dyla** **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},--, ${c1} |
${c2}| `-, ${c1},^, ${c2},-' | .-.
${c2} `, `-, ${c3}(/ \) ${c2},-' ,' ${c3} ()${c1}I${c3}()
${c2} `-, `-,${c1}/ \${c2},-' ,-' ${c1} "==.__:-:__.=="
${c2} `------${c1}( )${c2}------' "==.__/~|~\__.=="
${c2} ,----------${c1}( )${c2}----------, "==._( Y )_.=="
${c2} | _,-${c1}( )${c2}-,_ | ${c2}.-'~~""~=--...,__${c1}\/|\/${c2}__,...--=~""~~'-.
${c2} `-,__,-' ${c1}\ /${c2} `-,__,-' ( ..=${c1}\\=${c1}/${c2}=.. )
${c1} | | `'-. ,.-"`;${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 # 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 # Print the Artist and Title on separate lines
# #
# Default: 'off' # Default: 'off'
@@ -684,7 +645,7 @@ crop_offset="center"
# --size # --size
image_size="auto" image_size="auto"
# Gap between image and text # Ggap between image and text
# #
# Default: '3' # Default: '3'
# Values: 'num', '-num' # Values: 'num', '-num'
@@ -768,4 +729,4 @@ stdout="off"
# #
# NOTE: Don't change this value, neofetch reads this to determine # NOTE: Don't change this value, neofetch reads this to determine
# how to handle backwards compatibility. # how to handle backwards compatibility.
config_version="3.4.0" config_version="3.3.1-git"

457
neofetch
View File

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

View File

@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.5.
.TH NEOFETCH "1" "April 2018" "Neofetch 3.4.0" "User Commands" .TH NEOFETCH "1" "December 2017" "Neofetch 3.3.1-git" "User Commands"
.SH NAME .SH NAME
Neofetch \- A fast, highly customizable system info script Neofetch \- A fast, highly customizable system info script
.SH SYNOPSIS .SH SYNOPSIS
@@ -118,10 +118,6 @@ URL to query for public IP
\fB\-\-song_shorthand\fR on/off \fB\-\-song_shorthand\fR on/off
Print the Artist/Title on separate lines Print the Artist/Title on separate lines
.TP .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 \fB\-\-install_time\fR on/off
Enable/Disable showing the time in Install Date output. Enable/Disable showing the time in Install Date output.
.TP .TP