Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
51354b22
Commit
51354b22
authored
Oct 27, 2016
by
Dylan Araps
Committed by
GitHub
Oct 27, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #322 from dylanaraps/android2
Add Android support 2
parents
5ef4ae42
e8e859b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
6 deletions
+40
-6
android
ascii/distro/android
+15
-0
neofetch
neofetch
+25
-6
No files found.
ascii/distro/android
0 → 100644
View file @
51354b22
"\
${c1} ╲ ▁▂▂▂▁ ╱
▄███████▄
▄██${c2} ${c1}███${c2} ${c1}██▄
▄███████████▄
▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄ █▄
██ █████████████ ██
██ █████████████ ██
██ █████████████ ██
██ █████████████ ██
█████████████
███████████
██ ██
██ ██
"
neofetch
View file @
51354b22
...
...
@@ -41,7 +41,10 @@ getos() {
getmodel
()
{
case
"
$os
"
in
"Linux"
)
if
[
-f
/sys/devices/virtual/dmi/id/product_name
]
||
\
if
[
-d
"/system/app/"
]
&&
[
-d
"/system/priv-app"
]
;
then
model
=
"
$(
getprop ro.product.brand
)
$(
getprop ro.product.model
)
"
elif
[
-f
/sys/devices/virtual/dmi/id/product_name
]
||
\
[
-f
/sys/devices/virtual/dmi/id/product_version
]
;
then
model
=
"
$(
< /sys/devices/virtual/dmi/id/product_name
)
"
model+
=
"
$(
< /sys/devices/virtual/dmi/id/product_version
)
"
...
...
@@ -147,6 +150,9 @@ getdistro() {
"tiny"
)
distro
=
"
${
distro
//version*
}
"
;;
esac
elif
[
-d
"/system/app/"
]
&&
[
-d
"/system/priv-app"
]
;
then
distro
=
"Android
$(
getprop ro.build.version.release
)
"
else
# Workarounds are included in every shorthand option
case
"
$distro_shorthand
"
in
...
...
@@ -432,6 +438,8 @@ getpackages() {
packages="
$((
packages+
=
$(
ls
-1
/cygdrive/c/ProgramData/chocolatey/lib |
wc
-l
)))
"
;;
esac
[ "
$packages
" == "
0
" ] && unset packages
}
# }}}
...
...
@@ -681,7 +689,10 @@ getcpu() {
case "$os" in
"Linux" | "Windows")
# Get cpu name
cpu="$(awk -F '
:
| @
' '
/model name/ {printf
$2
; exit
}
' /proc/cpuinfo)"
case "$distro" in
"Android"*) cpu="$(getprop ro.product.board)" ;;
*) cpu="$(awk -F '
:
| @
' '
/model name|Processor/ {printf
$2
; exit
}
' /proc/cpuinfo)"
;;
esac
speed_dir=
"/sys/devices/system/cpu/cpu0/cpufreq"
temp_dir=
"/sys/class/hwmon/hwmon0/temp1_input"
...
...
@@ -1521,6 +1532,7 @@ getdisk() {
case "
$distro
" in
"
OpenWRT
"*) df_flags="
-h
"; df_dir="
rootfs
" ;;
"
Android
"*) return ;;
esac
;;
...
...
@@ -1913,14 +1925,16 @@ getascii() {
ascii_strip="
${
ascii_strip
//
'\\'
/
}
"
ascii_strip="
${
ascii_strip
//
'\'
}
"
# Get lines/columns of the ascii file in pure bash.
ascii_length=0
# Get lines/columns of the ascii file.
lines=1
while IFS='
\n
' read -r line 2>/dev/null; do
[
${#
line
}
-gt "
$ascii_length
" ] && ascii_length=
${#
line
}
lines=
$((
lines+
=
1
))
[
"
${#
line
}
" -gt "
${
ascii_length
:-
0
}
" ] && ascii_length="
${#
line
}
"
lines=
"
$((
lines+
=
1
))
"
done <<< "
$ascii_strip
"
# Overwrite padding if ascii_length_force is set.
[ "
$ascii_length_force
" ] && ascii_length="
$ascii_length_force
"
padding="
\0
33[
$((
ascii_length
+
gap
))
C
"
printf "
%b%s
" "
$print
"
export LC_ALL=C
...
...
@@ -2440,6 +2454,11 @@ colors() {
setcolors 2 7
;;
"Android"
*
)
setcolors 2 7
ascii_length_force
=
"19"
;;
"NetBSD"
*
|
"Parabola"
*
|
"Tails"
*
|
"BLAG"
*
)
setcolors 5 7
;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment