diff --git a/.travis.yml b/.travis.yml index 381e0cab..388082b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,4 +20,8 @@ script: - time ./neofetch --ascii --config config/travis.conf -v # See this wiki page for why we're disabling these errors. # https://github.com/dylanaraps/neofetch/wiki/Shellcheck-Exclusions - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck neofetch -e SC1090,SC2009,SC2012,SC2016,SC2034,SC2128,SC2153,SC2154,SC2178,SC2010; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck neofetch -e SC1090,SC2009,SC2012,SC2016,SC2034,SC2128,SC2153,SC2154,SC2178,SC2010,SC1004; fi + # The if statement is here to invert the exit code from grep. + # grep normally errors if no match is found but we want the opposite. + # We invert it so grep fails if a match is found. + - if grep '.\{101\}' neofetch; then (exit 1); else (exit 0); fi diff --git a/CHANGELOG.md b/CHANGELOG.md index 390807d9..560033d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,22 +1,27 @@ ## Contributors +- [**@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. +## 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 -**CPU** +**Window Manager** -- [Linux] Fixed inaccurate output on ARM SoC devices. +- [macOS] Fixed chunkwm being detected as Kwm. [**@iandrewt**](https://github.com/iandrewt) -**Terminal** +**Install Date** -- [SSH] Fixed infinite loop if neofetch is run on non-interactive shells. +- [macOS] Fixed Install Date. [**@iandrewt**](https://github.com/iandrewt) +**Resolution** -## Images - -- Fixed division by 0 error in XTerm. +- [macOS] Fixed errors on non-retina screens. [**@iandrewt**](https://github.com/iandrewt) diff --git a/LICENSE.md b/LICENSE.md index f18a25f1..851d9f6a 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -9,6 +9,9 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..99ec43b2 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +PREFIX ?= /usr +SYSCONFDIR ?= /etc +MANDIR ?= $(PREFIX)/share/man + +all: + @echo Run \'make install\' to install Neofetch. + +install: + @echo 'Making directories...' + @mkdir -p $(DESTDIR)$(PREFIX)/bin + @mkdir -p $(DESTDIR)$(PREFIX)/share/neofetch/ascii/distro + @mkdir -p $(DESTDIR)$(MANDIR)/man1 + @mkdir -p $(DESTDIR)$(SYSCONFDIR)/neofetch + + @echo 'Installing binaries...' + @sed "s|ASCIIDIR|$(PREFIX)/share/neofetch/ascii/distro|g;s|CONFDIR|$(SYSCONFDIR)/neofetch|g" < neofetch > $(DESTDIR)$(PREFIX)/bin/neofetch + @chmod 755 $(DESTDIR)$(PREFIX)/bin/neofetch + + @echo 'Installing ASCII files, man page and config file...' + @cp -p ascii/distro/* $(DESTDIR)$(PREFIX)/share/neofetch/ascii/distro + @cp -p neofetch.1 $(DESTDIR)$(MANDIR)/man1 + @cp -p config/config.conf $(DESTDIR)$(SYSCONFDIR)/neofetch/config.conf + +uninstall: + @echo 'Removing files...' + @rm -rf $(DESTDIR)$(PREFIX)/bin/neofetch + @rm -rf $(DESTDIR)$(MANDIR)/man1/neofetch.1* + @rm -rf $(DESTDIR)$(PREFIX)/share/neofetch + @rm -rf $(DESTDIR)$(SYSCONFDIR)/neofetch diff --git a/README.md b/README.md index 770f23ba..16ad5e91 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Neofetch [![Gitter](https://badges.gitter.im/dylanaraps/fetch.svg)](https://gitter.im/dylanaraps/fetch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![Freenode](https://img.shields.io/badge/%23neofetch-%20on%20Freenode-brightgreen.svg)](http://irc.lc/freenode/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) [![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. @@ -79,3 +79,13 @@ Thanks to: - Some of the ASCII logos. - [ufetch](https://github.com/jschx/ufetch): - Tiny ASCII logos + + + +## Donate + +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** diff --git a/ascii/distro/amazon b/ascii/distro/amazon new file mode 100644 index 00000000..050c5b3a --- /dev/null +++ b/ascii/distro/amazon @@ -0,0 +1,19 @@ +${c1} `-/oydNNdyo:.` + `.:+shmMMMMMMMMMMMMMMmhs+:.` + -+hNNMMMMMMMMMMMMMMMMMMMMMMNNho- +.`` -/+shmNNMMMMMMNNmhs+/- ``. +dNmhs+:. `.:/oo/:.` .:+shmNd +dMMMMMMMNdhs+:.. ..:+shdNMMMMMMMd +dMMMMMMMMMMMMMMNds odNMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +.:+ydNMMMMMMMMMMMh yMMMMMMMMMMMNdy+:. + `.:+shNMMMMMh yMMMMMNhs+:`` + `-+shy shs+:` diff --git a/ascii/distro/archlabs b/ascii/distro/archlabs index 8e0b840e..74f8a026 100644 --- a/ascii/distro/archlabs +++ b/ascii/distro/archlabs @@ -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; + .,'. .',. diff --git a/ascii/distro/artix b/ascii/distro/artix new file mode 100644 index 00000000..3ac30d3d --- /dev/null +++ b/ascii/distro/artix @@ -0,0 +1,19 @@ +${c1} d${c2}c. +${c1} x${c2}dc. +${c1} '.${c4}.${c1} d${c2}dlc. +${c1} c${c2}0d:${c1}o${c2}xllc; +${c1} :${c2}0ddlolc,lc, +${c1} :${c1}ko${c4}.${c1}:${c2}0ddollc..dlc. +${c1} ;${c1}K${c2}kxoOddollc' cllc. +${c1} ,${c1}K${c2}kkkxdddllc, ${c4}.${c2}lll: +${c1} ,${c1}X${c2}kkkddddlll;${c3}...';${c1}d${c2}llll${c3}dxk: +${c1} ,${c1}X${c2}kkkddddllll${c3}oxxxddo${c2}lll${c3}oooo, +${c3} xxk${c1}0${c2}kkkdddd${c1}o${c2}lll${c1}o${c3}ooooooolooooc;${c1}. +${c3} ddd${c2}kkk${c1}d${c2}ddd${c1}ol${c2}lc:${c3}:;,'.${c3}... .${c2}lll; +${c1} .${c3}xd${c1}x${c2}kk${c1}xd${c2}dl${c1}'cl:${c4}. ${c2}.llc, +${c1} .${c1}0${c2}kkkxddl${c4}. ${c2};'${c4}. ${c2};llc. +${c1} .${c1}K${c2}Okdcddl${c4}. ${c2}cllc${c4}. +${c1} 0${c2}Okd''dc. .cll; +${c1} k${c2}Okd' .llc, +${c1} d${c2}Od, 'lc. +${c1} :,${c4}. ${c2}... diff --git a/ascii/distro/arya b/ascii/distro/arya new file mode 100644 index 00000000..7d603e20 --- /dev/null +++ b/ascii/distro/arya @@ -0,0 +1,15 @@ +${c1} `oyyy/${c2}-yyyyyy+ +${c1} -syyyy/${c2}-yyyyyy+ +${c1} .syyyyy/${c2}-yyyyyy+ +${c1} :yyyyyy/${c2}-yyyyyy+ +${c1} `/ :yyyyyy/${c2}-yyyyyy+ +${c1} .+s :yyyyyy/${c2}-yyyyyy+ +${c1} .oys :yyyyyy/${c2}-yyyyyy+ +${c1} -oyys :yyyyyy/${c2}-yyyyyy+ +${c1} :syyys :yyyyyy/${c2}-yyyyyy+ +${c1} /syyyys :yyyyyy/${c2}-yyyyyy+ +${c1} +yyyyyys :yyyyyy/${c2}-yyyyyy+ +${c1} .oyyyyyyo. :yyyyyy/${c2}-yyyyyy+ --------- +${c1} .syyyyyy+` :yyyyyy/${c2}-yyyyy+-+syyyyyyyy +${c1} -syyyyyy/ :yyyyyy/${c2}-yyys:.syyyyyyyyyy +${c1}:syyyyyy/ :yyyyyy/${c2}-yyo.:syyyyyyyyyyy diff --git a/ascii/distro/coreos b/ascii/distro/coreos new file mode 100644 index 00000000..605d5050 --- /dev/null +++ b/ascii/distro/coreos @@ -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:;.. + ..... diff --git a/ascii/distro/debian_small b/ascii/distro/debian_small new file mode 100644 index 00000000..64cbb56c --- /dev/null +++ b/ascii/distro/debian_small @@ -0,0 +1,6 @@ + ${c1}_____ + / __ \\ +| / | +| \\___- +-_ + --_ diff --git a/ascii/distro/endless b/ascii/distro/endless new file mode 100644 index 00000000..fbff54b9 --- /dev/null +++ b/ascii/distro/endless @@ -0,0 +1,21 @@ +${c1} `:+yhmNMMMMNmhy+:` + -odMMNhso//////oshNMMdo- + /dMMh+. .+hMMd/ + /mMNo` `oNMm: + `yMMo` `oMMy` + `dMN- -NMd` + hMN. .NMh +/MM/ -os` /MM/ +dMm `smNmmhs/- `:sNMd+ `` mMd +MMy oMd--:+yMMMMMNo.:ohmMMMNy` yMM +MMy -NNyyhmMNh+oNMMMMMy:. dMo yMM +dMm `/++/-``/yNNh+/sdNMNddMm- mMd +/MM/ `dNy: `-::- /MM/ + hMN. .NMh + `dMN- -NMd` + `yMMo` `oMMy` + /mMNo` `oNMm/ + /dMMh+. .+hMMd/ + -odMMNhso//////oshNMMdo- + `:+yhmNMMMMNmhy+:` + diff --git a/ascii/distro/freebsd_small b/ascii/distro/freebsd_small new file mode 100644 index 00000000..943c147e --- /dev/null +++ b/ascii/distro/freebsd_small @@ -0,0 +1,7 @@ +${c1} /\\ _____ /\\ + \\_) (_/ + / \ +| | +| | + \ / + --_____-- diff --git a/ascii/distro/kubuntu b/ascii/distro/kubuntu index 3f7126c1..6302ff0f 100644 --- a/ascii/distro/kubuntu +++ b/ascii/distro/kubuntu @@ -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/:.` diff --git a/ascii/distro/lunar b/ascii/distro/lunar new file mode 100644 index 00000000..26bd295c --- /dev/null +++ b/ascii/distro/lunar @@ -0,0 +1,13 @@ +${c1}`-. `-. + -ohys/-` `:+shy/` + -omNNdyo/` :+shmNNy/` + ${c3} - + /mMmo + hMMMN` + .NMMs + ${c1} -:+oooo+//: ${c3}/MN${c1}. -///oooo+/-` + /:.` ${c3}/${c1} `.:/` +${c3} __ + | | _ _ ___ ___ ___ + | |__| | | | .'| _| + |_____|___|_|_|__,|_| diff --git a/ascii/distro/mac b/ascii/distro/mac index 6dc4de69..3ca5ea31 100644 --- a/ascii/distro/mac +++ b/ascii/distro/mac @@ -1,16 +1,18 @@ -${c1} -/+:. - :++++. - /+++/. - .:-::- .+/:-``.::- - .:/++++++/::::/++++++/:` -${c2} .:///////////////////////:` - ////////////////////////` -${c3}-+++++++++++++++++++++++` -/++++++++++++++++++++++/ -${c4}/sssssssssssssssssssssss. -:ssssssssssssssssssssssss- -${c5} osssssssssssssssssssssssso/` - `syyyyyyyyyyyyyyyyyyyyyyyy+` -${c6} `ossssssssssssssssssssss/ - :ooooooooooooooooooo+. - `:+oo+/:-..-:/+o+/- +${c1} 'c. + ,xNMM. + .OMMMMo + OMMM0, + .;loddo:' loolloddol;. + cKMMMMMMMMMMNWMMMMMMMMMM0: +${c2} .KMMMMMMMMMMMMMMMMMMMMMMMWd. + XMMMMMMMMMMMMMMMMMMMMMMMX. +${c3};MMMMMMMMMMMMMMMMMMMMMMMM: +:MMMMMMMMMMMMMMMMMMMMMMMM: +${c4}.MMMMMMMMMMMMMMMMMMMMMMMMX. + kMMMMMMMMMMMMMMMMMMMMMMMMWd. + ${c5}.XMMMMMMMMMMMMMMMMMMMMMMMMMMk + .XMMMMMMMMMMMMMMMMMMMMMMMMK. + ${c6}kMMMMMMMMMMMMMMMMMMMMMMd + ;KMMMMMMMWXXWMMMMMMMk. + .cooc,. .,coo:. + diff --git a/ascii/distro/mac_small b/ascii/distro/mac_small new file mode 100644 index 00000000..24852ff1 --- /dev/null +++ b/ascii/distro/mac_small @@ -0,0 +1,8 @@ +${c1} .:' + _ :'_ +${c2} .'`_`-'_``. +:________.-' +${c3}:_______: +:_______: +${c4} :_______`-; +${c5} `._.-._.' diff --git a/ascii/distro/nixos_small b/ascii/distro/nixos_small new file mode 100644 index 00000000..0917ff8e --- /dev/null +++ b/ascii/distro/nixos_small @@ -0,0 +1,7 @@ + ${c1}\\\\ \\\\ // + ==\\\\__\\\\/ // + // \\\\// +==// //== + //\\\\___// +// /\\\\ \\\\== + // \\\\ \\\\ diff --git a/ascii/distro/nurunner b/ascii/distro/nurunner new file mode 100644 index 00000000..e5529673 --- /dev/null +++ b/ascii/distro/nurunner @@ -0,0 +1,19 @@ +${c1} ,xc + ;00cxXl + ;K0, .xNo. + :KO' .lXx. + cXk. ;xl cXk. + cXk. ;k:.,xo. cXk. + .lXx. :x::0MNl,dd. :KO, + .xNx. cx;:KMMMMMNo'dx. ;KK; + .dNl. cd,cXMMMMMMMMMWd,ox' 'OK: +;WK. 'K,.KMMMMMMMMMMMMMWc.Kx lMO + 'OK: 'dl'xWMMMMMMMMMM0::x: 'OK: + .kNo .xo'xWMMMMMM0;:O: ;KK; + .dXd. .do,oNMMO;ck: ;00, + oNd. .dx,;'cO; ;K0, + oNx. okk; ;K0, + lXx. :KO' + cKk' cXk. + ;00:lXx. + ,kd. diff --git a/ascii/distro/parsix b/ascii/distro/parsix new file mode 100644 index 00000000..2753a461 --- /dev/null +++ b/ascii/distro/parsix @@ -0,0 +1,21 @@ + ${c2}-/+/:. + ${c2}.syssssys. + ${c1}.--. ${c2}ssssssssso${c1} ..--. + :++++++: ${c2}+ssssssss+${c1} ./++/+++: + /+++++++++.${c2}.yssooooy`${c1}-+///////o- + /++++++++++.${c2}+soooos:${c1}:+////////+- + :+++++////o-${c2}oooooo-${c1}+/////////- + `-/++//++-${c4}.-----.-${c1}:+/////:- + ${c3}-://::--${c1}-:/:${c4}.--.````.--.${c1}:::-${c3}--::::::. +${c3}-/:::::::://:${c4}.:-` `-:${c3}`:/:::::::--/- +${c3}/::::::::::/-${c4}--. .-.${c3}-/://///::::/ +${c3}-/:::::::::/:${c4}`:-. .-:${c3}`:///////////- + `${c3}-::::--${c1}.-://.${c4}---....---${c1}`:+/:-${c3}--::::-` + ${c1}-/+///+o/-${c4}.----.${c1}.:oo+++o+. + ${c1}-+/////+++o:${c2}syyyyy.${c1}o+++++++++: + ${c1}.+////+++++-${c2}+sssssy+${c1}.++++++++++\ + ${c1}.+:/++++++.${c2}.yssssssy-${c1}`+++++++++: + ${c1}:/+++++- ${c2}+sssssssss ${c1}-++++++- + ${c1}`--` ${c2}+sssssssso ${c1}`--` + ${c2}+sssssy+` + ${c2}`.::-` diff --git a/ascii/distro/pop_os b/ascii/distro/pop_os new file mode 100644 index 00000000..a399f18f --- /dev/null +++ b/ascii/distro/pop_os @@ -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}///// + /////////////////////////// + ///////////////////// + ///////////// + diff --git a/ascii/distro/refracta b/ascii/distro/refracta new file mode 100644 index 00000000..396474b5 --- /dev/null +++ b/ascii/distro/refracta @@ -0,0 +1,19 @@ +${c2} A + VW + VVW\\ + .yWWW\\ + ,;,,u,;yy;;v;uyyyyyyy ,WWWWW^ + *WWWWWWWWWWWWWWWW/ $VWWWWw , + ^*%WWWWWWVWWX $WWWW** ,yy + , "**WWW/' **' ,yy/WWW*` + &WWWWwy `*` <,ywWW%VWWW* + yWWWWWWWWWW* ., "**WW%W + ,&WWWWWM*"` ,y/ &WWWww ^* + XWWX*^ ,yWWWW09 .WWWWWWWWwy, + *` &WWWWWM WWWWWWWWWWWWWww, + (WWWWW` /#####WWW*********** + ^WWWW + VWW + Wh. + V/ + diff --git a/ascii/distro/sabotage b/ascii/distro/sabotage new file mode 100644 index 00000000..d4490fc8 --- /dev/null +++ b/ascii/distro/sabotage @@ -0,0 +1,12 @@ + +${c2} .|'''.| | '||''|. ..|''|| + ||.. ' ||| || || .|' || + ''|||. | || ||'''|. || || +. '|| .''''|. || || '|. || +|'....|' .|. .||. .||...|' ''|...|' + +|''||''| | ..|'''.| '||''''| + || ||| .|' ' || . + || | || || .... ||''| + || .''''|. '|. || || + .||. .|. .||. ''|...'| .||.....| diff --git a/ascii/distro/siduction b/ascii/distro/siduction new file mode 100644 index 00000000..c9720a60 --- /dev/null +++ b/ascii/distro/siduction @@ -0,0 +1,21 @@ +${c1} _aass, + jQh: =$w + QWmwawQW + )$QQQQ@( .. + _a_a. ~??^ syDY?Sa, + _mW>-<$c jWmi imm. + ]QQwayQE 4QQmgwmQQ` + ?WWQWP' -9QQQQQ@'._aas, + _a%is. .adYYs,. -"?!` aQB*~^3$c +_Qh;.nm .QWc. {QL ]QQp;..vmQ/ +"QQmmQ@ -QQQggmQP ]QQWmggmQQ( + -???" "$WQQQY` __, ?QQQQQQW! + _yZ!?q, - .yWY!!Sw, "???^ + .QQa_=qQ mQm>..vmm + $QQWQQP $QQQgmQQ@ + "???" _aa, -9WWQQWY` + _mB>~)$a -~~ + mQms_vmQ. + ]WQQQQQP + -?T??" + diff --git a/ascii/distro/source_mage b/ascii/distro/source_mage new file mode 100644 index 00000000..39a440e8 --- /dev/null +++ b/ascii/distro/source_mage @@ -0,0 +1,21 @@ +${c2} :ymNMNho. +.+sdmNMMMMMMMMMMy` +.-::/yMMMMMMMMMMMm- + sMMMMMMMMMMMm/ + /NMMMMMMMMMMMMMm: + .MMMMMMMMMMMMMMMMM: + `MMMMMMMMMMMMMMMMMN. + NMMMMMMMMMMMMMMMMMd + mMMMMMMMMMMMMMMMMMMo + hhMMMMMMMMMMMMMMMMMM. + .`/MMMMMMMMMMMMMMMMMs + :mMMMMMMMMMMMMMMMN` + `sMMMMMMMMMMMMMMM+ + /NMMMMMMMMMMMMMN` + oMMMMMMMMMMMMM+ + ./sd.-hMMMMMMMMmmN` + ./+oyyyh- `MMMMMMMMMmNh + sMMMMMMMMMmmo + `NMMMMMMMMMd: + -dMMMMMMMMMo + -shmNMMms. diff --git a/config/config.conf b/config/config.conf index 1575de10..f0d7cdb9 100644 --- a/config/config.conf +++ b/config/config.conf @@ -9,7 +9,7 @@ print_info() { info underline info "OS" distro - info "Model" model + info "Host" model info "Kernel" kernel info "Uptime" uptime info "Packages" packages @@ -26,6 +26,7 @@ print_info() { info "GPU" gpu info "Memory" memory + # info "GPU Driver" gpu_driver # Linux/macOS only # info "CPU Usage" cpu_usage # info "Disk" disk # info "Battery" battery @@ -35,7 +36,7 @@ print_info() { # info "Public IP" public_ip # info "Users" users # info "Install Date" install_date - # info "Locale" locale # This only works on glibc systems. + # info "Locale" locale # This only works on glibc systems. info line_break info cols @@ -142,25 +143,23 @@ speed_type="bios_limit" # Default: 'off' # Values: 'on', 'off'. # Flag: --speed_shorthand. +# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz # # Example: # on: 'i7-6500U (4) @ 3.1GHz' # off: 'i7-6500U (4) @ 3.100GHz' speed_shorthand="off" -# Shorten the output of the CPU function +# Enable/Disable CPU brand in output. # -# Default: 'off' -# Values: 'on', 'off', 'tiny', 'name', 'speed' -# Flag: --cpu_shorthand +# Default: 'on' +# Values: 'on', 'off' +# Flag: --cpu_brand # # Example: -# on: 'i7-6500U (4) @ 3.1GHz' -# off: 'Intel i7-6500U (4) @ 3.1GHz' -# tiny: 'i7-6500U (4)' -# name: 'Intel i7-6500U (4)' -# speed: '3.1GHz' -cpu_shorthand="off" +# on: 'Intel i7-6500U' +# off: 'i7-6500U (4)' +cpu_brand="on" # CPU Speed # Hide/Show CPU speed. @@ -195,7 +194,9 @@ cpu_cores="logical" # Default: 'off' # Values: 'C', 'F', 'off' # Flag: --cpu_temp -# Supports: Linux +# Supports: Linux, BSD +# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable +# coretemp kernel module. This only supports newer Intel processors. # # Example: # C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]' @@ -717,9 +718,15 @@ image_host="teknik" # Misc Options +# Stdout mode +# Turn off all colors and disables image backend (ASCII/Image). +# Useful for piping into another command. +# Default: 'off' +# Values: 'on', 'off' +stdout="off" # Config version. # # NOTE: Don't change this value, neofetch reads this to determine # how to handle backwards compatibility. -config_version="3.2.1-git" +config_version="3.3.1-git" diff --git a/config/travis.conf b/config/travis.conf index ad3bac08..0dada093 100644 --- a/config/travis.conf +++ b/config/travis.conf @@ -5,8 +5,8 @@ print_info() { info title info underline - info "Model" model info "OS" distro + info "Host" model info "Kernel" kernel info "Uptime" uptime info "Packages" packages @@ -21,6 +21,7 @@ print_info() { info "Terminal Font" term_font info "CPU" cpu info "GPU" gpu + info "GPU Driver" gpu_driver info "Memory" memory info "CPU Usage" cpu_usage diff --git a/install.sh b/install.sh deleted file mode 100755 index 7f8fded5..00000000 --- a/install.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -while [ "$1" ]; do - case "$1" in - "--destdir") DESTDIR="$2" ;; - "--bindir") BINDIR="$2" ;; - "--confdir") CONFDIR="$2" ;; - "--prefix") PREFIX="$2" ;; - "--asciidir") ASCIIDIR="$2" ;; - "--mandir") MANDIR="$2" ;; - esac - shift -done - -if [ -z "$PREFIX" ]; then - [ -z "$BINDIR" ] && BINDIR="/usr/bin" - [ -z "$ASCIIDIR" ] && ASCIIDIR="/usr/share/neofetch/ascii/distro" - [ -z "$MANDIR" ] && MANDIR="/usr/share/man/man1" -else - [ -z "$BINDIR" ] && BINDIR="/bin" - [ -z "$ASCIIDIR" ] && ASCIIDIR="/share/neofetch/ascii/distro" - [ -z "$MANDIR" ] && MANDIR="/share/man/man1" -fi -[ -z "$CONFDIR" ] && CONFDIR="/etc/neofetch" - -mkdir -p "${DESTDIR}""${PREFIX}""${BINDIR}" -mkdir -p "${DESTDIR}""${PREFIX}""${CONFDIR}" -mkdir -p "${DESTDIR}""${PREFIX}""${ASCIIDIR}" -mkdir -p "${DESTDIR}""${PREFIX}""${MANDIR}" - -sed -i -e "s|CONFDIR|${PREFIX}${CONFDIR}|g" neofetch -sed -i -e "s|ASCIIDIR|${PREFIX}${ASCIIDIR}|g" neofetch - -cp -p neofetch "${DESTDIR}""${PREFIX}""${BINDIR}" -cp -p config/config.conf "${DESTDIR}""${PREFIX}""${CONFDIR}" -cp -p ascii/distro/* "${DESTDIR}""${PREFIX}""${ASCIIDIR}" -cp -p neofetch.1 "${DESTDIR}""${PREFIX}""${MANDIR}" diff --git a/neofetch b/neofetch index 134dc60b..1742f790 100755 --- a/neofetch +++ b/neofetch @@ -9,7 +9,7 @@ # https://github.com/dylanaraps/ # Neofetch version. -version="3.2.1-git" +version="3.3.1-git" bash_version="${BASH_VERSION/.*}" sys_locale="${LANG:-C}" @@ -20,8 +20,8 @@ old_ifs="$IFS" export LC_ALL=C export LANG=C -# Add /usr/xpg4/bin, /usr/sbin, /sbin, and /usr/etc to PATH. -export PATH="/usr/xpg4/bin:/usr/sbin:/sbin:/usr/etc:${PATH}" +# Add more paths to $PATH. +export PATH="/usr/xpg4/bin:/usr/sbin:/sbin:/usr/etc:/usr/libexec:${PATH}" # Set no case match. shopt -s nocasematch @@ -58,32 +58,33 @@ get_distro() { case "$os" in "Linux" | "BSD" | "MINIX") - if [[ "$(< /proc/version)" == *"Microsoft"* || "$kernel_version" == *"Microsoft"* ]]; 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)" == *"cros"* || -f "/dev/cros_ec" ]]; then + 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/GoboLinuxVersion" ]]; then - case "$distro_shorthand" in - "on" | "tiny") distro="GoboLinux" ;; - *) distro="GoboLinux $(< /etc/GoboLinuxVersion)" - 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)" esac + elif [[ -f "/etc/siduction-version" ]]; then + case "$distro_shorthand" in + "on" | "tiny") distro="Siduction" ;; + *) distro="Siduction ($(lsb_release -sic))" + esac + elif type -p lsb_release >/dev/null; then case "$distro_shorthand" in "on") lsb_flags="-sir" ;; @@ -92,6 +93,12 @@ get_distro() { esac distro="$(lsb_release $lsb_flags)" + elif [[ -f "/etc/GoboLinuxVersion" ]]; then + case "$distro_shorthand" in + "on" | "tiny") distro="GoboLinux" ;; + *) distro="GoboLinux $(< /etc/GoboLinuxVersion)" + esac + elif type -p guix >/dev/null; then case "$distro_shorthand" in "on" | "tiny") distro="GuixSD" ;; @@ -115,9 +122,11 @@ get_distro() { distro="Android $(getprop ro.build.version.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 /etc/os-release /usr/lib/os-release; do - source "$file" 2>/dev/null && break + for file in "${files[@]}"; do + source "$file" && break done # Format the distro name. @@ -128,8 +137,8 @@ get_distro() { esac # Workarounds for distros that go against the os-release standard. - [[ -z "${distro// }" ]] && distro="$(awk '/BLAG/ {print $1; exit}' /etc/os-release /usr/lib/os-release)" - [[ -z "${distro// }" ]] && distro="$(awk -F'=' '{print $2; exit}' /etc/os-release /usr/lib/os-release)" + [[ -z "${distro// }" ]] && distro="$(awk '/BLAG/ {print $1; exit}')" "${files[@]}" + [[ -z "${distro// }" ]] && distro="$(awk -F'=' '{print $2; exit}')" "${files[@]}" else for release_file in /etc/*-release; do @@ -146,10 +155,13 @@ get_distro() { # Workarounds for FreeBSD based distros. [[ -f "/etc/pcbsd-lang" ]] && distro="PCBSD" [[ -f "/etc/rc.conf.trueos" ]] && distro="TrueOS" - [[ -f "/etc/pacbsd-release" ]] && distro="PacBSD" # /etc/pacbsd-release is an empty file + + # /etc/pacbsd-release is an empty file + [[ -f "/etc/pacbsd-release" ]] && distro="PacBSD" fi fi distro="$(trim_quotes "$distro")" + distro="${distro/'NAME='}" ;; "Mac OS X") @@ -166,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" @@ -176,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}}" ;; @@ -222,11 +235,13 @@ get_distro() { ;; esac + distro="${distro//Enterprise Server}" + [[ -z "$distro" ]] && distro="$os (Unknown)" # Get OS architecture. case "$os" in - "Solaris" | "AIX" | "BSD" | "Haiku" | "IRIX") machine_arch="$(uname -p)" ;; + "Solaris" | "AIX" | "Haiku" | "IRIX") machine_arch="$(uname -p)" ;; *) machine_arch="$(uname -m)" ;; esac @@ -268,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" ;; @@ -295,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" ;; @@ -339,6 +360,12 @@ get_model() { model="${model//Default string}" model="${model//Not Specified}" model="${model//Type1ProductConfigId}" + model="${model//INVALID}" + model="${model//�}" + + case "$model" in + "Standard PC"*) model="KVM/QEMU (${model})" ;; + esac } get_title() { @@ -501,9 +528,6 @@ get_packages() { type -p pacman-g2 >/dev/null && \ packages="$((packages+=$(pacman-g2 -Q | wc -l)))" - type -p cave >/dev/null && \ - packages="$((packages+=$(ls -d -1 /var/db/paludis/repositories/cross-installed/*/data/* /var/db/paludis/repositories/installed/data/* | wc -l)))" - type -p lvu >/dev/null && \ packages="$((packages+=$(lvu installed | wc -l)))" @@ -525,6 +549,17 @@ get_packages() { type -p tazpkg >/dev/null && \ packages="$((packages+=$(tazpkg list | wc -l) - 6))" + type -p sorcery >/dev/null && \ + packages="$((packages+=$(gaze installed | wc -l)))" + + type -p alps >/dev/null && \ + packages="$((packages+=$(alps showinstalled | wc -l)))" + + if type -p cave >/dev/null; then + package_dir=(/var/db/paludis/repositories/{cross-installed,installed}/*/data/*) + packages="$((packages+=$(ls -d -1 "${package_dir[@]}" | wc -l)))" + fi + if type -p pkg >/dev/null; then case "$kernel_name" in "FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;; @@ -633,7 +668,7 @@ get_de() { de="${de/Budgie:GNOME/Budgie}" elif [[ "$DESKTOP_SESSION" ]]; then - de="${DESKTOP_SESSION/ *}" + de="${DESKTOP_SESSION##*/}" elif [[ "$GNOME_DESKTOP_SESSION_ID" ]]; then de="GNOME" @@ -674,12 +709,16 @@ get_wm() { ((wm_run == 1)) && return if [[ -n "$DISPLAY" && "$os" != "Mac OS X" ]]; then - id="$(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}')" - wm="$(xprop -id "$id" -notype -f _NET_WM_NAME 8t)" + id="$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)" + id="${id##* }" + wm="$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)" wm="${wm/*_NET_WM_NAME = }" wm="${wm/\"}" wm="${wm/\"*}" + # Window Maker does not set _NET_WM_NAME + [[ "$wm" =~ "WINDOWMAKER" ]] && wm="wmaker" + # Fallback for Wayland wms. [[ "$wm" == "xwlc" ]] && \ wm="$(ps -e | grep -m 1 -o -F -e "sway" -e "orbment" -e "velox" -e "orbital")" @@ -687,9 +726,10 @@ get_wm() { else case "$os" in "Mac OS X") - ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm')" + ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm\|[c]hun[k]wm')" case "$ps_line" in + *"chunkwm"*) wm="chunkwm" ;; *"kwm"*) wm="Kwm" ;; *"Amethyst"*) wm="Amethyst" ;; *"Spectacle"*) wm="Spectacle" ;; @@ -698,7 +738,11 @@ get_wm() { ;; "Windows") - wm="$(tasklist | grep -m 1 -o -F -e "bugn" -e "Windawesome" -e "blackbox" -e "emerge" -e "litestep")" + wm="$(tasklist | grep -m 1 -o -F -e "bugn" \ + -e "Windawesome" \ + -e "blackbox" \ + -e "emerge" \ + -e "litestep")" [[ "$wm" == "blackbox" ]] && wm="bbLean (Blackbox)" wm="${wm:+$wm, }Explorer" ;; @@ -714,8 +758,14 @@ get_wm_theme() { ((de_run != 1)) && get_de case "$wm" in - "E16") wm_theme="$(awk -F "= " '/theme.name/ {print $2}' "${HOME}/.e16/e_config--0.0.cfg")";; - "Sawfish") wm_theme="$(awk -F ")" '/\(quote default-frame-style/ {print $2}' "${HOME}/.sawfish/custom")" ;; + "E16") + wm_theme="$(awk -F "= " '/theme.name/ {print $2}' "${HOME}/.e16/e_config--0.0.cfg")" + ;; + + "Sawfish") + wm_theme="$(awk -F ")" '/\(quote default-frame-style/ {print $2}' \ + "${HOME}/.sawfish/custom")" + ;; "Cinnamon" | "Muffin" | "Mutter (Muffin)") detheme="$(gsettings get org.cinnamon.theme name)" @@ -749,7 +799,8 @@ get_wm_theme() { "E17" | "Enlightenment") if type -p eet >/dev/null; then - wm_theme="$(eet -d "${HOME}/.e/e/config/standard/e.cfg" config | awk '/value \"file\" string.*.edj/ {print $4}')" + wm_theme="$(eet -d "${HOME}/.e/e/config/standard/e.cfg" config |\ + awk '/value \"file\" string.*.edj/ {print $4}')" wm_theme="${wm_theme##*/}" wm_theme="${wm_theme%.*}" fi @@ -773,12 +824,13 @@ get_wm_theme() { ob_file="rc" fi - wm_theme="$(awk -F "[<,>]" '/]" '//dev/null 2>&1 && song="$(mpc current)" + "pogo"*) + song="$(dbus-send --print-reply --dest=org.mpris.pogo /Player \ + org.freedesktop.MediaPlayer.GetMetadata | + awk -F'"' '/string "artist"/ {getline; a=$2} /string "title"/ {getline; t=$2} \ + END{print a " - " t}')" ;; + + *) mpc >/dev/null 2>&1 && song="$(mpc current)" ;; esac [[ "$(trim "$song")" == "-" ]] && unset -v song @@ -1486,16 +1574,22 @@ get_resolution() { resolution="${resolution//x??@/ @ }" else - resolution="$(system_profiler SPDisplaysDataType | awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')" + resolution="$(system_profiler SPDisplaysDataType |\ + awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')" fi - scale_factor="$(/usr/libexec/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 @@ -1528,8 +1622,18 @@ get_resolution() { *) if type -p xrandr >/dev/null; then case "$refresh_rate" in - "on") resolution="$(xrandr --nograb --current | awk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')" ;; - "off") resolution="$(xrandr --nograb --current | awk '/\*/ {printf $1 ", "}')" ;; + "on") + resolution="$(xrandr --nograb --current |\ + awk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ "\ + substr($0,RSTART,RLENGTH) "Hz, "}')" + ;; + + "off") + resolution="$(xrandr --nograb --current |\ + awk -F 'connected |\\+|\\(' \ + '/ connected/ && $2 {printf $2 ", "}')" + resolution="${resolution/primary }" + ;; esac resolution="${resolution//\*}" @@ -1558,15 +1662,17 @@ get_style() { if [[ -f "${kde_config_dir}/kdeglobals" ]]; then kde_config_file="${kde_config_dir}/kdeglobals" - theme="$(grep "^[^#]*${kde}" "$kde_config_file")" - theme="${theme/${kde}*=}" - theme="$(uppercase "$theme")" - - gtk_shorthand="on" + kde_theme="$(grep "^${kde}" "$kde_config_file")" + 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." fi - return ;; *"Cinnamon"*) @@ -1647,7 +1753,7 @@ get_style() { [[ "$gtk3" == "off" ]] && unset gtk3_theme # Format the string based on which themes exist. - if [[ "$gtk2_theme" && "$gtk2_theme" == "$gtk3_theme" ]]; then + if [[ "$gtk2_theme" && "$gtk2_theme" == "$gtk3_theme" ]]; then gtk3_theme+=" [GTK2/3]" unset gtk2_theme @@ -1661,12 +1767,14 @@ get_style() { fi # Final string. - theme="${gtk2_theme}${gtk3_theme}" + theme="${kde_theme}${gtk2_theme}${gtk3_theme}" + theme="${theme%, }" # Make the output shorter by removing "[GTKX]" from the string. if [[ "$gtk_shorthand" == "on" ]]; then theme="${theme// '[GTK'[0-9]']'}" theme="${theme/ '[GTK2/3]'}" + theme="${theme/ '[KDE]'}" fi fi } @@ -1676,7 +1784,7 @@ get_theme() { gsettings="gtk-theme" gconf="gtk_theme" xfconf="/Net/ThemeName" - kde="widgetStyle" + kde="Name" get_style } @@ -1727,7 +1835,9 @@ get_term() { case "${name// }" in "${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;; "login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;; - "ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;; + "ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"* | "kdeinit"*) + break + ;; "gnome-terminal-") term="gnome-terminal" ;; *"nvim") term="Neovim Terminal" ;; *"NeoVimServer"*) term="VimR Terminal" ;; @@ -1745,62 +1855,75 @@ get_term_font() { case "$term" in "alacritty"*) - term_font="$(awk -F ':|#' '/normal:/ {getline; print}' "${XDG_CONFIG_HOME}/alacritty/alacritty.yml")" + term_font="$(awk -F ':|#' '/normal:/ {getline; print}' \ + "${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 -e 'tell application "Terminal" to font name of window frontmost')" + term_font="$(osascript -e 'tell application "Terminal" to \ + font name of window frontmost')" ;; "iTerm2") # Unfortunately the profile name is not unique, but it seems to be the only thing - # that identifies an active profile. There is the "id of current session of current window" - # thou, but that does not match to a guid in the plist. - # So, be warned! Collisions may occur! + # that identifies an active profile. There is the "id of current session of current win- + # dow" though, but that does not match to a guid in the plist. + # So, be warned, collisions may occur! # See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg - local current_profile_name - current_profile_name="$(osascript -e 'tell application "iTerm2" to profile name of current session of current window')" + local current_profile_name profiles_count profile_name diff_font none_ascii + + 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 + font_file="${HOME}/Library/Preferences/com.googlecode.iterm2.plist" # Count Guids in "New Bookmarks"; they should be unique - local profiles_count - profiles_count="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null | grep -c "Guid")" + profiles_count="$(PlistBuddy -c "Print :New\ Bookmarks:" "$font_file" | grep -c "Guid")" for ((i=0; i<=profiles_count; i++)); do - local profile_name - profile_name="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null)" + profile_name="$(PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" "$font_file")" if [[ "$profile_name" == "$current_profile_name" ]]; then # "Normal Font" - term_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Normal\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)" + term_font="$(PlistBuddy -c "Print :New\ Bookmarks:${i}:Normal\ Font:" \ + "$font_file")" + # Font for non-ascii characters # Only check for a different non-ascii font, if the user checked # the "use a different font for non-ascii text" switch. - local use_different_font - use_different_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Use\ Non-ASCII\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)" + diff_font="$(PlistBuddy -c "Print :New\ Bookmarks:${i}:Use\ Non-ASCII\ Font:" \ + "$font_file")" - if [[ "$use_different_font" == "true" ]]; then - local non_ascii_font - non_ascii_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)" + if [[ "$diff_font" == "true" ]]; then + non_ascii="$(PlistBuddy -c "Print :New\ Bookmarks:${i}:Non\ Ascii\ Font:" \ + "$font_file")" - [[ "$term_font" != "$non_ascii_font" ]] && \ - term_font="$term_font (normal) / $non_ascii_font (non-ascii)" + [[ "$term_font" != "$non_ascii" ]] && \ + term_font="$term_font (normal) / $non_ascii (non-ascii)" fi fi done ;; "deepin-terminal"*) - term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END{print a " " b}' "${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")" + term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END{print a " " b}' \ + "${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")" + ;; + + "GNUstep_Terminal") + term_font="$(awk -F '>|<' '/>TerminalFontTerminalFontSize/dev/null 2>&1 || \ + type -p df >/dev/null 2>&1 ||\ { err "Disk requires 'df' to function. Install 'df' to get disk info."; return; } # Get "df" version. df_version="$(df --version 2>&1)" case "$df_version" in - *"blocks"*) err "Your version of df cannot be used due to the non-standard flags" ; return ;; # Haiku + *"blocks"*) # Haiku + err "Your version of df cannot be used due to the non-standard flags" + return + ;; *"IMitv"*) df_flags=(-P -g) ;; # AIX *"befhikm"*) df_flags=(-P -k) ;; # IRIX *) df_flags=(-P -h) ;; @@ -1926,8 +2083,10 @@ get_disk() { IFS="$old_ifs" # Stop here if 'df' fails to print disk info. - [[ -z "${disks[@]}" ]] && \ - { err "Disk: df failed to print the disks, make sure the disk_show array is set properly."; return; } + if [[ -z "${disks[*]}" ]]; then + err "Disk: df failed to print the disks, make sure the disk_show array is set properly." + return + fi for disk in "${disks[@]}"; do # Create a second array and make each element split at whitespace this time. @@ -1935,7 +2094,10 @@ get_disk() { disk_perc="${disk_info[4]/'%'}" case "$df_version" in - *"befhikm"*|"bdf") 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 @@ -1971,7 +2133,7 @@ get_battery() { "Linux") # We use 'prin' here so that we can do multi battery support # with a single battery per line. - for bat in "/sys/class/power_supply/"{BAT,axp288_fuel_gauge}*; do + for bat in "/sys/class/power_supply/"{BAT,axp288_fuel_gauge,CMB}*; do capacity="$(< "${bat}/capacity")" status="$(< "${bat}/status")" @@ -2118,12 +2280,34 @@ get_install_date() { ls_prog="$(ls --version 2>&1)" case "$ls_prog" in - *"BusyBox"*) install_date="$(ls -tdce "$install_file" | awk '{printf $10 " " $7 " " $8 " " $9}')" ;; - *"crtime"*) install_date="$(ls -tdcE "$install_file" | awk '{printf $6 " " $7}')" ;; # xpg4 (Solaris) - *"ACFHLRSZ"*) install_date="$(ls -dl "$install_file" | awk '{printf $6 " " $7}')" ;; # Toybox - *"GNU coreutils"*) install_date="$(ls -tcd --full-time "$install_file" | awk '{printf $6 " " $7}')" ;; - *"ACFHLNRS"* | *"RadC1xmnlog"* | *"1ARadeCx"*) err "Install Date doesn't work because your 'ls' does not support showing full date and time."; return ;; # AIX, IRIX, and HP-UX ls - *) install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " "$7 " " $8}')" ;; + *"BusyBox"*) + install_date="$(ls -tdce "$install_file" | awk '{printf $10 " " $7 " " $8 " " $9}')" + ;; + + *"crtime"*) # xpg4 (Solaris) + install_date="$(ls -tdcE "$install_file" | awk '{printf $6 " " $7}')" + ;; + + *"ACFHLRSZ"*) # Toybox + install_date="$(ls -dl "$install_file" | awk '{printf $6 " " $7}')" + ;; + + *"GNU coreutils"*) + install_date="$(ls -tcd --full-time "$install_file" | awk '{printf $6 " " $7}')" + ;; + + *"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 + ;; + + *"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//-/ }" @@ -2136,6 +2320,23 @@ get_locale() { locale="$sys_locale" } +get_gpu_driver() { + case "$os" in + "Linux") + gpu_driver="$(lspci -nnk | awk -F ': ' \ + '/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 +} + get_cols() { if [[ "$color_blocks" == "on" ]]; then # Convert the width to space chars. @@ -2211,12 +2412,13 @@ image_backend() { get_image_size make_thumbnail - display_image 2>/dev/null + display_image ;; *) err "Image: Unknown image backend specified '$image_backend'." - err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'termpix', 'tycat', 'w3m')" + err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', + 'off', 'sixel', 'termpix', 'tycat', 'w3m')" err "Image: Falling back to ascii mode." get_ascii ;; @@ -2257,7 +2459,7 @@ get_ascii() { export LC_ALL="$sys_locale" # Turn file into variable. - while IFS=$'\n' read -r line 2>/dev/null; do + while IFS=$'\n' read -r line; do print+="$line \n" # Calculate size of ascii file in line length / line count. @@ -2286,7 +2488,7 @@ get_ascii() { get_image_source() { case "$image_source" in "auto" | "wall" | "wallpaper") - get_wallpaper 2>/dev/null + get_wallpaper ;; *) @@ -2295,7 +2497,7 @@ get_image_source() { if [[ -d "$image_source" ]]; then shopt -s nullglob - files=("${image_source%/}"/*.{png,jpg,jpeg,jpe,gif}) + files=("${image_source%/}"/*.{png,jpg,jpeg,jpe,gif,svg}) shopt -u nullglob image="${files[RANDOM % ${#files[@]}]}" @@ -2338,7 +2540,10 @@ get_wallpaper() { case "$de" in "MATE"*) image="$(gsettings get org.mate.background picture-filename)" ;; - "Xfce"*) image="$(xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/workspace0/last-image)" ;; + "Xfce"*) + image="$(xfconf-query -c xfce4-desktop -p \ + "/backdrop/screen0/monitor0/workspace0/last-image")" + ;; "Cinnamon"*) image="$(gsettings get org.cinnamon.desktop.background picture-uri)" @@ -2347,10 +2552,11 @@ 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;}' "${XDG_CONFIG_HOME}/nitrogen/bg-saved.cfg")" + image="$(awk -F'=' '/file/ {printf $2;exit;}' \ + "${XDG_CONFIG_HOME}/nitrogen/bg-saved.cfg")" else image="$(gsettings get org.gnome.desktop.background picture-uri)" @@ -2386,6 +2592,9 @@ get_w3m_img_path() { elif [[ -x "/usr/local/libexec/w3m/w3mimgdisplay" ]]; then w3m_img_path="/usr/local/libexec/w3m/w3mimgdisplay" + elif [[ -x "$HOME/.nix-profile/libexec/w3m/w3mimgdisplay" ]]; then + w3m_img_path="$HOME/.nix-profile/libexec/w3m/w3mimgdisplay" + else err "Image: w3m-img wasn't found on your system" fi @@ -2444,12 +2653,14 @@ get_term_size() { current_window="$(xdpyinfo | grep -E -o "focus:.*0x[0-9a-f]+")" current_window="${current_window/*window }" elif type -p xprop >/dev/null 2>&1; then - current_window="$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}')" + current_window="$(xprop -root _NET_ACTIVE_WINDOW)" + current_window="${current_window##* }" fi # If the ID was found get the window size. if [[ "$current_window" ]]; then - term_size="$(xwininfo -id "$current_window" | awk -F ': ' '/Width|Height/ {printf $2 " "}')" + term_size="$(xwininfo -id "$current_window" |\ + awk -F ': ' '/Width|Height/ {printf $2 " "}')" term_width="${term_size/ *}" term_height="${term_size/${term_width}}" else @@ -2511,13 +2722,13 @@ get_image_size() { make_thumbnail() { # Name the thumbnail using variables so we can # use it later. - image_name="$crop_mode-$crop_offset-$width-$height" + image_name="$crop_mode-$crop_offset-$width-$height-${image//'/'/_}" - # Check to see if the image has a file extension, - # if it doesn't then add one. - case "${image##*/}" in - *"."*) image_name="${image_name}-${image##*/}" ;; - *) image_name="${image_name}-${image##*/}.jpg" ;; + # Handle file extensions. + case "${image##*.}" in + "eps"|"pdf"|"svg"|"gif"|"png") + image_name+=".png" ;; + *) image_name+=".jpg" ;; esac # Create the thumbnail dir if it doesn't exist. @@ -2544,6 +2755,7 @@ make_thumbnail() { -format "%[pixel:p{0,0}]" info:)" convert \ + -background none \ "$image" \ -trim +repage \ -gravity south \ @@ -2555,6 +2767,7 @@ make_thumbnail() { "fill") convert \ + -background none \ "$image" \ -trim +repage \ -scale "$width"x"$height"^ \ @@ -2565,6 +2778,7 @@ make_thumbnail() { "none") cp "$image" "$thumbnail_dir/$image_name" ;; *) convert \ + -background none \ "$image" \ -gravity "$crop_offset" \ -crop "$size"x"$size"+0+0 \ @@ -2582,15 +2796,20 @@ make_thumbnail() { display_image() { case "$image_backend" in "caca") - img2txt -W "$((width / font_width)))" -H "$((height / font_height))" --gamma=0.6 "$image" || to_off "Image: libcaca failed to display the image." + img2txt -W "$((width / font_width)))" \ + -H "$((height / font_height))" \ + --gamma=0.6 "$image" ||\ + to_off "Image: libcaca failed to display the image." ;; "catimg") - catimg -w "$((width * 2 / font_width))" -r 0 "$image" || to_off "Image: catimg failed to display the image." + catimg -w "$((width * 2 / font_width))" -r 0 "$image" ||\ + to_off "Image: catimg failed to display the image." ;; "jp2a") - jp2a --width="$((width / font_width))" --colors "$image" || to_off "Image: jp2a failed to display the image." + jp2a --width="$((width / font_width))" --colors "$image" ||\ + to_off "Image: jp2a failed to display the image." ;; "sixel") @@ -2598,11 +2817,13 @@ display_image() { ;; "termpix") - termpix --width "$((width / font_width))" "$image" || to_off "Image: termpix failed to display the image." + termpix --width "$((width / font_width))" "$image" ||\ + to_off "Image: termpix failed to display the image." ;; "iterm2") - iterm_cmd="\033]1337;File=width=${width}px;height=${height}px;inline=1:$(base64 < "$image")" + image="$(base64 < "$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="\033Ptmux;\033${iterm_cmd}\033\\" @@ -2611,7 +2832,8 @@ display_image() { ;; "tycat") - tycat "$image" || to_off "Image: tycat failed to display the image." + tycat "$image" ||\ + to_off "Image: tycat failed to display the image." ;; "w3m") @@ -2621,7 +2843,8 @@ display_image() { # appearing in specific terminal emulators. sleep 0.05 printf "%b\n" "0;1;$xoffset;$yoffset;$width;$height;;;;;$image\n4;\n3;" |\ - "${w3m_img_path:-false}" -bg "$background_color" >/dev/null & 2>&1 || to_off "Image: w3m-img failed to display the image." + "${w3m_img_path:-false}" -bg "$background_color" >/dev/null 2>&1 ||\ + to_off "Image: w3m-img failed to display the image." zws="\xE2\x80\x8B\x20" ;; @@ -2636,7 +2859,7 @@ to_ascii() { image_backend="ascii" # Print the ascii art. - get_ascii 2>/dev/null + get_ascii # Set cursor position next image/ascii. printf "%b" "\033[${lines:-0}A\033[9999999D" @@ -2652,7 +2875,7 @@ to_off() { # SCREENSHOT take_scrot() { - scrot_program "${scrot_dir}${scrot_name}" 2>/dev/null + scrot_program "${scrot_dir}${scrot_name}" err "Scrot: Saved screenshot as: ${scrot_dir}${scrot_name}" @@ -2679,12 +2902,14 @@ scrot_upload() { case "$image_host" in "teknik") - image_url="$(curl -sf -F file="@${image_file};type=image/png" "https://api.teknik.io/v1/Upload")" + image_url="$(curl -sf -F file="@${image_file};type=image/png" \ + "https://api.teknik.io/v1/Upload")" image_url="$(awk -F 'url:|,' '{printf $2}' <<< "${image_url//\"}")" ;; "imgur") - image_url="$(curl -sH "Authorization: Client-ID 0e8b44d15e9fc95" -F image="@${image_file}" "https://api.imgur.com/3/upload")" + image_url="$(curl -sH "Authorization: Client-ID 0e8b44d15e9fc95" \ + -F image="@${image_file}" "https://api.imgur.com/3/upload")" image_url="$(awk -F 'id:|,' '{printf $2}' <<< "${image_url//\"}")" [[ "$image_url" ]] && image_url="https://i.imgur.com/${image_url}.png" ;; @@ -2713,15 +2938,15 @@ scrot_program() { # We first check to see if an X server is running before # falling back to OS specific screenshot tools. if [[ -n "$DISPLAY" ]]; then - if [[ "$scrot_cmd" != "auto" ]] && type -p "$scrot_cmd" >/dev/null; then - scrot_program=("$scrot_cmd") - - elif type -p scrot >/dev/null; then - scrot_program=(scrot) + if [[ "$scrot_cmd" != "auto" ]] && type -p "${scrot_cmd%% *}" >/dev/null; then + scrot_program=($scrot_cmd) elif type -p maim >/dev/null; then scrot_program=(maim) + elif type -p scrot >/dev/null; then + scrot_program=(scrot) + elif type -p import >/dev/null && [[ "$os" != "Mac OS X" ]]; then scrot_program=(import -window root) @@ -2768,7 +2993,7 @@ info() { unset -v prin # Call the function. - "get_${2:-$1}" 2>/dev/null + "get_${2:-$1}" # If the get_func function called 'prin' directly, stop here. [[ "$prin" ]] && return @@ -2810,7 +3035,7 @@ prin() { string="${subtitle_color}${bold}${string}" # Print the info. - printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${string}${reset} " + printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${string}${reset}" # Calculate info height. ((++info_height)) @@ -2822,7 +3047,8 @@ prin() { get_underline() { if [[ "$underline_enabled" == "on" ]]; then printf -v underline "%${length}s" - printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline_color}${underline// /$underline_char}${reset} " + printf "%b%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline_color}" \ + "${underline// /$underline_char}${reset}" unset -v length fi prin=1 @@ -2911,6 +3137,11 @@ get_distro_colors() { ascii_file="alpine" ;; + "Amazon"*) + set_colors 3 7 + ascii_file="amazon" + ;; + "Android"*) set_colors 2 7 ascii_file="android" @@ -2967,6 +3198,16 @@ get_distro_colors() { ascii_file="arch" ;; + "Artix"*) + set_colors 6 4 2 7 + ascii_file="artix" + ;; + + "Arya"*) + set_colors 2 1 + ascii_file="arya" + ;; + "Bitrig"*) set_colors 2 7 ascii_file="bitrig" @@ -3022,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" @@ -3032,6 +3278,11 @@ get_distro_colors() { ascii_file="crux" ;; + "debian_small") + set_colors 1 7 3 + ascii_file="debian_small" + ;; + "Debian"*) set_colors 1 7 3 ascii_file="debian" @@ -3067,6 +3318,11 @@ get_distro_colors() { ascii_file="elementary" ;; + "Endless"*) + set_colors 1 7 + ascii_file="endless" + ;; + "Exherbo"*) set_colors 4 7 1 ascii_file="exherbo" @@ -3077,6 +3333,11 @@ get_distro_colors() { ascii_file="fedora" ;; + "freebsd_small") + set_colors 1 7 3 + ascii_file="freebsd_small" + ;; + "FreeBSD"*) set_colors 1 7 3 ascii_file="freebsd" @@ -3187,6 +3448,16 @@ 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" + ;; + "mac" | "Darwin") set_colors 2 3 1 1 5 4 ascii_file="mac" @@ -3242,11 +3513,21 @@ get_distro_colors() { ascii_file="nitrux" ;; + "nixos_small") + set_colors 4 6 + ascii_file="nixos_small" + ;; + "NixOS"*) set_colors 4 6 ascii_file="nixos" ;; + "Nurunner"*) + set_colors 4 + ascii_file="nurunner" + ;; + "OBRevenge"*) set_colors 1 7 3 ascii_file="obrevenge" @@ -3307,6 +3588,11 @@ get_distro_colors() { ascii_file="parrot" ;; + "Parsix"*) + set_colors 3 1 7 8 + ascii_file="parsix" + ;; + "PCBSD"* | "TrueOS"*) set_colors 1 7 3 ascii_file="trueos" @@ -3322,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" @@ -3352,11 +3643,21 @@ get_distro_colors() { ascii_file="redhat" ;; + "Refracted Devuan"*) + set_colors 8 7 + ascii_file="refracta" + ;; + "Rosa"*) set_colors 4 7 1 ascii_file="rosa" ;; + "sabotage"*) + set_colors 4 7 1 + ascii_file="sabotage" + ;; + "Sabayon"*) set_colors 4 7 1 ascii_file="sabayon" @@ -3377,6 +3678,11 @@ get_distro_colors() { ascii_file="scientific" ;; + "Siduction"*) + set_colors 4 4 + ascii_file="siduction" + ;; + "Slackware"*) set_colors 4 7 1 ascii_file="slackware" @@ -3397,6 +3703,11 @@ get_distro_colors() { ascii_file="solus" ;; + "Source Mage"*) + set_colors 4 7 1 + ascii_file="source_mage" + ;; + "Sparky"*) set_colors 1 7 ascii_file="sparky" @@ -3472,7 +3783,8 @@ get_distro_colors() { ascii_file="void" ;; - *"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* | "Windows 10"* | "windows10" | "windows8" ) + *"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* |\ + "Windows 10"* | "windows10" | "windows8" ) set_colors 6 7 ascii_file="windows10" ;; @@ -3595,6 +3907,22 @@ color() { # OTHER +stdout() { + image_backend="off" + unset subtitle_color + unset colon_color + unset info_color + unset underline_color + unset bold + unset title_color + unset at_color + unset text_padding + unset zws + unset reset + unset color_blocks + unset get_line_break +} + err() { err+="$(color 1)[!]\033[0m $1\n" } @@ -3776,9 +4104,6 @@ dynamic_prompt() { lines="$((lines - info_height))" fi - # Print a newline if color blocks are disabled. - [[ -z "$block_spaces" ]] && printf "\n" - # Set the prompt location. ((lines > 0)) && printf "%b" "\033[${lines}B" } @@ -3801,38 +4126,67 @@ old_functions() { } old_options() { - [[ -n "$osx_buildversion" ]] && err "Config: \$osx_buildversion is deprecated, use \$distro_shorthand instead." - [[ -n "$osx_codename" ]] && err "Config: \$osx_codename is deprecated, use \$distro_shorthand instead." - [[ "$cpu_cores" == "on" ]] && err "Config: cpu_cores='on' is deprecated, use cpu_cores='logical|physical|off' instead." - [[ -n "$image" ]] && { err "Config: \$image is deprecated, use \$image_source instead."; image_source="$image"; } + [[ -n "$osx_buildversion" ]] && \ + err "Config: \$osx_buildversion is deprecated, use \$distro_shorthand instead." + [[ -n "$osx_codename" ]] && \ + err "Config: \$osx_codename is deprecated, use \$distro_shorthand instead." + [[ "$cpu_cores" == "on" ]] && \ + err "Config: cpu_cores='on' is deprecated, use cpu_cores='logical|physical|off' instead." + [[ -n "$image" ]] && \ + { err "Config: \$image is deprecated, use \$image_source instead."; image_source="$image"; } # All progress_ variables were changed to bar_. - [[ -n "$progress_char" ]] && err "Config: \$progress_char is deprecated, use \$bar_char_elapsed and \$bar_char_total instead." - [[ -n "$progress_border" ]] && { err "Config: \$progress_border is deprecated, use \$bar_border instead."; bar_border="$progress_border"; } - [[ -n "$progress_length" ]] && { err "Config: \$progress_length is deprecated, use \$bar_length instead."; bar_length="$progress_length"; } - [[ -n "$progress_color_elapsed" ]] && { err "Config: \$progress_color_elapsed is deprecated, use \$bar_color_elapsed instead."; bar_color_elapsed="$progress_color_elapsed"; } - [[ -n "$progress_color_total" ]] && { err "Config: \$progress_color_total is deprecated, use \$bar_color_total instead."; bar_color_total="$progress_color_total"; } + [[ -n "$progress_char" ]] && \ + err "Config: \$progress_char is deprecated, use \$bar_char_{elapsed,total} instead." + [[ -n "$progress_border" ]] && \ + { err "Config: \$progress_border is deprecated, use \$bar_border instead."; \ + bar_border="$progress_border"; } + [[ -n "$progress_length" ]] && \ + { err "Config: \$progress_length is deprecated, use \$bar_length instead."; \ + bar_length="$progress_length"; } + [[ -n "$progress_color_elapsed" ]] && \ + { err "Config: \$progress_color_elapsed is deprecated, use \$bar_color_elapsed instead."; \ + bar_color_elapsed="$progress_color_elapsed"; } + [[ -n "$progress_color_total" ]] && \ + { err "Config: \$progress_color_total is deprecated, use \$bar_color_total instead."; \ + bar_color_total="$progress_color_total"; } # All cpufreq values were changed in 3.0. - [[ "$speed_type" == "current" ]] && err "Config: speed_type='current' is deprecated, use speed_type='scaling_cur_freq' instead." - [[ "$speed_type" == "min" ]] && err "Config: speed_type='min' is deprecated, use speed_type='scaling_min_freq' instead." - [[ "$speed_type" == "max" ]] && err "Config: speed_type='max' is deprecated, use speed_type='scaling_max_freq' instead." - [[ "$speed_type" == "bios" ]] && err "Config: speed_type='bios' is deprecated, use speed_type='bios_limit' instead." + [[ "$speed_type" == "current" ]] && \ + err "Config: speed_type='current' is deprecated, use speed_type='scaling_cur_freq' instead." + [[ "$speed_type" == "min" ]] && \ + err "Config: speed_type='min' is deprecated, use speed_type='scaling_min_freq' instead." + [[ "$speed_type" == "max" ]] && \ + err "Config: speed_type='max' is deprecated, use speed_type='scaling_max_freq' instead." + [[ "$speed_type" == "bios" ]] && \ + err "Config: speed_type='bios' is deprecated, use speed_type='bios_limit' instead." # Ascii_logo_size was removed in 3.0. - [[ "$ascii_logo_size" ]] && err "Config: ascii_logo_size is deprecated, use ascii_distro='{alpine,arch,crux,gentoo,openbsd,void}_small' instead." + [[ "$ascii_logo_size" ]] && \ + err "Config: ascii_logo_size is deprecated, use ascii_distro='{distro}_small' instead." # $start and $end were replaced with ${block_range[@]} in 3.0. - [[ "$start" && "$end" ]] && { err "Config: \$start and \$end are deprecated, use block_range=(0 7) instead."; block_range=("$start" "$end"); } + [[ "$start" && "$end" ]] && \ + { err "Config: \$start and \$end are deprecated, use block_range=(0 7) instead."; \ + block_range=("$start" "$end"); } # Fahrenheit support was added to CPU so the options were changed. - [[ "$cpu_temp" == "on" ]] && { err "Config: cpu_temp='on' is deprecated, use cpu_temp='C' or 'F' instead."; cpu_temp="C"; } + [[ "$cpu_temp" == "on" ]] && \ + { err "Config: cpu_temp='on' is deprecated, use cpu_temp='C' or 'F' instead."; + cpu_temp="C"; } # Birthday was renamed to Install Date in 3.0 - [[ -n "$birthday_time" ]] && { err "Config: \$birthday_time is deprecated, use \3install_time instead."; install_time="$birthday_time"; } + [[ -n "$birthday_time" ]] && \ + { err "Config: \$birthday_time is deprecated, use \3install_time instead."; \ + install_time="$birthday_time"; } # Scrot dir was removed in 3.1.0. [[ -n "$scrot_dir" ]] && scrot_dir= + + # cpu_shorthand was deprecated in 3.3.0 + [[ -n "$cpu_shorthand" ]] && \ + { err "Config: \$cpu_shorthand is deprecated, use \$cpu_brand, \$cpu_cores, and + \$cpu_speed instead."; } } cache_uname() { @@ -3847,7 +4201,7 @@ cache_uname() { convert_time() { # Convert ls timestamp to 'Tue 06 Dec 2016 4:58 PM' format. year="$1" - day="$3" + day="${3#0}" # Split time into hours/minutes. hour="${4/:*}" @@ -3973,7 +4327,7 @@ INFO: --disable infoname Allows you to disable an info line from appearing in the output. - NOTE: You can supply multiple args. eg. 'neofetch --disable cpu gpu disk shell' + NOTE: You can supply multiple args. eg. 'neofetch --disable cpu gpu' --os_arch on/off Hide/Show OS architecture. --speed_type type Change the type of cpu speed to display. @@ -3983,8 +4337,11 @@ INFO: NOTE: This only supports Linux with cpufreq. --speed_shorthand on/off Whether or not to show decimals in CPU speed. - --cpu_shorthand type Shorten the output of CPU - Possible values: name, speed, tiny, on, off + + NOTE: This flag is not supported in systems with CPU speed less than + 1 GHz. + + --cpu_brand on/off Enable/Disable CPU brand in output. --cpu_cores type Whether or not to display the number of CPU cores Possible values: logical, physical, off @@ -3995,7 +4352,8 @@ INFO: NOTE: This only works on Linux and BSD. - NOTE: For FreeBSD-based systems, you need to enable coretemp kernel module. + NOTE: For FreeBSD and NetBSD-based systems, you need to enable + coretemp kernel module. This only supports newer Intel processors. --distro_shorthand on/off Shorten the output of distro (tiny, on, off) @@ -4069,9 +4427,11 @@ BARS: IMAGE BACKEND: --backend backend Which image backend to use. - Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'tycat', 'w3m' + Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', + 'sixel', 'tycat', 'w3m' --source source Which image or ascii file to use. - Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' + Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', + '/path/to/ascii', '/path/to/dir/' --ascii source Shortcut to use 'ascii' backend. --caca source Shortcut to use 'caca' backend. --catimg source Shortcut to use 'catimg' backend. @@ -4083,7 +4443,8 @@ IMAGE BACKEND: --w3m source Shortcut to use 'w3m' backend. --off Shortcut to use 'off' backend. - NOTE: 'source; can be any of the following: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' + NOTE: 'source; can be any of the following: 'auto', 'ascii', 'wallpaper', '/path/to/img', + '/path/to/ascii', '/path/to/dir/' ASCII: --ascii_colors x x x x x x Colors to print the ascii art @@ -4095,11 +4456,13 @@ ASCII: NOTE: Ubuntu has flavor variants. - NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME', 'Ubuntu-Studio' or 'Ubuntu-Budgie' to use the flavors. + NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME', + 'Ubuntu-Studio' or 'Ubuntu-Budgie' to use the flavors. - NOTE: Alpine, Arch, Crux, Gentoo, OpenBSD, and Void have a smaller logo variant. + NOTE: Alpine, Arch, CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, + OpenBSD, and Void have a smaller logo variant. - NOTE: Change this to 'alpine_small', 'arch_small', 'crux_small', 'gentoo_small', 'openbsd_small', and 'void_small' to use the small logos. + NOTE: Use '{distro name}_small' to use the small variants. --ascii_bold on/off Whether or not to bold the ascii logo. -L, --logo Hide the info text and only show the ascii logo. @@ -4107,7 +4470,8 @@ ASCII: Possible values: bar, infobar, barinfo, off IMAGE: - --loop Redraw the image constantly until Ctrl+C is used. This fixes issues in some terminals emulators when using image mode. + --loop Redraw the image constantly until Ctrl+C is used. This fixes issues + in some terminals emulators when using image mode. --size 00px | --size 00% How to size the image. Possible values: auto, 00px, 00%, none --crop_mode mode Which crop mode to use @@ -4124,7 +4488,8 @@ IMAGE: This only works with w3m. --gap num Gap between image and text. - NOTE: --gap can take a negative value which will move the text closer to the left side. + NOTE: --gap can take a negative value which will move the text + closer to the left side. --clean Delete cached files and thumbnails. @@ -4138,6 +4503,7 @@ SCREENSHOT: OTHER: --config /path/to/config Specify a path to a custom config file --config none Launch the script without a config file + --stdout Turn off all colors and disables any ASCII/image backend. --help Print this text and exit --version Show neofetch version -v Display error messages. @@ -4165,6 +4531,9 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -4183,7 +4552,7 @@ exit 1 get_args() { # Check the commandline flags early for '--config'. - [[ "$@" != *--config* ]] && get_user_config 2>/dev/null + [[ "$*" != *--config* ]] && get_user_config while [[ "$1" ]]; do case "$1" in @@ -4196,7 +4565,7 @@ get_args() { "--distro_shorthand") distro_shorthand="$2" ;; "--kernel_shorthand") kernel_shorthand="$2" ;; "--uptime_shorthand") uptime_shorthand="$2" ;; - "--cpu_shorthand") cpu_shorthand="$2" ;; + "--cpu_brand") cpu_brand="$2" ;; "--gpu_brand") gpu_brand="$2" ;; "--gpu_type") gpu_type="$2" ;; "--refresh_rate") refresh_rate="$2" ;; @@ -4283,7 +4652,8 @@ get_args() { # Image backend "--backend") image_backend="$2" ;; "--source") image_source="$2" ;; - "--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--sixel" | "--termpix" | "--tycat" | "--w3m") + "--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--sixel" |\ + "--termpix" | "--tycat" | "--w3m") image_backend="${1/--}" case "$2" in "-"* | "") ;; @@ -4348,15 +4718,20 @@ get_args() { "none" | "off" | "") ;; *) config_file="$(get_full_path "$2")" - get_user_config 2>/dev/null + get_user_config ;; esac ;; + "--stdout") stdout="on" ;; "-v") verbose="on" ;; "-vv") set -x; verbose="on" ;; "--help") usage ;; "--version") version ;; - "--gen-man") help2man -n"A fast, highly customizable system info script" -N ./neofetch -o neofetch.1; exit 1 ;; + "--gen-man") + help2man -n "A fast, highly customizable system info script" \ + -N ./neofetch -o neofetch.1 + exit 1 + ;; esac shift @@ -4366,14 +4741,16 @@ get_args() { main() { cache_uname get_os - get_default_config 2>/dev/null + get_default_config get_args "$@" - get_distro 2>/dev/null + [[ "$verbose" != "on" ]] && exec 2>/dev/null + get_distro get_bold get_distro_colors + [[ "$stdout" == "on" ]] && stdout # Minix doesn't support these sequences. - if [[ "$TERM" != "minix" ]]; then + if [[ "$TERM" != "minix" && "$stdout" != "on" ]]; then # If the script exits for any reason, unhide the cursor. trap 'printf "\033[?25h\033[?7h"' EXIT @@ -4384,12 +4761,12 @@ main() { image_backend old_functions get_cache_dir - print_info 2>/dev/null + print_info dynamic_prompt # w3m-img: Draw the image a second time to fix # rendering issues in specific terminal emulators. - [[ "$image_backend" == *w3m* ]] && display_image 2>/dev/null + [[ "$image_backend" == *w3m* ]] && display_image # Take a screenshot. [[ "$scrot" == "on" ]] && take_scrot diff --git a/neofetch.1 b/neofetch.1 index 96dc4344..160b9905 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. -.TH NEOFETCH "1" "June 2017" "Neofetch 3.2.1-git" "User Commands" +.TH NEOFETCH "1" "September 2017" "Neofetch 3.3.0" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS @@ -18,7 +18,7 @@ NOTE: Every launch flag has a config option. Allows you to disable an info line from appearing in the output. .IP -NOTE: You can supply multiple args. eg. 'neofetch \fB\-\-disable\fR cpu gpu disk shell' +NOTE: You can supply multiple args. eg. 'neofetch \fB\-\-disable\fR cpu gpu' .TP \fB\-\-os_arch\fR on/off Hide/Show OS architecture. @@ -33,9 +33,11 @@ NOTE: This only supports Linux with cpufreq. \fB\-\-speed_shorthand\fR on/off Whether or not to show decimals in CPU speed. .TP -\fB\-\-cpu_shorthand\fR type -Shorten the output of CPU -Possible values: name, speed, tiny, on, off +NOTE: This flag is not supported in systems with CPU speed less than +1 GHz. +.TP +\fB\-\-cpu_brand\fR on/off +Enable/Disable CPU brand in output. .TP \fB\-\-cpu_cores\fR type Whether or not to display the number of CPU cores @@ -50,8 +52,9 @@ Hide/Show cpu speed. Hide/Show cpu temperature. .IP NOTE: This only works on Linux and BSD. -.IP -NOTE: For FreeBSD\-based systems, you need to enable coretemp kernel module. +.TP +NOTE: For FreeBSD and NetBSD\-based systems, you need to enable +coretemp kernel module. This only supports newer Intel processors. .TP \fB\-\-distro_shorthand\fR on/off Shorten the output of distro (tiny, on, off) @@ -181,11 +184,13 @@ Possible values: bar, infobar, barinfo, off .TP \fB\-\-backend\fR backend Which image backend to use. -Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'tycat', 'w3m' +Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', +\&'sixel', 'tycat', 'w3m' .TP \fB\-\-source\fR source Which image or ascii file to use. -Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' +Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', +\&'/path/to/ascii', '/path/to/dir/' .TP \fB\-\-ascii\fR source Shortcut to use 'ascii' backend. @@ -217,7 +222,8 @@ Shortcut to use 'w3m' backend. \fB\-\-off\fR Shortcut to use 'off' backend. .IP -NOTE: 'source; can be any of the following: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' +NOTE: 'source; can be any of the following: 'auto', 'ascii', 'wallpaper', '/path/to/img', +\&'/path/to/ascii', '/path/to/dir/' .SS "ASCII:" .TP \fB\-\-ascii_colors\fR x x x x x x @@ -231,12 +237,14 @@ NOTE: Arch and Ubuntu have 'old' logo variants. NOTE: Use 'arch_old' or 'ubuntu_old' to use the old logos. .IP NOTE: Ubuntu has flavor variants. +.TP +NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu\-GNOME', +\&'Ubuntu\-Studio' or 'Ubuntu\-Budgie' to use the flavors. +.TP +NOTE: Alpine, Arch, CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, +OpenBSD, and Void have a smaller logo variant. .IP -NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu\-GNOME', 'Ubuntu\-Studio' or 'Ubuntu\-Budgie' to use the flavors. -.IP -NOTE: Alpine, Arch, Crux, Gentoo, OpenBSD, and Void have a smaller logo variant. -.IP -NOTE: Change this to 'alpine_small', 'arch_small', 'crux_small', 'gentoo_small', 'openbsd_small', and 'void_small' to use the small logos. +NOTE: Use '{distro name}_small' to use the small variants. .TP \fB\-\-ascii_bold\fR on/off Whether or not to bold the ascii logo. @@ -248,7 +256,8 @@ Possible values: bar, infobar, barinfo, off .SS "IMAGE:" .TP \fB\-\-loop\fR -Redraw the image constantly until Ctrl+C is used. This fixes issues in some terminals emulators when using image mode. +Redraw the image constantly until Ctrl+C is used. This fixes issues +in some terminals emulators when using image mode. .TP \fB\-\-size\fR 00px | \fB\-\-size\fR 00% How to size the image. @@ -277,8 +286,9 @@ This only works with w3m. .TP \fB\-\-gap\fR num Gap between image and text. -.IP -NOTE: \fB\-\-gap\fR can take a negative value which will move the text closer to the left side. +.TP +NOTE: \fB\-\-gap\fR can take a negative value which will move the text +closer to the left side. .TP \fB\-\-clean\fR Delete cached files and thumbnails. @@ -303,6 +313,9 @@ Specify a path to a custom config file \fB\-\-config\fR none Launch the script without a config file .TP +\fB\-\-stdout\fR +Turn off all colors and disables any ASCII/image backend. +.TP \fB\-\-help\fR Print this text and exit .TP @@ -334,6 +347,9 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: .PP +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +.PP THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE