Compare commits

...

34 Commits

Author SHA1 Message Date
Andrew Titmuss
3b713ca92f WM Theme: update for Mojave 2019-03-12 17:32:43 +11:00
Dylan Araps
c690118884 general: Added --no_config to disable config file creation. 2019-03-11 22:18:33 +02:00
Dylan Araps
3546ec347c Merge branch 'master' of github.com:dylanaraps/neofetch 2019-03-11 15:10:38 +02:00
Dylan Araps
625fdcf7c4 packages: Show IRIX package manager name 2019-03-11 14:20:07 +02:00
Muhammad Herdiansyah
288a81a9e2 ASCII: Update Artix logo 2019-02-26 08:25:29 +07: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 175 additions and 90 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">

264
neofetch
View File

@@ -1389,10 +1389,11 @@ get_packages() {
;;
"Haiku")
dir /boot/system/package-links/*
has "pkgman" && dir /boot/system/package-links/*
;;
"IRIX")
manager="swpkg"
tot versions -b && ((packages-=3))
;;
esac
@@ -1574,8 +1575,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 \
@@ -1750,15 +1753,23 @@ get_wm_theme() {
"Quartz Compositor")
global_preferences="${HOME}/Library/Preferences/.GlobalPreferences.plist"
wm_theme="$(PlistBuddy -c "Print AppleInterfaceStyle" "$global_preferences")"
wm_theme_color="$(PlistBuddy -c "Print AppleAquaColorVariant" "$global_preferences")"
wm_theme_color="$(PlistBuddy -c "Print AppleAccentColor" "$global_preferences")"
[[ -z "$wm_theme" ]] && \
wm_theme="Light"
[[ -z "$wm_theme_color" ]] || ((wm_theme_color == 1)) && \
wm_theme_color="Blue"
case "$wm_theme_color" in
"-1") wm_theme_color="Graphite" ;;
"0") wm_theme_color="Red" ;;
"1") wm_theme_color="Orange" ;;
"2") wm_theme_color="Yellow" ;;
"3") wm_theme_color="Green" ;;
"5") wm_theme_color="Purple" ;;
"6") wm_theme_color="Pink" ;;
*) wm_theme_color="Blue" ;;
esac
wm_theme="${wm_theme_color:-Graphite} ($wm_theme)"
wm_theme="${wm_theme_color} ($wm_theme)"
;;
*"Explorer")
@@ -1805,13 +1816,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 +2314,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 +2339,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 +2923,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/')
@@ -4069,8 +4075,6 @@ get_full_path() {
}
get_user_config() {
mkdir -p "${XDG_CONFIG_HOME}/neofetch/"
# --config /path/to/config.conf
if [[ -f "$config_file" ]]; then
source "$config_file"
@@ -4085,10 +4089,11 @@ get_user_config() {
source "${XDG_CONFIG_HOME}/neofetch/config"
err "Config: Sourced user config. (${XDG_CONFIG_HOME}/neofetch/config)"
else
elif [[ -z "$no_config" ]]; then
config_file="${XDG_CONFIG_HOME}/neofetch/config.conf"
# The config file doesn't exist, create it.
mkdir -p "${XDG_CONFIG_HOME}/neofetch/"
printf '%s\n' "$config" > "$config_file"
fi
}
@@ -4157,9 +4162,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 +4433,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.
@@ -4454,6 +4467,7 @@ IMAGE:
OTHER:
--config /path/to/config Specify a path to a custom config file
--config none Launch the script without a config file
--no_config Don't create the user config file.
--print_config Print the default config file to stdout.
--stdout Turn off all colors and disables any ASCII/image backend.
--help Print this text and exit
@@ -4473,7 +4487,7 @@ exit 1
get_args() {
# Check the commandline flags early for '--config'.
[[ "$*" != *--config* ]] && get_user_config
[[ "$*" != *--config* && "$*" != *--no_config* ]] && get_user_config
while [[ "$1" ]]; do
case "$1" in
@@ -4634,6 +4648,7 @@ get_args() {
;;
esac
;;
"--no_config") no_config="on" ;;
"--stdout") stdout="on" ;;
"-v") verbose="on" ;;
"--print_config") printf '%s\n' "$config"; exit ;;
@@ -5192,27 +5207,28 @@ 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} '
'o'
'ooo'
'ooxoo'
'ooxxxoo'
'oookkxxoo'
'oiioxkkxxoo'
':;:iiiioxxxoo'
`'.;::ioxxoo'
'-. `':;jiooo'
'oooio-.. `'i:io'
'ooooxxxxoio:,. `'-;'
'ooooxxxxxkkxoooIi:-. `'
'ooooxxxxxkkkkxoiiiiiji'
'ooooxxxxxkxxoiiii:'` .i'
'ooooxxxxxoi:::'` .;ioxo'
'ooooxooi::'` .:iiixkxxo'
'ooooi:'` `'';ioxxo'
'i:'` '':io'
'` `'
EOF
;;
@@ -5580,6 +5596,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 +6362,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 +7204,7 @@ ${c1} `-|.' /_. ${c4}\_| ${c1} F
|/`. `-. `._)
/ .-.\\
\\ ( `\\
`.\
`.\\
EOF
;;
@@ -7543,26 +7589,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 +7697,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'