mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 09:08:38 +00:00
Compare commits
79 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
bd0f396305 | ||
|
3c03c47f50 | ||
|
b628ec0f4d | ||
|
6c238a03b2 | ||
|
8762403de9 | ||
|
a2290b7398 | ||
|
9f263fe184 | ||
|
c5c4f901ba | ||
|
9b5d75907b | ||
|
ed05c6460b | ||
|
7fc4f84217 | ||
|
c43ffb028e | ||
|
8540a2f1e3 | ||
|
db21981373 | ||
|
ca49b178fe | ||
|
1e8f12dd4a | ||
|
39cda4f29f | ||
|
ed99973989 | ||
|
fe9933f544 | ||
|
045577653c | ||
|
c3d47ece7d | ||
|
23340e29c3 | ||
|
fe057a157b | ||
|
f8c2bc2573 | ||
|
bb4bc945be | ||
|
acdd75220e | ||
|
a1e6843884 | ||
|
63df9687db | ||
|
744dd46330 | ||
|
dd8ee366b1 | ||
|
4fd2287582 | ||
|
d21f9e928d | ||
|
8fa9fd2e71 | ||
|
0f2ef38a5b | ||
|
06fdb40878 | ||
|
da983b3adf | ||
|
498991b106 | ||
|
98e2a0db99 | ||
|
857cbb21b4 | ||
|
402ac0bc00 | ||
|
87140464fc | ||
|
434a4d4fb7 | ||
|
4f3f0f73c0 | ||
|
322acffb95 | ||
|
1ab898e944 | ||
|
bb9389797f | ||
|
f7dc4441fc | ||
|
468c49efe7 | ||
|
3217b921e5 | ||
|
03d07f2c62 | ||
|
a26fd76ca6 | ||
|
51ff3d1c88 | ||
|
f6c362f5a1 | ||
|
75148f63ee | ||
|
3941971e3e | ||
|
123d1652ff | ||
|
3cac29c804 | ||
|
952f2e5b22 | ||
|
b57cdee02a | ||
|
b763c31ad7 | ||
|
f9d881e905 | ||
|
fd04aa14ae | ||
|
87a28b139a | ||
|
133e7bdc0c | ||
|
5caac4a91a | ||
|
fd535da792 | ||
|
11aa52e088 | ||
|
cbece346f8 | ||
|
f03ecddc13 | ||
|
c1dac90399 | ||
|
b3e90cc322 | ||
|
4e69a35fb0 | ||
|
eea725b8aa | ||
|
8fa1abd0c2 | ||
|
15879c8df8 | ||
|
b633ce9a0c | ||
|
8493805eda | ||
|
8d8b2da890 | ||
|
afd8e56d58 |
122
CHANGELOG.md
122
CHANGELOG.md
@@ -1,122 +1,42 @@
|
|||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
- **[@konimex](https://github.com/konimex)**
|
- [**@yslgirl**](https://github.com/yslgirl)
|
||||||
- **[@mstraube](https://github.com/mstraube)**
|
- [**@iandrewt**](https://github.com/iandrewt)
|
||||||
- **[@dominiklohmann](https://github.com/dominiklohmann)**
|
- [**@chrisweeksnz**](https://github.com/chrisweeksnz)
|
||||||
- **[@ybden](https://github.com/ybden)**
|
- [**@dawidd6**](https://github.com/dawidd6)
|
||||||
- **[@lexruee](https://github.com/lexruee)**
|
- [**@MitchWeaver**](https://github.com/MitchWeaver)
|
||||||
- **[@AMDmi3](https://github.com/AMDmi3)**
|
- [**@StarryTony**](https://github.com/StarryTony)
|
||||||
- **[@deadda7a](https://github.com/deadda7a)**
|
|
||||||
- **[@winneon](https://github.com/winneon)**
|
|
||||||
- **[@DamnWidget](https://github.com/DamnWidget)**
|
|
||||||
|
|
||||||
|
|
||||||
## General
|
## OS
|
||||||
|
|
||||||
- Config file now has a `.conf` suffix.
|
- Fixed detection bug with Gentoo.
|
||||||
- Neofetch now assumes target directories (config file and ASCII directory) at install time, this fixes problems with systems such as NixOS.
|
- Fixed detection bug with TrueOS. [**@dawidd6**](https://github.com/dawidd6)
|
||||||
- `stdout` mode is now reimplemented.
|
- Added support for macOS High Sierra. [**@yslgirl**](https://github.com/yslgirl)
|
||||||
- This mode prints the information in plain text.
|
- Added support for Container Linux by CoreOS. [**@chrisweeksnz**](https://github.com/chrisweeksnz)
|
||||||
- You can use it with `--stdout`.
|
- Added support for 2017 iOS devices [**@iandrewt**](https://github.com/iandrewt)
|
||||||
- Example: https://gist.github.com/dylanaraps/151c205322cf3acae62661b76464a3f7
|
- Added support for LEDE. [**@dawidd6**](https://github.com/dawidd6)
|
||||||
- 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
|
## Images
|
||||||
|
|
||||||
- [w3m] Fixed w3m-img not found on NixOS.
|
- [MacOS/iTerm2] Fixed thumbnail not appearing (replaced by placeholder) [**@StarryTony**](https://github.com/StarryTony)
|
||||||
- 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.
|
|
||||||
|
|
||||||
|
|
||||||
## Info
|
## 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**
|
**Window Manager**
|
||||||
|
|
||||||
- [macOS] Added support for `chunkwm`. **[@dominiklohmann](https://github.com/dominiklohmann)**
|
- [macOS] Fixed chunkwm being detected as Kwm. [**@iandrewt**](https://github.com/iandrewt)
|
||||||
- Fix incorrect output when using WindowMaker. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
|
|
||||||
**Song**
|
**Install Date**
|
||||||
|
|
||||||
- Added support for Pogo. **[@mstraube](https://github.com/mstraube)**
|
- [macOS] Fixed Install Date. [**@iandrewt**](https://github.com/iandrewt)
|
||||||
- Fixed bug with players not being found.
|
|
||||||
|
|
||||||
**Battery**
|
**Package Manager**
|
||||||
|
|
||||||
- Added battery support for Thinkpads and other devices that use the `CMB` naming for batteries. **[@deadda7a](https://github.com/deadda7a)**
|
- Added detection for Sabotage Linux's `butch` [**@MitchWeaver**](https://github.com/MitchWeaver)
|
||||||
|
|
||||||
|
**Resolution**
|
||||||
|
|
||||||
## Images
|
- [macOS] Fixed errors on non-retina screens. [**@iandrewt**](https://github.com/iandrewt)
|
||||||
|
|
||||||
- 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)**
|
|
||||||
|
@@ -1,18 +1,21 @@
|
|||||||
${c1} sy
|
${c1} 'c'
|
||||||
h--d
|
'kKk,
|
||||||
d---:
|
.dKKKx.
|
||||||
:----/N
|
.oKXKXKd.
|
||||||
:------/N
|
.l0XXXXKKo.
|
||||||
N/----:---+
|
c0KXXXXKX0l.
|
||||||
N/---+/ :--:o
|
:0XKKOxxOKX0l.
|
||||||
N/--:/ ::::s
|
:OXKOc. .c0XX0l.
|
||||||
+--- ::::s
|
:OK0o. ${c4}...${c1}'dKKX0l.
|
||||||
N+---+ ::::s
|
:OX0c ${c4};xOx'${c1}'dKXX0l.
|
||||||
N+----o +:o s::::s
|
:0KKo.${c4}.o0XXKd'.${c1}lKXX0l.
|
||||||
N/----:: s:::s h:::::s
|
c0XKd.${c4}.oKXXXXKd..${c1}oKKX0l.
|
||||||
N/----:::y::::+ o::::::o
|
.c0XKk;${c4}.l0K0OO0XKd..${c1}oKXXKo.
|
||||||
N/---::::::::::s d::::::::+N
|
.l0XXXk:${c4},dKx,.'l0XKo.${c1}.kXXXKo.
|
||||||
/--::::::::::::dd::::::::::+N
|
.o0XXXX0d,${c4}:x; .oKKx'${c1}.dXKXXKd.
|
||||||
:-:::/+syhd NNN N dhys+/:::/
|
.oKXXXXKK0c.${c4};. :00c'${c1}cOXXXXXKd.
|
||||||
d::+ydN /s+/d
|
.dKXXXXXXXXk,${c4}. cKx'${c1}'xKXXXXXXKx'
|
||||||
arc y\\.
|
'xKXXXXK0kdl:. ${c4}.ok; ${c1}.cdk0KKXXXKx'
|
||||||
|
'xKK0koc,.. ${c4}'c, ${c1} ..,cok0KKk,
|
||||||
|
,xko:'. ${c4}.. ${c1} .':okx;
|
||||||
|
.,'. .',.
|
||||||
|
20
ascii/distro/coreos
Normal file
20
ascii/distro/coreos
Normal 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:;..
|
||||||
|
.....
|
@@ -1,20 +1,20 @@
|
|||||||
${c1} `.:/ossyyyysso/:.
|
${c1} `.:/ossyyyysso/:.
|
||||||
.:oyyyyyyyyyyyyyyyyyyo:`
|
.:oyyyyyyyyyyyyyyyyyyo:`
|
||||||
-oyyyyyyyo-``/yyyyyyysyyyyo-
|
-oyyyyyyyo${c2}dMMy${c1}yyyyyyysyyyyo-
|
||||||
-syyyyyyyyyy` +yyyy/` `/yyyys-
|
-syyyyyyyyyy${c2}dMMy${c1}oyyyy${c2}dmMMy${c1}yyyys-
|
||||||
+yyys/./syyyy: ..-` /yyyyyy+
|
oyyys${c2}dMy${c1}syyyy${c2}dMMMMMMMMMMMMMy${c1}yyyyyyo
|
||||||
`oyyyy: `:syys+oooo+:. .yyyyyyyyo`
|
`oyyyy${c2}dMMMMy${c1}syysoooooo${c2}dMMMMy${c1}yyyyyyyyo`
|
||||||
+yyyyyy/ `/yyyyyyyyyyys/` /sssssyyy+
|
oyyyyyy${c2}dMMMMy${c1}yyyyyyyyyyys${c2}dMMy${c1}sssssyyyo
|
||||||
-yyyyyyyy- -syyyyyyyyyyyyyys- syyy-
|
-yyyyyyyy${c2}dMy${c1}syyyyyyyyyyyyyys${c2}dMMMMMy${c1}syyy-
|
||||||
oyyyyso+: .yyyyyyyyyyyyyyyyyy. `.+yyyo
|
oyyyysoo${c2}dMy${c1}yyyyyyyyyyyyyyyyyy${c2}dMMMMy${c1}syyyo
|
||||||
yyys /yyyyyyyyyyyyyyyyyysosyyyyyyyy
|
yyys${c2}dMMMMMy${c1}yyyyyyyyyyyyyyyyyysosyyyyyyyy
|
||||||
yyys.` /yyyyyyyyyyyyyyyyyyyyyyyyyyyyy
|
yyys${c2}dMMMMMy${c1}yyyyyyyyyyyyyyyyyyyyyyyyyyyyy
|
||||||
oyyyyyso: .yyyyyyyyyyyyyyyyyy.`.-:/syyyo
|
oyyyyysos${c2}dy${c1}yyyyyyyyyyyyyyyyyy${c2}dMMMMy${c1}syyyo
|
||||||
-yyyyyyyy. -syyyyyyyyyyyyyys- syyy-
|
-yyyyyyyy${c2}dMy${c1}syyyyyyyyyyyyyys${c2}dMMMMMy${c1}syyy-
|
||||||
+yyyyyy: `syyyyyyyyyyys/` /o+++oyyy+
|
oyyyyyy${c2}dMMMy${c1}syyyyyyyyyyys${c2}dMMy${c1}oyyyoyyyo
|
||||||
`oyyyy. -syyy++oooo+/. oyyyyyyyyo
|
`oyyyy${c2}dMMMy${c1}syyyoooooo${c2}dMMMMy${c1}oyyyyyyyyo
|
||||||
+yyys/-oyyyys` `..` -yyyyyyy+
|
oyyysyyoyyyys${c2}dMMMMMMMMMMMy${c1}yyyyyyyo
|
||||||
-syyyyyyyyy: .syyy/` `syyyys-
|
-syyyyyyyyy${c2}dMMMy${c1}syyy${c2}dMMMy${c1}syyyys-
|
||||||
-oyyyyyyy:.`-yyyyyys+syyyyo-
|
-oyyyyyyy${c2}dMMy${c1}yyyyyysosyyyyo-
|
||||||
./oyyyyyyyyyyyyyyyyyyo/.
|
./oyyyyyyyyyyyyyyyyyyo/.
|
||||||
`.:/oosyyyysso/:.`
|
`.:/oosyyyysso/:.`
|
||||||
|
9
ascii/distro/lede
Normal file
9
ascii/distro/lede
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
${c1} _________
|
||||||
|
/ /\
|
||||||
|
/ LE / \
|
||||||
|
/ DE / \
|
||||||
|
/________/ LE \
|
||||||
|
\ \ DE /
|
||||||
|
\ LE \ /
|
||||||
|
\ DE \ /
|
||||||
|
\________\/
|
13
ascii/distro/lunar
Normal file
13
ascii/distro/lunar
Normal 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
21
ascii/distro/pop_os
Normal 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}/////
|
||||||
|
///////////////////////////
|
||||||
|
/////////////////////
|
||||||
|
/////////////
|
||||||
|
|
@@ -26,7 +26,7 @@ print_info() {
|
|||||||
info "GPU" gpu
|
info "GPU" gpu
|
||||||
info "Memory" memory
|
info "Memory" memory
|
||||||
|
|
||||||
# info "GPU Driver" gpu_driver # Linux only
|
# info "GPU Driver" gpu_driver # Linux/macOS only
|
||||||
# info "CPU Usage" cpu_usage
|
# info "CPU Usage" cpu_usage
|
||||||
# info "Disk" disk
|
# info "Disk" disk
|
||||||
# info "Battery" battery
|
# info "Battery" battery
|
||||||
@@ -617,18 +617,8 @@ image_loop="off"
|
|||||||
# Values: 'dir'
|
# Values: 'dir'
|
||||||
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
|
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
|
||||||
|
|
||||||
# Crop mode
|
|
||||||
#
|
|
||||||
# Default: 'normal'
|
|
||||||
# Values: 'normal', 'fit', 'fill'
|
|
||||||
# Flag: --crop_mode
|
|
||||||
#
|
|
||||||
# See this wiki page to learn about the fit and fill options.
|
|
||||||
# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F
|
|
||||||
crop_mode="normal"
|
|
||||||
|
|
||||||
# Crop offset
|
# Crop offset
|
||||||
# Note: Only affects 'normal' crop mode.
|
# Note: Only affects 'square' image size.
|
||||||
#
|
#
|
||||||
# Default: 'center'
|
# Default: 'center'
|
||||||
# Values: 'northwest', 'north', 'northeast', 'west', 'center'
|
# Values: 'northwest', 'north', 'northeast', 'west', 'center'
|
||||||
@@ -637,20 +627,21 @@ crop_mode="normal"
|
|||||||
crop_offset="center"
|
crop_offset="center"
|
||||||
|
|
||||||
# Image size
|
# Image size
|
||||||
# The image is half the terminal width by default.
|
# NOTE: 'square' is the OLD behavior.
|
||||||
|
# NOTE: 'auto' keeps image aspect ratio and size where possible.
|
||||||
#
|
#
|
||||||
# Default: 'auto'
|
# Default: 'auto'
|
||||||
# Values: 'auto', '00px', '00%', 'none'
|
# Values: 'auto', 'square'
|
||||||
# Flags: --image_size
|
# Flags: --image_size
|
||||||
# --size
|
# --size
|
||||||
image_size="auto"
|
image_size="auto"
|
||||||
|
|
||||||
# Ggap between image and text
|
# Gap between image and text
|
||||||
#
|
#
|
||||||
# Default: '3'
|
# Default: '4'
|
||||||
# Values: 'num', '-num'
|
# Values: 'num', '-num'
|
||||||
# Flag: --gap
|
# Flag: --gap
|
||||||
gap=3
|
gap=4
|
||||||
|
|
||||||
# Image offsets
|
# Image offsets
|
||||||
# Only works with the w3m backend.
|
# Only works with the w3m backend.
|
||||||
@@ -729,4 +720,4 @@ stdout="off"
|
|||||||
#
|
#
|
||||||
# NOTE: Don't change this value, neofetch reads this to determine
|
# NOTE: Don't change this value, neofetch reads this to determine
|
||||||
# how to handle backwards compatibility.
|
# how to handle backwards compatibility.
|
||||||
config_version="3.3.0"
|
config_version="3.3.1-git"
|
||||||
|
255
neofetch
255
neofetch
@@ -9,7 +9,7 @@
|
|||||||
# https://github.com/dylanaraps/
|
# https://github.com/dylanaraps/
|
||||||
|
|
||||||
# Neofetch version.
|
# Neofetch version.
|
||||||
version="3.3.0"
|
version="3.3.1-git"
|
||||||
|
|
||||||
bash_version="${BASH_VERSION/.*}"
|
bash_version="${BASH_VERSION/.*}"
|
||||||
sys_locale="${LANG:-C}"
|
sys_locale="${LANG:-C}"
|
||||||
@@ -153,13 +153,14 @@ get_distro() {
|
|||||||
|
|
||||||
# Workarounds for FreeBSD based distros.
|
# Workarounds for FreeBSD based distros.
|
||||||
[[ -f "/etc/pcbsd-lang" ]] && distro="PCBSD"
|
[[ -f "/etc/pcbsd-lang" ]] && distro="PCBSD"
|
||||||
[[ -f "/etc/rc.conf.trueos" ]] && distro="TrueOS"
|
[[ -f "/etc/trueos-lang" ]] && distro="TrueOS"
|
||||||
|
|
||||||
# /etc/pacbsd-release is an empty file
|
# /etc/pacbsd-release is an empty file
|
||||||
[[ -f "/etc/pacbsd-release" ]] && distro="PacBSD"
|
[[ -f "/etc/pacbsd-release" ]] && distro="PacBSD"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
distro="$(trim_quotes "$distro")"
|
distro="$(trim_quotes "$distro")"
|
||||||
|
distro="${distro/'NAME='}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
@@ -176,6 +177,7 @@ get_distro() {
|
|||||||
"10.10"*) codename="OS X Yosemite" ;;
|
"10.10"*) codename="OS X Yosemite" ;;
|
||||||
"10.11"*) codename="OS X El Capitan" ;;
|
"10.11"*) codename="OS X El Capitan" ;;
|
||||||
"10.12"*) codename="macOS Sierra" ;;
|
"10.12"*) codename="macOS Sierra" ;;
|
||||||
|
"10.13"*) codename="macOS High Sierra" ;;
|
||||||
*) codename="macOS" ;;
|
*) codename="macOS" ;;
|
||||||
esac
|
esac
|
||||||
distro="$codename $osx_version $osx_build"
|
distro="$codename $osx_version $osx_build"
|
||||||
@@ -186,7 +188,7 @@ get_distro() {
|
|||||||
case "$osx_version" in
|
case "$osx_version" in
|
||||||
"10."[4-7]*) distro="${distro/${codename}/Mac OS X}" ;;
|
"10."[4-7]*) distro="${distro/${codename}/Mac OS X}" ;;
|
||||||
"10."[8-9]* | "10.1"[0-1]*) distro="${distro/${codename}/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
|
esac
|
||||||
distro="${distro/ ${osx_build}}"
|
distro="${distro/ ${osx_build}}"
|
||||||
;;
|
;;
|
||||||
@@ -277,13 +279,16 @@ get_model() {
|
|||||||
"iPhone OS")
|
"iPhone OS")
|
||||||
case "$machine_arch" in
|
case "$machine_arch" in
|
||||||
"iPad1,1") model="iPad" ;;
|
"iPad1,1") model="iPad" ;;
|
||||||
"iPad2,"[1-4]) model="iPad2" ;;
|
"iPad2,"[1-4]) model="iPad 2" ;;
|
||||||
"iPad3,"[1-3]) model="iPad3" ;;
|
"iPad3,"[1-3]) model="iPad 3" ;;
|
||||||
"iPad3,"[4-6]) model="iPad4" ;;
|
"iPad3,"[4-6]) model="iPad 4" ;;
|
||||||
|
"iPad6,11" | "iPad 6,12") model="iPad 5" ;;
|
||||||
"iPad4,"[1-3]) model="iPad Air" ;;
|
"iPad4,"[1-3]) model="iPad Air" ;;
|
||||||
"iPad5,"[3-4]) model="iPad Air 2" ;;
|
"iPad5,"[3-4]) model="iPad Air 2" ;;
|
||||||
"iPad6,"[7-8]) model="iPad Pro (12.9 Inch)" ;;
|
"iPad6,"[7-8]) model="iPad Pro (12.9 Inch)" ;;
|
||||||
"iPad6,"[3-4]) model="iPad Pro (9.7 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" ;;
|
"iPad2,"[5-7]) model="iPad mini" ;;
|
||||||
"iPad4,"[4-6]) model="iPad mini 2" ;;
|
"iPad4,"[4-6]) model="iPad mini 2" ;;
|
||||||
"iPad4,"[7-9]) model="iPad mini 3" ;;
|
"iPad4,"[7-9]) model="iPad mini 3" ;;
|
||||||
@@ -304,6 +309,9 @@ get_model() {
|
|||||||
"iPhone8,4") model="iPhone SE" ;;
|
"iPhone8,4") model="iPhone SE" ;;
|
||||||
"iPhone9,1" | "iPhone9,3") model="iPhone 7" ;;
|
"iPhone9,1" | "iPhone9,3") model="iPhone 7" ;;
|
||||||
"iPhone9,2" | "iPhone9,4") model="iPhone 7 Plus" ;;
|
"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" ;;
|
"iPod1,1") model="iPod touch" ;;
|
||||||
"ipod2,1") model="iPod touch 2G" ;;
|
"ipod2,1") model="iPod touch 2G" ;;
|
||||||
@@ -344,6 +352,8 @@ get_model() {
|
|||||||
model="${model//Default string}"
|
model="${model//Default string}"
|
||||||
model="${model//Not Specified}"
|
model="${model//Not Specified}"
|
||||||
model="${model//Type1ProductConfigId}"
|
model="${model//Type1ProductConfigId}"
|
||||||
|
model="${model//INVALID}"
|
||||||
|
model="${model//<2F>}"
|
||||||
|
|
||||||
case "$model" in
|
case "$model" in
|
||||||
"Standard PC"*) model="KVM/QEMU (${model})" ;;
|
"Standard PC"*) model="KVM/QEMU (${model})" ;;
|
||||||
@@ -542,6 +552,9 @@ get_packages() {
|
|||||||
packages="$((packages+=$(ls -d -1 "${package_dir[@]}" | wc -l)))"
|
packages="$((packages+=$(ls -d -1 "${package_dir[@]}" | wc -l)))"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
type -p butch >/dev/null && \
|
||||||
|
packages="$((packages+=$(butch list | wc -l)))"
|
||||||
|
|
||||||
if type -p pkg >/dev/null; then
|
if type -p pkg >/dev/null; then
|
||||||
case "$kernel_name" in
|
case "$kernel_name" in
|
||||||
"FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;;
|
"FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;;
|
||||||
@@ -676,6 +689,10 @@ get_de() {
|
|||||||
*"xfce5"*) de="Xfce5" ;;
|
*"xfce5"*) de="Xfce5" ;;
|
||||||
*"xfce"*) de="Xfce" ;;
|
*"xfce"*) de="Xfce" ;;
|
||||||
*"mate"*) de="MATE" ;;
|
*"mate"*) de="MATE" ;;
|
||||||
|
*"GNOME"*)
|
||||||
|
de="$(gnome-shell --version)"
|
||||||
|
de="${de/Shell }"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Log that the function was run.
|
# Log that the function was run.
|
||||||
@@ -704,11 +721,11 @@ get_wm() {
|
|||||||
else
|
else
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Mac OS X")
|
"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
|
case "$ps_line" in
|
||||||
*"kwm"*) wm="Kwm" ;;
|
|
||||||
*"chunkwm"*) wm="chunkwm" ;;
|
*"chunkwm"*) wm="chunkwm" ;;
|
||||||
|
*"kwm"*) wm="Kwm" ;;
|
||||||
*"Amethyst"*) wm="Amethyst" ;;
|
*"Amethyst"*) wm="Amethyst" ;;
|
||||||
*"Spectacle"*) wm="Spectacle" ;;
|
*"Spectacle"*) wm="Spectacle" ;;
|
||||||
*) wm="Quartz Compositor" ;;
|
*) wm="Quartz Compositor" ;;
|
||||||
@@ -741,7 +758,7 @@ get_wm_theme() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
"Sawfish")
|
"Sawfish")
|
||||||
wm_theme="$(awk -F ")" '/\(quote default-frame-style/ {print $2}' \
|
wm_theme="$(awk -F '\\(quote|\\)' '/default-frame-style/ {print $(NF-4)}' \
|
||||||
"${HOME}/.sawfish/custom")"
|
"${HOME}/.sawfish/custom")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -909,7 +926,12 @@ get_cpu() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
speed_dir="/sys/devices/system/cpu/cpu0/cpufreq"
|
speed_dir="/sys/devices/system/cpu/cpu0/cpufreq"
|
||||||
temp_dir="/sys/class/hwmon/hwmon0/temp1_input"
|
|
||||||
|
# Select the right temperature file.
|
||||||
|
for temp_dir in /sys/class/hwmon/*; do
|
||||||
|
[[ "$(< "${temp_dir}/name")" =~ (coretemp|fam15h_power) ]] && \
|
||||||
|
{ temp_dir="${temp_dir}/temp1_input"; break; }
|
||||||
|
done
|
||||||
|
|
||||||
# Get CPU speed.
|
# Get CPU speed.
|
||||||
if [[ -d "$speed_dir" ]]; then
|
if [[ -d "$speed_dir" ]]; then
|
||||||
@@ -927,8 +949,8 @@ get_cpu() {
|
|||||||
|
|
||||||
# Get CPU temp.
|
# Get CPU temp.
|
||||||
if [[ -f "$temp_dir" ]]; then
|
if [[ -f "$temp_dir" ]]; then
|
||||||
temp="$(< "$temp_dir")"
|
deg="$(< "$temp_dir")"
|
||||||
temp="$((temp * 100 / 10000))"
|
deg="$((deg * 100 / 10000))"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get CPU cores.
|
# Get CPU cores.
|
||||||
@@ -991,12 +1013,12 @@ get_cpu() {
|
|||||||
# Get CPU temp.
|
# Get CPU temp.
|
||||||
case "$kernel_name" in
|
case "$kernel_name" in
|
||||||
"FreeBSD"* | "DragonFly"* | "NetBSD"*)
|
"FreeBSD"* | "DragonFly"* | "NetBSD"*)
|
||||||
temp="$(sysctl -n dev.cpu.0.temperature)"
|
deg="$(sysctl -n dev.cpu.0.temperature)"
|
||||||
temp="${temp/C}"
|
deg="${deg/C}"
|
||||||
;;
|
;;
|
||||||
"OpenBSD"* | "Bitrig"*)
|
"OpenBSD"* | "Bitrig"*)
|
||||||
temp="$(sysctl -n hw.sensors.lm0.temp0)"
|
deg="$(sysctl -n hw.sensors.lm0.temp0)"
|
||||||
temp="${temp/ degC}"
|
deg="${deg/ degC}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
@@ -1113,15 +1135,15 @@ get_cpu() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Add CPU temp to the output.
|
# Add CPU temp to the output.
|
||||||
if [[ "$cpu_temp" != "off" && "$temp" ]]; then
|
if [[ "$cpu_temp" != "off" && "$deg" ]]; then
|
||||||
temp="${temp//.}"
|
deg="${deg//.}"
|
||||||
|
|
||||||
# Convert to Fahrenheit if enabled
|
# Convert to Fahrenheit if enabled
|
||||||
[[ "$cpu_temp" == "F" ]] && temp="$((temp * 90 / 50 + 320))"
|
[[ "$cpu_temp" == "F" ]] && deg="$((deg * 90 / 50 + 320))"
|
||||||
|
|
||||||
# Format the output
|
# Format the output
|
||||||
temp="[${temp/${temp: -1}}.${temp: -1}°${cpu_temp:-C}]"
|
deg="[${deg/${deg: -1}}.${deg: -1}°${cpu_temp:-C}]"
|
||||||
cpu="$cpu $temp"
|
cpu="$cpu $deg"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1410,7 +1432,7 @@ get_song() {
|
|||||||
player="$(ps x | awk '!(/ awk|Helper|Cache|ibus|indicator/) && /mpd|mopidy|cmus|mocp|spotify|\
|
player="$(ps x | awk '!(/ awk|Helper|Cache|ibus|indicator/) && /mpd|mopidy|cmus|mocp|spotify|\
|
||||||
Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|\
|
Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|\
|
||||||
xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|\
|
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() {
|
get_song_dbus() {
|
||||||
# Multiple players use an almost identical dbus command to get the information.
|
# Multiple players use an almost identical dbus command to get the information.
|
||||||
@@ -1441,6 +1463,7 @@ guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk|pogo/ {printf $5 " " $6;
|
|||||||
"yarock"*) get_song_dbus "yarock" ;;
|
"yarock"*) get_song_dbus "yarock" ;;
|
||||||
"deepin-music"*) get_song_dbus "deepinmusic" ;;
|
"deepin-music"*) get_song_dbus "deepinmusic" ;;
|
||||||
"tomahawk"*) get_song_dbus "tomahawk" ;;
|
"tomahawk"*) get_song_dbus "tomahawk" ;;
|
||||||
|
"elisa"*) get_song_dbus "elisa" ;;
|
||||||
|
|
||||||
"audacious"*)
|
"audacious"*)
|
||||||
song="$(audtool current-song)"
|
song="$(audtool current-song)"
|
||||||
@@ -1536,14 +1559,18 @@ get_resolution() {
|
|||||||
awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')"
|
awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
scale_factor="$(PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" \
|
if [[ -e "/Library/Preferences/com.apple.windowserver.plist" ]]; then
|
||||||
/Library/Preferences/com.apple.windowserver.plist)"
|
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.
|
# If no refresh rate is empty.
|
||||||
[[ "$resolution" == *"@ Hz"* ]] && \
|
[[ "$resolution" == *"@ Hz"* ]] && \
|
||||||
resolution="${resolution//@ Hz}"
|
resolution="${resolution//@ Hz}"
|
||||||
|
|
||||||
((${scale_factor%.*} == 2)) && \
|
[[ "${scale_factor%.*}" == 2 ]] && \
|
||||||
resolution="${resolution// @/@2x @}"
|
resolution="${resolution// @/@2x @}"
|
||||||
|
|
||||||
if [[ "$refresh_rate" == "off" ]]; then
|
if [[ "$refresh_rate" == "off" ]]; then
|
||||||
@@ -1617,7 +1644,12 @@ get_style() {
|
|||||||
kde_config_file="${kde_config_dir}/kdeglobals"
|
kde_config_file="${kde_config_dir}/kdeglobals"
|
||||||
|
|
||||||
kde_theme="$(grep "^${kde}" "$kde_config_file")"
|
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], "
|
kde_theme="$(uppercase "$kde_theme") [KDE], "
|
||||||
else
|
else
|
||||||
err "Theme: KDE config files not found, skipping."
|
err "Theme: KDE config files not found, skipping."
|
||||||
@@ -2012,7 +2044,7 @@ get_disk() {
|
|||||||
# Get "df" version.
|
# Get "df" version.
|
||||||
df_version="$(df --version 2>&1)"
|
df_version="$(df --version 2>&1)"
|
||||||
case "$df_version" in
|
case "$df_version" in
|
||||||
*"blocks"*) # Haiku
|
*"Tracker"*) # Haiku
|
||||||
err "Your version of df cannot be used due to the non-standard flags"
|
err "Your version of df cannot be used due to the non-standard flags"
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
@@ -2245,7 +2277,13 @@ get_install_date() {
|
|||||||
return
|
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
|
esac
|
||||||
|
|
||||||
install_date="${install_date//-/ }"
|
install_date="${install_date//-/ }"
|
||||||
@@ -2264,6 +2302,19 @@ get_gpu_driver() {
|
|||||||
gpu_driver="$(lspci -nnk | awk -F ': ' \
|
gpu_driver="$(lspci -nnk | awk -F ': ' \
|
||||||
'/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "}')"
|
'/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "}')"
|
||||||
gpu_driver="${gpu_driver%, }"
|
gpu_driver="${gpu_driver%, }"
|
||||||
|
|
||||||
|
if [[ "$gpu_driver" == *"nvidia"* ]]; then
|
||||||
|
gpu_driver="$(< /proc/driver/nvidia/version)"
|
||||||
|
gpu_driver="${gpu_driver/*Module }"
|
||||||
|
gpu_driver="NVIDIA ${gpu_driver/ *}"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"Mac OS X")
|
||||||
|
if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then
|
||||||
|
gpu_driver="NVIDIA Web Driver"
|
||||||
|
else
|
||||||
|
gpu_driver="macOS Default Graphics Driver"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -2483,7 +2534,7 @@ get_wallpaper() {
|
|||||||
|
|
||||||
*)
|
*)
|
||||||
if type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then
|
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
|
elif type -p nitrogen >/dev/null; then
|
||||||
image="$(awk -F'=' '/file/ {printf $2;exit;}' \
|
image="$(awk -F'=' '/file/ {printf $2;exit;}' \
|
||||||
@@ -2616,44 +2667,32 @@ get_image_size() {
|
|||||||
font_width="$((term_width / columns))"
|
font_width="$((term_width / columns))"
|
||||||
font_height="$((term_height / lines))"
|
font_height="$((term_height / lines))"
|
||||||
|
|
||||||
|
# Get image size.
|
||||||
|
size="$(identify -format "%w %h" "$image")"
|
||||||
|
width="${size%% *}"
|
||||||
|
height="${size##* }"
|
||||||
|
|
||||||
case "$image_size" in
|
case "$image_size" in
|
||||||
"auto")
|
"square")
|
||||||
image_size="$((columns * font_width / 2))"
|
width="$((columns * font_width / 2))"
|
||||||
term_height="$((term_height - term_height / 4))"
|
height="$width"
|
||||||
|
|
||||||
((term_height < image_size)) && \
|
|
||||||
image_size="$term_height"
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*"%")
|
*)
|
||||||
percent="${image_size/\%}"
|
while (( width >= (term_width / 2) ||
|
||||||
image_size="$((percent * term_width / 100))"
|
height >= (term_height / 2) )); do
|
||||||
|
width="$((width * 10 / 15))"
|
||||||
(((percent * term_height / 50) < image_size)) && \
|
height="$((height * 10 / 15))"
|
||||||
image_size="$((percent * term_height / 100))"
|
done
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"none")
|
|
||||||
# Get image size so that we can do a better crop.
|
|
||||||
size="$(identify -format "%w %h" "$image")"
|
|
||||||
width="${size%% *}"
|
|
||||||
height="${size##* }"
|
|
||||||
crop_mode="none"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*) image_size="${image_size/px}" ;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
width="${width:-$image_size}"
|
|
||||||
height="${height:-$image_size}"
|
|
||||||
|
|
||||||
text_padding="$((width / font_width + gap + xoffset/font_width))"
|
text_padding="$((width / font_width + gap + xoffset/font_width))"
|
||||||
}
|
}
|
||||||
|
|
||||||
make_thumbnail() {
|
make_thumbnail() {
|
||||||
# Name the thumbnail using variables so we can
|
# Name the thumbnail using variables so we can use it later.
|
||||||
# use it later.
|
image_name="$image_size-$crop_offset-$width-$height-${image##*/}"
|
||||||
image_name="$crop_mode-$crop_offset-$width-$height-${image//'/'/_}"
|
|
||||||
|
|
||||||
# Handle file extensions.
|
# Handle file extensions.
|
||||||
case "${image##*.}" in
|
case "${image##*.}" in
|
||||||
@@ -2665,62 +2704,17 @@ make_thumbnail() {
|
|||||||
# Create the thumbnail dir if it doesn't exist.
|
# Create the thumbnail dir if it doesn't exist.
|
||||||
mkdir -p "$thumbnail_dir"
|
mkdir -p "$thumbnail_dir"
|
||||||
|
|
||||||
# Check to see if the thumbnail exists before we do any cropping.
|
[[ ! -f "$thumbnail_dir/$image_name" ]] && \
|
||||||
if [[ ! -f "$thumbnail_dir/$image_name" ]]; then
|
convert \
|
||||||
# Get image size so that we can do a better crop.
|
"$image" \
|
||||||
if [[ -z "$size" ]]; then
|
-strip \
|
||||||
size="$(identify -format "%w %h" "$image")"
|
-quality 50 \
|
||||||
og_width="${size%% *}"
|
-gravity "$crop_offset" \
|
||||||
og_height="${size##* }"
|
-background none \
|
||||||
|
-sample "$width"x"$height"^ \
|
||||||
|
-extent "$width"x"$height" \
|
||||||
|
"$thumbnail_dir/$image_name"
|
||||||
|
|
||||||
# This checks to see if height is greater than width
|
|
||||||
# so we can do a better crop of portrait images.
|
|
||||||
size="$og_height"
|
|
||||||
((og_height > og_width)) && size="$og_width"
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$crop_mode" in
|
|
||||||
"fit")
|
|
||||||
c="$(convert "$image" \
|
|
||||||
-colorspace srgb \
|
|
||||||
-format "%[pixel:p{0,0}]" info:)"
|
|
||||||
|
|
||||||
convert \
|
|
||||||
-background none \
|
|
||||||
"$image" \
|
|
||||||
-trim +repage \
|
|
||||||
-gravity south \
|
|
||||||
-background "$c" \
|
|
||||||
-extent "$size"x"$size" \
|
|
||||||
-scale "$width"x"$height" \
|
|
||||||
"$thumbnail_dir/$image_name"
|
|
||||||
;;
|
|
||||||
|
|
||||||
"fill")
|
|
||||||
convert \
|
|
||||||
-background none \
|
|
||||||
"$image" \
|
|
||||||
-trim +repage \
|
|
||||||
-scale "$width"x"$height"^ \
|
|
||||||
-extent "$width"x"$height" \
|
|
||||||
"$thumbnail_dir/$image_name"
|
|
||||||
;;
|
|
||||||
|
|
||||||
"none") cp "$image" "$thumbnail_dir/$image_name" ;;
|
|
||||||
*)
|
|
||||||
convert \
|
|
||||||
-background none \
|
|
||||||
"$image" \
|
|
||||||
-gravity "$crop_offset" \
|
|
||||||
-crop "$size"x"$size"+0+0 \
|
|
||||||
-quality 95 \
|
|
||||||
-scale "$width"x"$height" \
|
|
||||||
"$thumbnail_dir/$image_name"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# The final image.
|
|
||||||
image="$thumbnail_dir/$image_name"
|
image="$thumbnail_dir/$image_name"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2966,7 +2960,7 @@ prin() {
|
|||||||
string="${subtitle_color}${bold}${string}"
|
string="${subtitle_color}${bold}${string}"
|
||||||
|
|
||||||
# Print the info.
|
# 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.
|
# Calculate info height.
|
||||||
((++info_height))
|
((++info_height))
|
||||||
@@ -2979,7 +2973,7 @@ get_underline() {
|
|||||||
if [[ "$underline_enabled" == "on" ]]; then
|
if [[ "$underline_enabled" == "on" ]]; then
|
||||||
printf -v underline "%${length}s"
|
printf -v underline "%${length}s"
|
||||||
printf "%b%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline_color}" \
|
printf "%b%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline_color}" \
|
||||||
"${underline// /$underline_char}${reset}"
|
"${underline// /$underline_char}${reset} "
|
||||||
unset -v length
|
unset -v length
|
||||||
fi
|
fi
|
||||||
prin=1
|
prin=1
|
||||||
@@ -3194,6 +3188,11 @@ get_distro_colors() {
|
|||||||
ascii_file="cloveros"
|
ascii_file="cloveros"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"Container Linux by CoreOS"*)
|
||||||
|
set_colors 4 7 1
|
||||||
|
ascii_file="coreos"
|
||||||
|
;;
|
||||||
|
|
||||||
"crux_small")
|
"crux_small")
|
||||||
set_colors 4 5 7 6
|
set_colors 4 5 7 6
|
||||||
ascii_file="crux_small"
|
ascii_file="crux_small"
|
||||||
@@ -3359,6 +3358,11 @@ get_distro_colors() {
|
|||||||
ascii_file="kubuntu"
|
ascii_file="kubuntu"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"LEDE"*)
|
||||||
|
set_colors 4 7 1
|
||||||
|
ascii_file="lede"
|
||||||
|
;;
|
||||||
|
|
||||||
"Linux")
|
"Linux")
|
||||||
set_colors fg 8 3
|
set_colors fg 8 3
|
||||||
ascii_file="linux"
|
ascii_file="linux"
|
||||||
@@ -3374,6 +3378,11 @@ get_distro_colors() {
|
|||||||
ascii_file="lubuntu"
|
ascii_file="lubuntu"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"Lunar"*)
|
||||||
|
set_colors 4 7 3
|
||||||
|
ascii_file="lunar"
|
||||||
|
;;
|
||||||
|
|
||||||
"mac"*"_small")
|
"mac"*"_small")
|
||||||
set_colors 2 3 1 5 4
|
set_colors 2 3 1 5 4
|
||||||
ascii_file="mac_small"
|
ascii_file="mac_small"
|
||||||
@@ -3529,6 +3538,11 @@ get_distro_colors() {
|
|||||||
ascii_file="peppermint"
|
ascii_file="peppermint"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"Pop!_OS"*)
|
||||||
|
set_colors 6 7
|
||||||
|
ascii_file="pop_os"
|
||||||
|
;;
|
||||||
|
|
||||||
"Porteus"*)
|
"Porteus"*)
|
||||||
set_colors 6 7
|
set_colors 6 7
|
||||||
ascii_file="porteus"
|
ascii_file="porteus"
|
||||||
@@ -4021,7 +4035,7 @@ dynamic_prompt() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Set the prompt location.
|
# Set the prompt location.
|
||||||
((lines > 0)) && printf "%b" "\033[${lines}B"
|
((lines > 1)) && printf "%b" "\033[${lines}B"
|
||||||
}
|
}
|
||||||
|
|
||||||
old_functions() {
|
old_functions() {
|
||||||
@@ -4388,11 +4402,9 @@ ASCII:
|
|||||||
IMAGE:
|
IMAGE:
|
||||||
--loop Redraw the image constantly until Ctrl+C is used. This fixes issues
|
--loop Redraw the image constantly until Ctrl+C is used. This fixes issues
|
||||||
in some terminals emulators when using image mode.
|
in some terminals emulators when using image mode.
|
||||||
--size 00px | --size 00% How to size the image.
|
--size auto | --size square How to size the image.
|
||||||
Possible values: auto, 00px, 00%, none
|
Possible values: auto, 00px, 00%, none
|
||||||
--crop_mode mode Which crop mode to use
|
--crop_offset value Change the crop offset for square mode.
|
||||||
Takes the values: normal, fit, fill
|
|
||||||
--crop_offset value Change the crop offset for normal mode.
|
|
||||||
Possible values: northwest, north, northeast,
|
Possible values: northwest, north, northeast,
|
||||||
west, center, east, southwest, south, southeast
|
west, center, east, southwest, south, southeast
|
||||||
|
|
||||||
@@ -4687,6 +4699,11 @@ main() {
|
|||||||
# Take a screenshot.
|
# Take a screenshot.
|
||||||
[[ "$scrot" == "on" ]] && take_scrot
|
[[ "$scrot" == "on" ]] && take_scrot
|
||||||
|
|
||||||
|
# Add neofetch info to verbose output.
|
||||||
|
err "Neofetch command: $0 $*"
|
||||||
|
err "Neofetch version: $version"
|
||||||
|
err "Neofetch config: $config_version"
|
||||||
|
|
||||||
# Show error messages.
|
# Show error messages.
|
||||||
[[ "$verbose" == "on" ]] && printf "%b" "$err" >&2
|
[[ "$verbose" == "on" ]] && printf "%b" "$err" >&2
|
||||||
|
|
||||||
|
13
neofetch.1
13
neofetch.1
@@ -1,5 +1,5 @@
|
|||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.5.
|
||||||
.TH NEOFETCH "1" "September 2017" "Neofetch 3.3.0" "User Commands"
|
.TH NEOFETCH "1" "December 2017" "Neofetch 3.3.1-git" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
Neofetch \- A fast, highly customizable system info script
|
Neofetch \- A fast, highly customizable system info script
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -259,16 +259,11 @@ Possible values: bar, infobar, barinfo, off
|
|||||||
Redraw the image constantly until Ctrl+C is used. This fixes issues
|
Redraw the image constantly until Ctrl+C is used. This fixes issues
|
||||||
in some terminals emulators when using image mode.
|
in some terminals emulators when using image mode.
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-size\fR 00px | \fB\-\-size\fR 00%
|
\fB\-\-size\fR auto | \fB\-\-size\fR square How to size the image.
|
||||||
How to size the image.
|
|
||||||
Possible values: auto, 00px, 00%, none
|
Possible values: auto, 00px, 00%, none
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-crop_mode\fR mode
|
|
||||||
Which crop mode to use
|
|
||||||
Takes the values: normal, fit, fill
|
|
||||||
.TP
|
|
||||||
\fB\-\-crop_offset\fR value
|
\fB\-\-crop_offset\fR value
|
||||||
Change the crop offset for normal mode.
|
Change the crop offset for square mode.
|
||||||
Possible values: northwest, north, northeast,
|
Possible values: northwest, north, northeast,
|
||||||
west, center, east, southwest, south, southeast
|
west, center, east, southwest, south, southeast
|
||||||
.TP
|
.TP
|
||||||
|
Reference in New Issue
Block a user