Compare commits

..

64 Commits
3.3.0 ... hp-ux

Author SHA1 Message Date
Muhammad Herdiansyah
56545944d3 Merge branch 'master' into hp-ux 2017-11-09 18:53:29 +07:00
dylan araps
4fd2287582 Merge branch 'master' of https://github.com/dylanaraps/neofetch 2017-11-08 07:20:47 +11:00
dylan araps
d21f9e928d model: Fix garbage 2017-11-08 07:20:25 +11:00
Herdiansyah
8fa9fd2e71 Merge pull request #857 from m1st0/master
Update Kubuntu Logo
2017-11-07 19:46:56 +07:00
Herdiansyah
0f2ef38a5b Merge pull request #850 from ARCHLabs/master
Update archlabs distro ascii art
2017-11-07 19:46:28 +07:00
Dylan Araps
06fdb40878 Merge pull request #856 from jliles/master
Added Pop!_OS distribution
2017-11-05 09:05:37 +11:00
Maulik Mistry
da983b3adf Merge branch 'master' of https://github.com/dylanaraps/neofetch 2017-11-03 02:26:36 -07:00
Maulik Mistry
498991b106 Added color updates for Kubuntu logo. 2017-11-03 02:26:31 -07:00
Jesse Liles
98e2a0db99 Added Pop\!_OS distribution 2017-11-02 16:13:55 -04:00
natemaia
857cbb21b4 Update archlabs distro ascii art 2017-10-26 02:01:55 -07:00
Andrew Titmuss
402ac0bc00 model: fix SC2102 on iPad 2017-10-18 16:17:52 +11:00
Andrew Titmuss
87140464fc docs: CHANGELOG 2017-10-18 14:58:37 +11:00
Andrew Titmuss
434a4d4fb7 model: add new iOS devices 2017-10-18 14:57:05 +11:00
Andrew Titmuss
4f3f0f73c0 distro: fix whitespace for High Sierra 2017-10-18 14:37:00 +11:00
Andrew Titmuss
322acffb95 docs: CHANGELOG 2017-10-18 11:28:41 +11:00
Andrew Titmuss
1ab898e944 resolution: Fix errors on non-retina screens [macOS]
Added a check to see if the plist file we use for checking the scale factor exists
2017-10-18 11:25:27 +11:00
Andrew Titmuss
bb9389797f Merge pull request #846 from dylanaraps/gpu_driver_mac
gpu_driver: Add macOS (Nvidia) support
2017-10-18 08:14:03 +11:00
Andrew Titmuss
f7dc4441fc gpu_driver: Add macOS (Nvidia) support 2017-10-17 23:13:36 +11:00
Andrew Titmuss
468c49efe7 docs: CHANGELOG 2017-10-17 22:51:44 +11:00
Andrew Titmuss
3217b921e5 WM: Fix chunkwm being detected as Kwm on macOS 2017-10-17 22:47:12 +11:00
dylan araps
03d07f2c62 Merge branch 'master' of https://github.com/dylanaraps/neofetch 2017-10-16 07:42:46 +11:00
dylan araps
a26fd76ca6 OS: Added support for Lunar Linux. 2017-10-16 07:42:37 +11:00
Muhammad Herdiansyah
51ff3d1c88 docs: CHANGELOG 2017-10-15 07:26:27 +07:00
Muhammad Herdiansyah
f6c362f5a1 Install Date: Use a separate case for MacOS ls 2017-10-15 07:21:40 +07:00
Andrew Titmuss
75148f63ee docs: CHANGELOG 2017-10-13 15:08:28 +11:00
Andrew Titmuss
3941971e3e Merge pull request #840 from dylanaraps/install-date-mac
Fix Install Date for macOS
2017-10-13 14:56:08 +11:00
Andrew Titmuss
123d1652ff fix line length to be under 100 chars in macOS install date 2017-10-13 14:44:22 +11:00
Andrew Titmuss
3cac29c804 Change -u to -U in macOS install date 2017-10-13 14:32:58 +11:00
Andrew Titmuss
952f2e5b22 fix Install Date for macOS 2017-10-13 14:24:56 +11:00
dylan araps
b57cdee02a image: Fix bug with getting wallpaper from feh. 2017-10-11 08:49:07 +11:00
dylan araps
b763c31ad7 image: Fix bug with getting wallpaper from feh. 2017-10-10 08:44:09 +11:00
dylan araps
f9d881e905 image: Fix bug with getting wallpaper from feh. 2017-10-10 08:29:55 +11:00
Muhammad Herdiansyah
fd04aa14ae docs: CHANGELOG 2017-09-26 08:49:21 +07:00
Herdiansyah
87a28b139a Merge pull request #825 from yslgirl/master
add macOS High Sierra support
2017-09-26 08:46:17 +07:00
Dylan Araps
133e7bdc0c Merge pull request #834 from tokamach/master
tiny fix for WM always being detected as Kwm on macOS
2017-09-26 08:41:52 +10:00
Tom Hutchings
5caac4a91a tiny fix for WM always being detected as Kwm on macOS 2017-09-25 18:27:35 +01:00
Dylan Araps
fd535da792 Merge pull request #832 from chrisweeksnz/coreos-addition
Coreos addition
2017-09-22 09:16:52 +10:00
Chris Weeks
11aa52e088 Remove single space on each line of ascii art 2017-09-22 10:28:56 +12:00
Chris Weeks
cbece346f8 Update neofetch 2017-09-21 18:07:27 +12:00
Chris Weeks
f03ecddc13 Create coreos logo 2017-09-21 17:56:12 +12:00
Muhammad Herdiansyah
c1dac90399 Model: Remove more unneeded outputs 2017-09-18 14:29:35 +07:00
Dylan Araps
b3e90cc322 Merge pull request #828 from mstraube/kde
Font: Fix KDE font, #821
2017-09-18 07:42:36 +10:00
Dylan Araps
4e69a35fb0 Merge pull request #827 from mstraube/elisa
Song: Add support for Elisa
2017-09-17 08:41:22 +10:00
Michael Straube
eea725b8aa Song: Add support for Elisa 2017-09-16 21:17:22 +02:00
dylan araps
8fa1abd0c2 docs: CHANGELOG 2017-09-16 09:18:33 +10:00
dylan araps
15879c8df8 distro: Fix Gentoo detection error. 2017-09-15 08:16:51 +10:00
dylan araps
b633ce9a0c version: bump 2017-09-14 10:23:03 +10:00
dylan araps
8493805eda docs: New changelog 2017-09-14 10:22:30 +10:00
Michael Straube
8d8b2da890 Font: Fix KDE font, #821 2017-09-12 15:02:13 +02:00
chance
afd8e56d58 add macOS High Sierra support 2017-09-10 23:46:08 -06:00
Muhammad Herdiansyah
5d63097994 Memory [HP-UX]: Complete support 2017-07-05 16:50:05 +07:00
Muhammad Herdiansyah
b8c902e65f Uptime [HP-UX]: Remove leading zeroes
Variables with a leading 0 are treated as base-8, so it halts HP-UX
detection because of the error.
2017-07-05 02:19:52 +07:00
Muhammad Herdiansyah
01bbad7c79 Install Date [HP-UX]: Add initial support 2017-07-04 20:13:25 +07:00
Muhammad Herdiansyah
7dac8843f1 Disk [HP-UX]: Add initial support 2017-07-04 19:51:28 +07:00
Muhammad Herdiansyah
9b51f9f528 Memory [HP-UX]: Add partial support 2017-07-04 19:36:29 +07:00
Muhammad Herdiansyah
d233e5bb2e CPU [HP-UX]: Add partial support 2017-07-04 19:29:51 +07:00
Muhammad Herdiansyah
5cb04eccce Distro: Fix typo 2017-07-04 19:14:20 +07:00
Muhammad Herdiansyah
7141db1046 Misc: Shellcheck fix 2017-07-04 19:08:57 +07:00
Muhammad Herdiansyah
af6358fe47 Distro [HP-UX/IRIX]: Make use of the kernel_shorthand feature 2017-07-04 19:06:55 +07:00
Muhammad Herdiansyah
53148c1ffe Merge master branch into hp-ux 2017-07-04 18:54:17 +07:00
Dylan Araps
c3901fbc2a Packages: Add support for HP-UX 2017-01-19 14:12:07 +11:00
Dylan Araps
68630a125e Uptime: Add support for HP-UX 2017-01-19 14:08:57 +11:00
Dylan Araps
e8bd2975e0 Model: Add support for HP-UX 2017-01-19 14:04:59 +11:00
Dylan Araps
9a7b4c3871 OS: Add initial support for HP-UX 2017-01-19 13:59:20 +11:00
8 changed files with 215 additions and 169 deletions

View File

@@ -1,122 +1,27 @@
## Contributors
- **[@konimex](https://github.com/konimex)**
- **[@mstraube](https://github.com/mstraube)**
- **[@dominiklohmann](https://github.com/dominiklohmann)**
- **[@ybden](https://github.com/ybden)**
- **[@lexruee](https://github.com/lexruee)**
- **[@AMDmi3](https://github.com/AMDmi3)**
- **[@deadda7a](https://github.com/deadda7a)**
- **[@winneon](https://github.com/winneon)**
- **[@DamnWidget](https://github.com/DamnWidget)**
- [**@yslgirl**](https://github.com/yslgirl)
- [**@iandrewt**](https://github.com/iandrewt)
- [**@chrisweeksnz**](https://github.com/chrisweeksnz)
## General
- Config file now has a `.conf` suffix.
- Neofetch now assumes target directories (config file and ASCII directory) at install time, this fixes problems with systems such as NixOS.
- `stdout` mode is now reimplemented.
- This mode prints the information in plain text.
- You can use it with `--stdout`.
- Example: https://gist.github.com/dylanaraps/151c205322cf3acae62661b76464a3f7
- Fixed prompt location if color blocks are disabled.
- Make makefile more portable. **[@AMDmi3](https://github.com/AMDmi3)**
## Operating System
- Added support for AryaLinux. **[@mstraube](https://github.com/mstraube)**
- Added support for Amazon Linux AMI.
- Added support for Artix Linux. **[@DamnWidget](https://github.com/DamnWidget)**
- Added support for Endless OS.
- Added support for Sabotage Linux.
- Added support for Siduction. **[@lexruee](https://github.com/lexruee)**
- Added support for Source Mage.
- Added support for Parsix GNU/Linux. **[@mstraube](https://github.com/mstraube)**
- Added support for Nurunner. **[@mstraube](https://github.com/mstraube)**
- Fixed Raspbian being detected as ChromeOS.
## Images
- [w3m] Fixed w3m-img not found on NixOS.
- Added support for using all image types as input.
- Neofetch now supports `svg`, `tiff` etc.
## ASCII
- Added small Debian.
- Added small FreeBSD.
- Added small macOS.
- Added small NixOS.
## OS
- Fixed detection bug with Gentoo.
- 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)
## Info
**GPU Driver**
- [Linux] Added a new info function (*off by default*) to display the GPU Driver currently in use.
- Add `info "GPU Driver" gpu_driver` to your config to use it.
**CPU**
- [Linux] Fixed inaccurate output on ARM SoC devices.
- [Linux] Fixed CPU speed not appearing on PowerPC systems.
- [NetBSD] Added support for CPU temperature. (NOTE: This only supports newer Intel processors)
- Fixed inaccurate speed output in systems with CPU speed less than 1 GHz.
- Deprecated `cpu_shorthand` in favor of `cpu_brand`.
**GPU**
- [Linux] Filter out duplicate entries.
**Model**
- Added support for QEMU/KVM.
- Renamed subtitle to `Host:`.
**Uptime**
- [AIX/IRIX] Fixed Neofetch crashing when calculating uptime.
**Terminal**
- [SSH] Fixed infinite loop if neofetch is run on non-interactive shells.
**Terminal Font**
- Added support for LXTerminal. **[@mstraube](https://github.com/mstraube)**
- Added support for GNUStep Terminal. **[@mstraube](https://github.com/mstraube)**
- Fixed Xfce4-terminal font output when system-wide font is used. **[@mstraube](https://github.com/mstraube)**
- Fixed MATE-Terminal issue. **[@mstraube](https://github.com/mstraube)**
- Fixed URxvt font detection failing if `.` is used. **[@winneon](https://github.com/winneon)**
**Theme**
- [Qt/KDE] Fixed inaccurate theme naming. **[@mstraube](https://github.com/mstraube)**
- [Qt/KDE] GTK theme is now shows as well.
**Window Manager**
- [macOS] Added support for `chunkwm`. **[@dominiklohmann](https://github.com/dominiklohmann)**
- Fix incorrect output when using WindowMaker. **[@mstraube](https://github.com/mstraube)**
- [macOS] Fixed chunkwm being detected as Kwm. [**@iandrewt**](https://github.com/iandrewt)
**Song**
**Install Date**
- Added support for Pogo. **[@mstraube](https://github.com/mstraube)**
- Fixed bug with players not being found.
- [macOS] Fixed Install Date. [**@iandrewt**](https://github.com/iandrewt)
**Battery**
**Resolution**
- Added battery support for Thinkpads and other devices that use the `CMB` naming for batteries. **[@deadda7a](https://github.com/deadda7a)**
## Images
- Fixed division by 0 error in XTerm.
## Screenshot
- Use `maim` over `scrot`. **[@ybden](https://github.com/ybden)**
- Fixed `scrot_cmd` arguments not being used. **[@winneon](https://github.com/winneon)**
- [macOS] Fixed errors on non-retina screens. [**@iandrewt**](https://github.com/iandrewt)

View File

@@ -1,18 +1,21 @@
${c1} sy
h--d
d---:
:----/N
:------/N
N/----:---+
N/---+/ :--:o
N/--:/ ::::s
+--- ::::s
N+---+ ::::s
N+----o +:o s::::s
N/----:: s:::s h:::::s
N/----:::y::::+ o::::::o
N/---::::::::::s d::::::::+N
/--::::::::::::dd::::::::::+N
:-:::/+syhd NNN N dhys+/:::/
d::+ydN /s+/d
arc y\\.
${c1} 'c'
'kKk,
.dKKKx.
.oKXKXKd.
.l0XXXXKKo.
c0KXXXXKX0l.
:0XKKOxxOKX0l.
:OXKOc. .c0XX0l.
:OK0o. ${c4}...${c1}'dKKX0l.
:OX0c ${c4};xOx'${c1}'dKXX0l.
:0KKo.${c4}.o0XXKd'.${c1}lKXX0l.
c0XKd.${c4}.oKXXXXKd..${c1}oKKX0l.
.c0XKk;${c4}.l0K0OO0XKd..${c1}oKXXKo.
.l0XXXk:${c4},dKx,.'l0XKo.${c1}.kXXXKo.
.o0XXXX0d,${c4}:x; .oKKx'${c1}.dXKXXKd.
.oKXXXXKK0c.${c4};. :00c'${c1}cOXXXXXKd.
.dKXXXXXXXXk,${c4}. cKx'${c1}'xKXXXXXXKx'
'xKXXXXK0kdl:. ${c4}.ok; ${c1}.cdk0KKXXXKx'
'xKK0koc,.. ${c4}'c, ${c1} ..,cok0KKk,
,xko:'. ${c4}.. ${c1} .':okx;
.,'. .',.

20
ascii/distro/coreos Normal file
View File

@@ -0,0 +1,20 @@
${c1} .....
.';:cccccccc:;'.
':ccccclc${c3}lllllllll${c1}cc:.
.;cccccccc${c3}lllllllllllllll${c1}c,
;clllccccc${c3}llllllllllllllllll${c1}c,
.cllclccccc${c3}lllll${c2}lll${c3}llllllllllll${c1}c:
ccclclcccc${c3}cllll${c2}kWMMNKk${c3}llllllllll${c1}c:
:ccclclcccc${c3}llll${c2}oWMMMMMMWO${c3}lllllllll${c1}c,
.ccllllllccc${c3}clll${c2}OMMMMMMMMM0${c3}lllllllll${c1}c
.lllllclcccc${c3}llll${c2}KMMMMMMMMMMo${c3}llllllll${c1}c.
.lllllllcccc${c3}clll${c2}KMMMMMMMMN0${c3}lllllllll${c1}c.
.cclllllcccc${c3}lllld${c2}xkkxxdo${c3}llllllllllc${c1}lc
:cccllllllcccc${c3}lllccllllcclccc${c1}cccccc;
.ccclllllllcccccccc${c3}lll${c1}ccccclccccccc
.cllllllllllclcccclccclccllllcllc
:cllllllllccclcllllllllllllcc;
.cccccccccccccclcccccccccc:.
.;cccclccccccllllllccc,.
.';ccccclllccc:;..
.....

View File

@@ -1,20 +1,20 @@
${c1} `.:/ossyyyysso/:.
.:oyyyyyyyyyyyyyyyyyyo:`
-oyyyyyyyo-``/yyyyyyysyyyyo-
-syyyyyyyyyy` +yyyy/` `/yyyys-
+yyys/./syyyy: ..-` /yyyyyy+
`oyyyy: `:syys+oooo+:. .yyyyyyyyo`
+yyyyyy/ `/yyyyyyyyyyys/` /sssssyyy+
-yyyyyyyy- -syyyyyyyyyyyyyys- syyy-
oyyyyso+: .yyyyyyyyyyyyyyyyyy. `.+yyyo
yyys /yyyyyyyyyyyyyyyyyysosyyyyyyyy
yyys.` /yyyyyyyyyyyyyyyyyyyyyyyyyyyyy
oyyyyyso: .yyyyyyyyyyyyyyyyyy.`.-:/syyyo
-yyyyyyyy. -syyyyyyyyyyyyyys- syyy-
+yyyyyy: `syyyyyyyyyyys/` /o+++oyyy+
`oyyyy. -syyy++oooo+/. oyyyyyyyyo
+yyys/-oyyyys` `..` -yyyyyyy+
-syyyyyyyyy: .syyy/` `syyyys-
-oyyyyyyy:.`-yyyyyys+syyyyo-
-oyyyyyyyo${c2}dMMy${c1}yyyyyyysyyyyo-
-syyyyyyyyyy${c2}dMMy${c1}oyyyy${c2}dmMMy${c1}yyyys-
oyyys${c2}dMy${c1}syyyy${c2}dMMMMMMMMMMMMMy${c1}yyyyyyo
`oyyyy${c2}dMMMMy${c1}syysoooooo${c2}dMMMMy${c1}yyyyyyyyo`
oyyyyyy${c2}dMMMMy${c1}yyyyyyyyyyys${c2}dMMy${c1}sssssyyyo
-yyyyyyyy${c2}dMy${c1}syyyyyyyyyyyyyys${c2}dMMMMMy${c1}syyy-
oyyyysoo${c2}dMy${c1}yyyyyyyyyyyyyyyyyy${c2}dMMMMy${c1}syyyo
yyys${c2}dMMMMMy${c1}yyyyyyyyyyyyyyyyyysosyyyyyyyy
yyys${c2}dMMMMMy${c1}yyyyyyyyyyyyyyyyyyyyyyyyyyyyy
oyyyyysos${c2}dy${c1}yyyyyyyyyyyyyyyyyy${c2}dMMMMy${c1}syyyo
-yyyyyyyy${c2}dMy${c1}syyyyyyyyyyyyyys${c2}dMMMMMy${c1}syyy-
oyyyyyy${c2}dMMMy${c1}syyyyyyyyyyys${c2}dMMy${c1}oyyyoyyyo
`oyyyy${c2}dMMMy${c1}syyyoooooo${c2}dMMMMy${c1}oyyyyyyyyo
oyyysyyoyyyys${c2}dMMMMMMMMMMMy${c1}yyyyyyyo
-syyyyyyyyy${c2}dMMMy${c1}syyy${c2}dMMMy${c1}syyyys-
-oyyyyyyy${c2}dMMy${c1}yyyyyysosyyyyo-
./oyyyyyyyyyyyyyyyyyyo/.
`.:/oosyyyysso/:.`

13
ascii/distro/lunar Normal file
View File

@@ -0,0 +1,13 @@
${c1}`-. `-.
-ohys/-` `:+shy/`
-omNNdyo/` :+shmNNy/`
${c3} -
/mMmo
hMMMN`
.NMMs
${c1} -:+oooo+//: ${c3}/MN${c1}. -///oooo+/-`
/:.` ${c3}/${c1} `.:/`
${c3} __
| | _ _ ___ ___ ___
| |__| | | | .'| _|
|_____|___|_|_|__,|_|

21
ascii/distro/pop_os Normal file
View File

@@ -0,0 +1,21 @@
${c1} /////////////
/////////////////////
///////${c2}*767${c1}////////////////
//////${c2}7676767676*${c1}//////////////
/////${c2}76767${c1}//${c2}7676767${c1}//////////////
/////${c2}767676${c1}///${c2}*76767${c1}///////////////
///////${c2}767676${c1}///${c2}76767${c1}.///${c2}7676*${c1}///////
/////////${c2}767676${c1}//${c2}76767${c1}///${c2}767676${c1}////////
//////////${c2}76767676767${c1}////${c2}76767${c1}/////////
///////////${c2}76767676${c1}//////${c2}7676${c1}//////////
////////////,${c2}7676${c1},///////${c2}767${c1}///////////
/////////////*${c2}7676${c1}///////${c2}76${c1}////////////
///////////////${c2}7676${c1}////////////////////
///////////////${c2}7676${c1}///${c2}767${c1}////////////
//////////////////////${c2}'${c1}////////////
//////${c2}.7676767676767676767,${c1}//////
/////${c2}767676767676767676767${c1}/////
///////////////////////////
/////////////////////
/////////////

View File

@@ -26,7 +26,7 @@ print_info() {
info "GPU" gpu
info "Memory" memory
# info "GPU Driver" gpu_driver # Linux only
# info "GPU Driver" gpu_driver # Linux/macOS only
# info "CPU Usage" cpu_usage
# info "Disk" disk
# info "Battery" battery
@@ -729,4 +729,4 @@ stdout="off"
#
# NOTE: Don't change this value, neofetch reads this to determine
# how to handle backwards compatibility.
config_version="3.3.0"
config_version="3.3.1-git"

134
neofetch
View File

@@ -9,7 +9,7 @@
# https://github.com/dylanaraps/
# Neofetch version.
version="3.3.0"
version="3.3.1-git"
bash_version="${BASH_VERSION/.*}"
sys_locale="${LANG:-C}"
@@ -44,6 +44,7 @@ get_os() {
"MINIX") os="MINIX" ;;
"AIX") os="AIX" ;;
"IRIX64") os="IRIX" ;;
"HP-UX") os="HP-UX" ;;
*)
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
@@ -160,6 +161,7 @@ get_distro() {
fi
fi
distro="$(trim_quotes "$distro")"
distro="${distro/'NAME='}"
;;
"Mac OS X")
@@ -176,6 +178,7 @@ get_distro() {
"10.10"*) codename="OS X Yosemite" ;;
"10.11"*) codename="OS X El Capitan" ;;
"10.12"*) codename="macOS Sierra" ;;
"10.13"*) codename="macOS High Sierra" ;;
*) codename="macOS" ;;
esac
distro="$codename $osx_version $osx_build"
@@ -186,7 +189,7 @@ get_distro() {
case "$osx_version" in
"10."[4-7]*) distro="${distro/${codename}/Mac OS X}" ;;
"10."[8-9]* | "10.1"[0-1]*) distro="${distro/${codename}/OS X}" ;;
"10.12"*) distro="${distro/${codename}/macOS}" ;;
"10.1"[2-3]*) distro="${distro/${codename}/macOS}" ;;
esac
distro="${distro/ ${osx_build}}"
;;
@@ -224,8 +227,11 @@ get_distro() {
distro="AIX $(oslevel)"
;;
"IRIX")
distro="IRIX ${kernel_version}"
"IRIX" | "HP-UX")
distro="$os ${kernel_version}"
case "$distro_shorthand" in
"on" | "tiny") distro="${distro/ ${kernel_version}}" ;;
esac
;;
esac
@@ -277,13 +283,16 @@ get_model() {
"iPhone OS")
case "$machine_arch" in
"iPad1,1") model="iPad" ;;
"iPad2,"[1-4]) model="iPad2" ;;
"iPad3,"[1-3]) model="iPad3" ;;
"iPad3,"[4-6]) model="iPad4" ;;
"iPad2,"[1-4]) model="iPad 2" ;;
"iPad3,"[1-3]) model="iPad 3" ;;
"iPad3,"[4-6]) model="iPad 4" ;;
"iPad6,11" | "iPad 6,12") model="iPad 5" ;;
"iPad4,"[1-3]) model="iPad Air" ;;
"iPad5,"[3-4]) model="iPad Air 2" ;;
"iPad6,"[7-8]) model="iPad Pro (12.9 Inch)" ;;
"iPad6,"[3-4]) model="iPad Pro (9.7 Inch)" ;;
"iPad7,"[1-2]) model="iPad Pro 2 (12.9 Inch)" ;;
"iPad7,"[3-4]) model="iPad Pro (10.5 Inch)" ;;
"iPad2,"[5-7]) model="iPad mini" ;;
"iPad4,"[4-6]) model="iPad mini 2" ;;
"iPad4,"[7-9]) model="iPad mini 3" ;;
@@ -304,6 +313,9 @@ get_model() {
"iPhone8,4") model="iPhone SE" ;;
"iPhone9,1" | "iPhone9,3") model="iPhone 7" ;;
"iPhone9,2" | "iPhone9,4") model="iPhone 7 Plus" ;;
"iPhone10,1" | "iPhone10,4") model="iPhone 8" ;;
"iPhone10,2" | "iPhone10,5") model="iPhone 8 Plus" ;;
"iPhone10,3" | "iPhone10,6") model="iPhone X" ;;
"iPod1,1") model="iPod touch" ;;
"ipod2,1") model="iPod touch 2G" ;;
@@ -331,6 +343,10 @@ get_model() {
"AIX")
model="$(/usr/bin/uname -M)"
;;
"HP-UX")
model="$(model)"
;;
esac
# Remove dummy OEM info.
@@ -344,6 +360,8 @@ get_model() {
model="${model//Default string}"
model="${model//Not Specified}"
model="${model//Type1ProductConfigId}"
model="${model//INVALID}"
model="${model//<2F>}"
case "$model" in
"Standard PC"*) model="KVM/QEMU (${model})" ;;
@@ -358,8 +376,8 @@ get_title() {
}
get_kernel() {
# Since these OS are integrated systems, it's better to skip this function altogether
[[ "$os" =~ (AIX|IRIX) ]] && return
# Since AIX has no useful output in uname, it's better to skip this function altogether
[[ "$os" == "AIX" ]] && return
case "$kernel_shorthand" in
"on") kernel="$kernel_version" ;;
@@ -367,7 +385,7 @@ get_kernel() {
esac
# Hide kernel info if it's identical to the distro info.
if [[ "$os" =~ (BSD|MINIX) && "$distro" == *"$kernel_name"* ]]; then
if [[ "$os" =~ (BSD|MINIX|IRIX|HP-UX) && "$distro" == *"$kernel_name"* ]]; then
case "$distro_shorthand" in
"on" | "tiny") kernel="$kernel_version" ;;
*) unset kernel ;;
@@ -407,8 +425,8 @@ get_uptime() {
seconds="${seconds/.*}"
;;
"AIX" | "IRIX")
t="$(LC_ALL=POSIX ps -o etime= -p 1)"
"AIX" | "IRIX" | "HP-UX")
t="$(LC_ALL=POSIX UNIX95=1 ps -o etime= -p 1)"
d="0" h="0"
case "$t" in *"-"*) d="${t%%-*}"; t="${t#*-}";; esac
case "$t" in *":"*":"*) h="${t%%:*}"; t="${t#*:}";; esac
@@ -589,6 +607,10 @@ get_packages() {
"IRIX")
packages="$(($(versions -b | wc -l)-3))"
;;
"HP-UX")
packages="$(($(swlist -l product | wc -l)-6))"
;;
esac
((packages == 0)) && unset packages
@@ -704,11 +726,11 @@ get_wm() {
else
case "$os" in
"Mac OS X")
ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm\|[c]hunkwm')"
ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm\|[c]hun[k]wm')"
case "$ps_line" in
*"kwm"*) wm="Kwm" ;;
*"chunkwm"*) wm="chunkwm" ;;
*"kwm"*) wm="Kwm" ;;
*"Amethyst"*) wm="Amethyst" ;;
*"Spectacle"*) wm="Spectacle" ;;
*) wm="Quartz Compositor" ;;
@@ -1060,6 +1082,18 @@ get_cpu() {
# Get CPU cores.
cores="$(sysconf NPROC_ONLN)"
;;
"HP-UX")
# Get CPU name.
# This will be partial for now, because apparently hppa and
# IA64 has different approaches of how it should be handled.
# Get CPU speed.
# Same reasons as above.
# Get CPU cores.
cores="$(ioscan -k | grep -c "processor")"
;;
esac
# Remove un-needed patterns from cpu output.
@@ -1395,6 +1429,13 @@ get_memory() {
mem_free="$((mem_stat[5] / 1024))"
mem_used="$((mem_total - mem_free))"
;;
"HP-UX")
mem_total="$(machinfo | awk -F':' '/Memory/ {print $2}')"
mem_total="${mem_total/MB*}"
mem_free="$(($(vmstat | awk 'NR==3{printf $5}') / 1024))"
mem_used="$((mem_total - mem_free))"
;;
esac
memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}"
@@ -1410,7 +1451,7 @@ get_song() {
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/ {printf $5 " " $6; exit}')"
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.
@@ -1441,6 +1482,7 @@ guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk|pogo/ {printf $5 " " $6;
"yarock"*) get_song_dbus "yarock" ;;
"deepin-music"*) get_song_dbus "deepinmusic" ;;
"tomahawk"*) get_song_dbus "tomahawk" ;;
"elisa"*) get_song_dbus "elisa" ;;
"audacious"*)
song="$(audtool current-song)"
@@ -1536,14 +1578,18 @@ get_resolution() {
awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')"
fi
scale_factor="$(PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" \
/Library/Preferences/com.apple.windowserver.plist)"
if [[ -e "/Library/Preferences/com.apple.windowserver.plist" ]]; then
scale_factor="$(PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" \
/Library/Preferences/com.apple.windowserver.plist)"
else
scale_factor=""
fi
# If no refresh rate is empty.
[[ "$resolution" == *"@ Hz"* ]] && \
resolution="${resolution//@ Hz}"
((${scale_factor%.*} == 2)) && \
[[ "${scale_factor%.*}" == 2 ]] && \
resolution="${resolution// @/@2x @}"
if [[ "$refresh_rate" == "off" ]]; then
@@ -1617,7 +1663,12 @@ get_style() {
kde_config_file="${kde_config_dir}/kdeglobals"
kde_theme="$(grep "^${kde}" "$kde_config_file")"
kde_theme="${kde_theme/${kde}*=}"
kde_theme="${kde_theme/*=}"
if [[ "$kde" == "font" ]]; then
kde_font_size="${kde_theme#*,}"
kde_font_size="${kde_font_size/,*}"
kde_theme="${kde_theme/,*} ${kde_theme/*,} ${kde_font_size}"
fi
kde_theme="$(uppercase "$kde_theme") [KDE], "
else
err "Theme: KDE config files not found, skipping."
@@ -2024,7 +2075,10 @@ get_disk() {
# Create an array called 'disks' where each element is a separate line from
# df's output. We then unset the first element which removes the column titles.
IFS=$'\n'
disks=($(df "${df_flags[@]}" "${disk_show[@]:-/}"))
case "$os" in
"HP-UX") disks=($(bdf "${disk_show[@]:-/}" 2>/dev/null)); df_version="bdf" ;;
*) disks=($(df "${df_flags[@]}" "${disk_show[@]:-/}" 2>/dev/null)) ;;
esac
unset 'disks[0]'
IFS="$old_ifs"
@@ -2040,9 +2094,10 @@ get_disk() {
disk_perc="${disk_info[4]/'%'}"
case "$df_version" in
*"befhikm"*)
disk="$((disk_info[2]/1024/1024))G / $((disk_info[1]/1024/1024))G (${disk_perc}%)"
*"befhikm"*|"bdf")
disk="$((disk_info[2]/1024/1024))G / $((disk_info[1]/1024/1024)) (${disk_perc}%)"
;;
*) disk="${disk_info[2]/i} / ${disk_info[1]/i} (${disk_perc}%)" ;;
esac
@@ -2220,6 +2275,7 @@ get_install_date() {
esac
;;
"AIX") install_file="/var/adm/ras/bosinstlog" ;;
"HP-UX") install_file="/dev/config" ;;
esac
ls_prog="$(ls --version 2>&1)"
@@ -2240,12 +2296,18 @@ get_install_date() {
install_date="$(ls -tcd --full-time "$install_file" | awk '{printf $6 " " $7}')"
;;
*"ACFHLNRS"* | *"RadC1xmnlog"*) # AIX ls / IRIX ls
*"ACFHLNRS"* | *"RadC1xmnlog"* | *"1ARadeCx"*) # AIX ls / IRIX ls / HP-UX ls
err "Install Date doesn't work because your 'ls' doesn't support full date/time."
return
;;
*) install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " "$7 " " $8}')" ;;
*"HLOPRSTUWabc"*) # macOS ls
install_date="$(ls -dlctUT "$install_file" | awk '{printf $9 " " $6 " "$7 " " $8}')"
;;
*)
install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " " $7 " " $8}')"
;;
esac
install_date="${install_date//-/ }"
@@ -2265,6 +2327,13 @@ get_gpu_driver() {
'/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "}')"
gpu_driver="${gpu_driver%, }"
;;
"Mac OS X")
if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then
gpu_driver="Nvidia Web Driver"
else
gpu_driver="macOS Default Graphics Driver"
fi
;;
esac
}
@@ -2483,7 +2552,7 @@ get_wallpaper() {
*)
if type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then
image="$(awk -F\' '/feh/ {printf $2}' "${HOME}/.fehbg")"
image="$(awk -F\' '/feh/ {printf $(NF-1)}' "${HOME}/.fehbg")"
elif type -p nitrogen >/dev/null; then
image="$(awk -F'=' '/file/ {printf $2;exit;}' \
@@ -3194,6 +3263,11 @@ get_distro_colors() {
ascii_file="cloveros"
;;
"Container Linux by CoreOS"*)
set_colors 4 7 1
ascii_file="coreos"
;;
"crux_small")
set_colors 4 5 7 6
ascii_file="crux_small"
@@ -3374,6 +3448,11 @@ get_distro_colors() {
ascii_file="lubuntu"
;;
"Lunar"*)
set_colors 4 7 3
ascii_file="lunar"
;;
"mac"*"_small")
set_colors 2 3 1 5 4
ascii_file="mac_small"
@@ -3529,6 +3608,11 @@ get_distro_colors() {
ascii_file="peppermint"
;;
"Pop!_OS"*)
set_colors 6 7
ascii_file="pop_os"
;;
"Porteus"*)
set_colors 6 7
ascii_file="porteus"