Compare commits

...

32 Commits

Author SHA1 Message Date
Dylan Araps
4217626cff docs: update 2019-03-04 10:26:08 +02:00
Dylan Araps
ce91e2f39a docs: update 2019-03-04 10:21:39 +02:00
Dylan Araps
cac22ec505 general: Starting cutting script down in size. 2019-03-04 10:16:52 +02:00
black
c688850bcc Merge pull request #1200 from nee-san/new-januslinux
new logo for janus
2019-02-23 20:55:40 +02:00
nee-san
3dc7720c52 new logo for janus
Signed-off-by: nee-san <nagisurame@gmail.com>
2019-02-23 22:52:28 +09:00
black
f41e5f11b5 Merge pull request #1198 from chrisweeksnz/clearlinux
Add ascii art for Clear Linux
2019-02-18 08:42:29 +02:00
chrisweeksnz
fcca698229 Add ascii art for Clear Linux 2019-02-18 17:47:04 +13:00
chrisweeksnz
cabe84481c Merge branch 'dylanaraps-master' 2019-02-18 16:10:45 +13:00
Muhammad Herdiansyah
2fccec783e ASCII: Updated Artix ASCII with new logo 2019-02-16 21:53:28 +07:00
Dylan Araps
1b75608304 general: fixed gnome shell mutter issue Closes #1194 2019-02-14 08:19:51 +02:00
Dylan Araps
1abc2ada77 docs: update 2019-02-12 18:36:18 +02:00
Dylan Araps
b5915ac836 Merge branch 'master' of github.com:dylanaraps/neofetch 2019-02-11 17:12:42 +02:00
Dylan Araps
7fd9ff75a3 term_font: Fix crash when parsing Xresources. Closes #1195 2019-02-11 17:12:31 +02:00
black
1a820cbbdf Merge pull request #1169 from dylanaraps/vte_img_fix
general: fix image sizing in VTE terminals.
2019-02-10 20:18:10 +02:00
black
11d8aa683a Merge pull request #1193 from SibrenVasse/kitty-fix
Robuster kitty font parsing
2019-02-08 17:33:31 +02:00
Sibren Vasse
6f423e3970 Robuster kitty font parsing 2019-02-08 16:19:56 +01:00
black
789cdcea40 Merge pull request #1191 from Crestwave/pkgman
packages: Specify Haiku's pkgman
2019-02-06 11:58:24 +02:00
Crestwave
c7c1cf59ec packages: Specify Haiku's pkgman 2019-02-06 08:02:49 +00:00
Dylan Araps
6e9f00445f os: Added support for Radix Linux 2019-02-04 08:53:06 +02:00
black
e8939d58cf Merge pull request #1188 from konimex/arm
CPU [Linux/ARM]: Use Hardware field directly
2019-02-03 22:17:15 +02:00
Muhammad Herdiansyah
60d3aa3f10 CPU [Linux/ARM]: Use Hardware field directly 2019-02-03 18:40:00 +07:00
black
762d239c32 Merge pull request #1187 from arisinfenix/konsole
term_font: fix issue with konsole font detection
2019-02-03 11:29:05 +02:00
Michael Straube
95fb38e73f term_font: fix issue with konsole font detection
Closes #1186
2019-02-03 10:03:58 +01:00
black
d87a13458f Merge pull request #1182 from julianaito/master
Fix big Puffy ascii logo
2019-01-30 22:59:04 +02:00
Charlène
78aed92b39 Fix big Puffy ascii logo 2019-01-30 21:44:16 +01:00
black
ccf9fb8ebd Merge pull request #1179 from GrantM11235/pmos-small
postmarketOS: Add small ASCII logo
2019-01-26 08:26:00 +02:00
Grant Miller
c8d2a0442c postmarketOS: Add small ASCII logo 2019-01-25 16:58:04 -06:00
black
bbbaf37e21 Merge pull request #1178 from GrantM11235/pmos
postmarketOS: Replace ASCII logo
2019-01-25 18:29:19 +02:00
Grant Miller
cb6e78efec postmarketOS: Replace ASCII logo 2019-01-25 10:04:28 -06:00
Dylan Araps
e3a6b9f40d Merge branch 'master' of github.com:dylanaraps/neofetch 2019-01-20 05:36:44 +02:00
Dylan Araps
0b812fbc5d general: Fix issue with URxvt and no internal border. Closes #1174 2019-01-20 05:36:25 +02:00
Muhammad Herdiansyah
91f8510ef3 Memory [AIX]: Detect memory based on pages (like Solaris) for more accuracy 2019-01-19 17:40:49 +07:00
2 changed files with 178 additions and 108 deletions

View File

@@ -7,7 +7,6 @@
<a href="./LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
<a href="https://github.com/dylanaraps/neofetch/releases"><img src="https://img.shields.io/github/release/dylanaraps/neofetch.svg"></a>
<a href="https://repology.org/metapackage/neofetch"><img src="https://repology.org/badge/tiny-repos/neofetch.svg" alt="Packaging status"></a>
<a href="#donate"><img src="https://img.shields.io/badge/donate-donate-yellow.svg"></a>
</p>
<img src="https://i.imgur.com/GFmC5Ad.png" alt="neofetch" align="right" height="240px">

285
neofetch
View File

@@ -812,27 +812,26 @@ EOF
# DETECT INFORMATION
get_os() {
# $kernel_name is set in a function called cache_uname and is
# just the output of "uname -s".
case "$kernel_name" in
"Darwin"): "$darwin_name" ;;
"SunOS"): "Solaris" ;;
"Haiku"): "Haiku" ;;
"MINIX"): "MINIX" ;;
"AIX"): "AIX" ;;
"IRIX"*): "IRIX" ;;
"FreeMiNT"): "FreeMiNT" ;;
# $kernel_name is the output of 'uname -s'.
case $kernel_name in
Darwin): "$darwin_name" ;;
SunOS): Solaris ;;
Haiku): Haiku ;;
MINIX): MINIX ;;
AIX): AIX ;;
IRIX*): IRIX ;;
FreeMiNT): FreeMiNT ;;
"Linux" | "GNU"*)
: "Linux"
Linux|GNU*)
: Linux
;;
*"BSD" | "DragonFly" | "Bitrig")
: "BSD"
*BSD|DragonFly|Bitrig)
: BSD
;;
"CYGWIN"* | "MSYS"* | "MINGW"*)
: "Windows"
CYGWIN*|MSYS*|MINGW*)
: Windows
;;
*)
@@ -841,6 +840,7 @@ get_os() {
exit 1
;;
esac
os="$_"
}
@@ -1389,7 +1389,7 @@ get_packages() {
;;
"Haiku")
dir /boot/system/package-links/*
has "pkgman" && dir /boot/system/package-links/*
;;
"IRIX")
@@ -1574,8 +1574,10 @@ get_wm() {
wm="${wm/\"*}"
fi
# Window Maker does not set _NET_WM_NAME
# Rename window managers to their proper values.
[[ "$wm" =~ "WINDOWMAKER" ]] && wm="wmaker"
[[ "$wm" =~ "GNOME Shell" ]] && wm="Mutter"
# Fallback for non-EWMH WMs.
[[ -z "$wm" ]] && \
wm="$(ps "${ps_flags[@]}" | grep -m 1 -o -F \
@@ -1805,13 +1807,9 @@ get_cpu() {
;;
*)
cpu="$(awk -F ': | @' '/model name|Processor|^cpu model|chip type|^cpu type/ {
printf $2;
exit
}' "$cpu_file")"
[[ "$cpu" == *"processor rev"* ]] && \
cpu="$(awk -F':' '/Hardware/ {print $2; exit}' "$cpu_file")"
cpu="$(awk -F ': | @' \
'/model name|Hardware|Processor|^cpu model|chip type|^cpu type/ {
printf $2; exit}' "$cpu_file")"
;;
esac
@@ -2307,10 +2305,20 @@ get_memory() {
esac
;;
"Solaris")
"Solaris" | "AIX")
hw_pagesize="$(pagesize)"
pages_total="$(kstat -p unix:0:system_pages:pagestotal | awk '{print $2}')"
pages_free="$(kstat -p unix:0:system_pages:pagesfree | awk '{print $2}')"
case "$os" in
"Solaris")
pages_total="$(kstat -p unix:0:system_pages:pagestotal | awk '{print $2}')"
pages_free="$(kstat -p unix:0:system_pages:pagesfree | awk '{print $2}')"
;;
"AIX")
IFS=$'\n'"| " read -d "" -ra mem_stat <<< "$(svmon -G -O unit=page)"
pages_total="${mem_stat[11]}"
pages_free="${mem_stat[16]}"
;;
esac
mem_total="$((pages_total * hw_pagesize / 1024 / 1024))"
mem_free="$((pages_free * hw_pagesize / 1024 / 1024))"
mem_used="$((mem_total - mem_free))"
@@ -2322,15 +2330,6 @@ get_memory() {
mem_used="$((${mem_used/max} / 1024 / 1024))"
;;
"AIX")
IFS=$'\n'"| " read -d "" -ra mem_stat <<< "$(svmon -G -O unit=MB)"
mem_total="${mem_stat[11]/.*}"
mem_free="${mem_stat[16]/.*}"
mem_used="$((mem_total - mem_free))"
mem_label="MB"
;;
"IRIX")
IFS=$'\n' read -d "" -ra mem_cmd <<< "$(pmem)"
IFS=" " read -ra mem_stat <<< "${mem_cmd[0]}"
@@ -2915,17 +2914,15 @@ END
kitty_config="$(kitty --debug-config)"
[[ "$kitty_config" != *font_family* ]] && return
term_font_size="${kitty_config/*font_size}"
term_font_size="${term_font_size/$'\n'*}"
term_font="${kitty_config/*font_family}"
term_font="${term_font/$'\n'*} $term_font_size"
term_font="$(awk '/^font_family|^font_size/ {printf $2 " "}' <<< "$kitty_config")"
;;
"konsole" | "yakuake")
# Get Process ID of current konsole window / tab
child="$(get_ppid "$$")"
IFS=$'\n' read -d "" -ra konsole_instances < <(qdbus | grep -F 'org.kde.konsole')
IFS=$'\n' read -d "" -ra konsole_instances \
< <(qdbus | awk '/org.kde.konsole/ {print $1}')
for i in "${konsole_instances[@]}"; do
IFS=$'\n' read -d "" -ra konsole_sessions < <(qdbus "$i" | grep -F '/Sessions/')
@@ -4157,9 +4154,17 @@ term_padding() {
case "$term" in
urxvt*|"rxvt-unicode")
[[ -z "$xrdb" ]] && xrdb="$(xrdb -query)"
[[ -z "$xrdb" ]] &&
xrdb="$(xrdb -query)"
[[ $xrdb != *".internalBorder:"* ]] &&
return
padding="${xrdb/*.internalBorder:}"
((padding=${padding/$'\n'*}))
padding="${padding/$'\n'*}"
[[ $padding =~ ^[0-9]+$ ]] ||
padding=
;;
esac
}
@@ -4420,7 +4425,7 @@ ASCII:
'Ubuntu-Studio' or 'Ubuntu-Budgie' to use the flavors.
NOTE: Alpine, Arch, CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS,
OpenBSD, and Void have a smaller logo variant.
OpenBSD, postmarketOS, and Void have a smaller logo variant.
NOTE: Use '{distro name}_small' to use the small variants.
@@ -5192,27 +5197,24 @@ EOF
;;
"Artix"*)
set_colors 6 4 2 7
set_colors 6 6 7 1
read -rd '' ascii_data <<'EOF'
${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}...
${c1} .'
.cc'
.cccc.
cccccc.
:ccccccc.
;ccccccccc
.;cccccc:
.. .;cccc;
'cccc;.. .,cc;
'ccccccccc:'. ''
.cccccccccccccc:;.
.cccccccccccccc:,. .
ccccccccccc;'. .;cc.
cccccccc,.. ':cccccc.
:ccc:'. .';ccccc
;;.. .';:
EOF
;;
@@ -5580,6 +5582,32 @@ ${c1} `.--::::::--.`
EOF
;;
"Clear Linux OS"*)
set_colors 4 3 7 6
read -rd '' ascii_data <<'EOF'
${c1} BBB
BBBBBBBBB
BBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBB BBB
BBBBBBBB${c2}YYYYY
${c1} BBBBBBBB${c2}YYYYYY
${c1} BBBBBBBB${c2}YYYYYYY
${c1} BBBBBBBBB${c2}YYYYY${c3}W
${c4} GG${c1}BBBBBBBY${c2}YYYY${c3}WWW
${c4} GGG${c1}BBBBBBB${c2}YY${c3}WWWWWWWW
${c4} GGGGGG${c1}BBBBBB${c3}WWWWWWWW
${c4} GGGGGGGG${c1}BBBB${c3}WWWWWWWW
${c4}GGGGGGGGGGG${c1}BBB${c3}WWWWWWW
${c4}GGGGGGGGGGGGG${c1}B${c3}WWWWWW
${c4}GGGGGGGG${c3}WWWWWWWWWWW
${c4}GG${c3}WWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWW
WWWWWWWWWW
WWW
EOF
;;
"Clover"*)
set_colors 2 6
read -rd '' ascii_data <<'EOF'
@@ -6320,21 +6348,25 @@ WW W
EOF
;;
"januslinux"*)
set_colors 7
"januslinux"*|"janus"*)
set_colors 4 7 4
read -rd '' ascii_data <<'EOF'
${c1} ________________
|\ \
| \ \
| \ \
| \ ______________\
| | |
| | |
| | |
\ | januslinux |
\ | |
\ | |
\|______________|
${c1}oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooo
ooooooooooooo${c2}dOWWOd${c1}ooooooooooooo
oooooooooood${c2}0WMMMMWkd${c1}ooooooooooo
oooooooood${c2}0WMMMMMX0KN0d${c1}oooolllll
ooooooo${c2}xKWMMMMWKxKWMMMWKx${c3}lllllll
ooooo${c2}xXMMMMMW0doooOWMMMMMXx${c3}lllll
ooooo${c2}xXMMMMMW0doloONMMMMMXx${c3}lllll
ooooooo${c2}xKWMMMWXO0WMMMMMKx${c3}lllllll
ooooooooo${c2}d0NX0KWMMMMW0d${c3}lllllllll
oooooooooooo${c2}xWMMMMW0o${c3}llllllccccc
oooooooooooll${c2}o0WW0o${c3}lllllcccccccc
ooooooooooollll${c2}oo${c3}llllllccccccccc
oooooooooollllllllllllcccccccccc
oooooooooollllllllllllcccccccccc
EOF
;;
@@ -7158,7 +7190,7 @@ ${c1} `-|.' /_. ${c4}\_| ${c1} F
|/`. `-. `._)
/ .-.\\
\\ ( `\\
`.\
`.\\
EOF
;;
@@ -7543,26 +7575,42 @@ s: yNm+` .smNd+.
EOF
;;
"postmarketos_small")
set_colors 2 7
read -rd '' ascii_data <<'EOF'
${c1} /\\
/ \\
/ \\
\\__ \\
/\\__ \\ _\\
/ / \\/ __
/ / ____/ \\
/ \\ \\ \\
/_____/ /________\\
EOF
;;
"PostMarketOS"*)
set_colors 2 7
read -rd '' ascii_data <<'EOF'
${c1} ss
`hMMh`
.dMMMMd.
-NMMMMMMN-
/MMMMMMMMMN/
hMMMMMMMMMMMo
y+`mMMmdNMMMMMMy
`dMM-.-:- .mMMMMMMh`
.mMMMMMMd` `dMMMMMMm.
:NMMMMMMy yMMMMMMN:
/MMMMMMMo oMMMmdmN/
oMMMMMMM/ /MN.-/:-.
`yMMMMMMN- -:.NMMMMy`
`dMMMMMMM- -/////////////dMMMMMMd`
-mMMMMMMMMN+`sMMMMMMMMMMMMMMMMMMMMm-
:NMMMMMMMMMMM/ yMMMMMMMMMMMMMMMMMMMMN:
+MMMMMMMMMMMh.:mMMMMMMMMMMMMMMMMMMMMMMM+
${c1} /\\
/ \\
/ \\
/ \\
/ \\
/ \\
\\ \\
/\\ \\____ \\
/ \\____ \\ \\
/ / \\ \\
/ / \\ ___\\
/ / \\ / ____
/ / \\/ / \\
/ / __________/ \\
/ \\ \\ \\
/ \\ \\ \\
/ / / \\
/___________/ /____________________\\
EOF
;;
@@ -7635,6 +7683,30 @@ ${c1} `..--..`
EOF
;;
"Radix"*)
set_colors 1 2
read -rd '' ascii_data <<'EOF'
${c2} .:oyhdmNo
`/yhyoosdms`
-o+/ohmmho-
..`.:/:-`
`.--:::-.``${c1}
.+ydNMMMMMMNmhs:`
`omMMMMMMMMMMMMMMNh-
oNMMMNmddhhyyhhhddmy.
mMMMMNmmddhhysoo+/:-`
yMMMMMMMMMMMMMMMMNNh.
-dmmmmmNNMMMMMMMMMMs`
-+oossyhmMMMMMMMMd-
`sNMMMMMMMMMMMMMm:
`yMMMMMMNmdhhhh:
`sNMMMMMNmmho.
`+mMMMMMMMy.
.yNMMMm+`
`:yd+.
EOF
;;
"Raspbian"*)
set_colors 2 1
read -rd '' ascii_data <<'EOF'
@@ -8743,10 +8815,9 @@ EOF
;;
esac
# Overwrite distro colors if '$ascii_colors' doesn't
# equal 'distro'.
if [[ "${ascii_colors[0]}" != "distro" ]]; then
color_text="off"
# Overwrite distro colors if '$ascii_colors' doesn't equal 'distro'.
if [[ ${ascii_colors[0]} != distro ]]; then
color_text=off
set_colors "${ascii_colors[@]}"
fi
}
@@ -8760,14 +8831,14 @@ main() {
get_args "$@"
get_simple "$@"
[[ "$verbose" != "on" ]] && exec 2>/dev/null
[[ $verbose != on ]] && exec 2>/dev/null
get_distro
get_bold
get_distro_ascii
[[ "$stdout" == "on" ]] && stdout
[[ $stdout == on ]] && stdout
# Minix doesn't support these sequences.
if [[ "$TERM" != "minix" && "$stdout" != "on" ]]; then
if [[ $TERM != minix && $stdout != on ]]; then
# If the script exits for any reason, unhide the cursor.
trap 'printf "\e[?25h\e[?7h"' EXIT
@@ -8783,17 +8854,17 @@ main() {
# w3m-img: Draw the image a second time to fix
# rendering issues in specific terminal emulators.
[[ "$image_backend" == *w3m* ]] && display_image
[[ $image_backend == *w3m* ]] && display_image
# Add neofetch info to verbose output.
err "Neofetch command: $0 $*"
err "Neofetch version: $version"
# Show error messages.
[[ "$verbose" == "on" ]] && printf "%b" "$err" >&2
[[ $verbose == on ]] && printf '%b' "$err" >&2
# If `--loop` was used, constantly redraw the image.
while [[ "$image_loop" == "on" && "$image_backend" == "w3m" ]]; do display_image; sleep 1; done
while [[ $image_loop == on && $image_backend == w3m ]]; do display_image; sleep 1; done
return 0
}