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
21f1faec
Commit
21f1faec
authored
Dec 31, 2017
by
Jeffrey Armstrong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support added for FreeMiNT on Atari computers and clones/VMs
parent
dc929a65
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
113 additions
and
3 deletions
+113
-3
gem
ascii/distro/gem
+19
-0
neofetch
neofetch
+94
-3
No files found.
ascii/distro/gem
0 → 100644
View file @
21f1faec
${c1} ##
## #########
#### ##
#### #### ##
#### #### ## ##
#### #### ## ##
#### #### ## ## ##
#### ######
###### ## ## ####
#### ################
#### ## ####
## #### ######
## ## #### ####
## ## ## ## ## ####
#### ## ## ##
neofetch
View file @
21f1faec
...
@@ -44,6 +44,7 @@ get_os() {
...
@@ -44,6 +44,7 @@ get_os() {
"MINIX"
)
os
=
"MINIX"
;;
"MINIX"
)
os
=
"MINIX"
;;
"AIX"
)
os
=
"AIX"
;;
"AIX"
)
os
=
"AIX"
;;
"IRIX64"
)
os
=
"IRIX"
;;
"IRIX64"
)
os
=
"IRIX"
;;
"FreeMiNT"
)
os
=
"FreeMiNT"
;;
*
)
*
)
printf
"%s
\n
"
"Unknown OS detected: '
$kernel_name
', aborting..."
>
&2
printf
"%s
\n
"
"Unknown OS detected: '
$kernel_name
', aborting..."
>
&2
printf
"%s
\n
"
"Open an issue on GitHub to add support for your OS."
>
&2
printf
"%s
\n
"
"Open an issue on GitHub to add support for your OS."
>
&2
...
@@ -230,6 +231,10 @@ get_distro() {
...
@@ -230,6 +231,10 @@ get_distro() {
"IRIX"
)
"IRIX"
)
distro
=
"IRIX
${
kernel_version
}
"
distro
=
"IRIX
${
kernel_version
}
"
;;
;;
"FreeMiNT"
)
distro
=
"FreeMiNT"
;;
esac
esac
distro
=
"
${
distro
//Enterprise Server
}
"
distro
=
"
${
distro
//Enterprise Server
}
"
...
@@ -238,7 +243,7 @@ get_distro() {
...
@@ -238,7 +243,7 @@ get_distro() {
# Get OS architecture.
# Get OS architecture.
case
"
$os
"
in
case
"
$os
"
in
"Solaris"
|
"AIX"
|
"Haiku"
|
"IRIX"
)
machine_arch
=
"
$(
uname
-p
)
"
;;
"Solaris"
|
"AIX"
|
"Haiku"
|
"IRIX"
|
"FreeMiNT"
)
machine_arch
=
"
$(
uname
-p
)
"
;;
*
)
machine_arch
=
"
$(
uname
-m
)
"
;;
*
)
machine_arch
=
"
$(
uname
-m
)
"
;;
esac
esac
...
@@ -340,6 +345,10 @@ get_model() {
...
@@ -340,6 +345,10 @@ get_model() {
"AIX"
)
"AIX"
)
model
=
"
$(
/usr/bin/uname
-M
)
"
model
=
"
$(
/usr/bin/uname
-M
)
"
;;
;;
"FreeMiNT"
)
model
=
"
$(
sysctl
-n
hw.model
)
"
;;
esac
esac
# Remove dummy OEM info.
# Remove dummy OEM info.
...
@@ -426,6 +435,13 @@ get_uptime() {
...
@@ -426,6 +435,13 @@ get_uptime() {
h
=
"
${
h
#0
}
"
t
=
"
${
t
#0
}
"
h
=
"
${
h
#0
}
"
t
=
"
${
t
#0
}
"
seconds
=
"
$((
d
*
86400
+
h
*
3600
+
${
t
%%
:
*
}
*
60
+
${
t
#*
:
}))
"
seconds
=
"
$((
d
*
86400
+
h
*
3600
+
${
t
%%
:
*
}
*
60
+
${
t
#*
:
}))
"
;;
;;
"FreeMiNT"
)
boot
=
"
$(
sysctl
-n
kern.boottime
)
"
now
=
"
$(
date
+%s
)
"
seconds
=
"
$((
now
-
boot
))
"
;;
esac
esac
days
=
"
$((
seconds
/
60
/
60
/
24
))
days"
days
=
"
$((
seconds
/
60
/
60
/
24
))
days"
...
@@ -604,6 +620,12 @@ get_packages() {
...
@@ -604,6 +620,12 @@ get_packages() {
"
IRIX
")
"
IRIX
")
packages="
$(($(
versions
-b
|
wc
-l
)
-
3
))
"
packages="
$(($(
versions
-b
|
wc
-l
)
-
3
))
"
;;
;;
"
FreeMiNT
")
type -p rpm >/dev/null &&
\
packages="
$((
packages+
=
$(
rpm
-qa
|
wc
-l
)))
"
;;
esac
esac
((packages == 0)) && unset packages
((packages == 0)) && unset packages
...
@@ -653,6 +675,26 @@ get_de() {
...
@@ -653,6 +675,26 @@ get_de() {
esac
esac
;;
;;
"
FreeMiNT
")
get_wm
if [ -e /proc/thing* ]; then
de="
Thing
"
elif [ -e /proc/jinnee* ]; then
de="
Jinnee
"
elif [ -e /proc/tera* ]; then
de="
Teradesk
"
elif [ -e /proc/mdesk ]; then
de="
mDesk
"
elif [ -e /proc/neod* ]; then
de="
NeoDesk
"
elif [ -e /proc/zdesk* ]; then
de="
zDesk
"
else
de="
Atari
"
fi
;;
*)
*)
((wm_run != 1)) && get_wm
((wm_run != 1)) && get_wm
...
@@ -727,7 +769,7 @@ get_wm() {
...
@@ -727,7 +769,7 @@ get_wm() {
-e
"westford"
\
-e
"westford"
\
-e
"weston"
)
"
-e
"weston"
)
"
elif [[ "
$DISPLAY
" && "
$os
" != "
Mac OS X
" ]]; then
elif [[ "
$DISPLAY
" && "
$os
" != "
Mac OS X
"
&& "
$os
" != "
FreeMiNT
"
]]; then
id="
$(
xprop
-root
-notype
_NET_SUPPORTING_WM_CHECK
)
"
id="
$(
xprop
-root
-notype
_NET_SUPPORTING_WM_CHECK
)
"
id="
${
id
##*
}
"
id="
${
id
##*
}
"
wm="
$(
xprop
-id
"
$id
"
-notype
-len
100
-f
_NET_WM_NAME 8t
)
"
wm="
$(
xprop
-id
"
$id
"
-notype
-len
100
-f
_NET_WM_NAME 8t
)
"
...
@@ -763,6 +805,21 @@ get_wm() {
...
@@ -763,6 +805,21 @@ get_wm() {
[[
"
$wm
"
==
"blackbox"
]] && wm=
"bbLean (Blackbox)"
[[
"
$wm
"
==
"blackbox"
]] && wm=
"bbLean (Blackbox)"
wm=
"
${
wm
:+
$wm
,
}
Explorer"
wm=
"
${
wm
:+
$wm
,
}
Explorer"
;;
;;
"FreeMiNT"
)
if [ -e /proc/xaaes* ]; then
wm=
"XaAES"
elif [ -e /proc/myaes* ]; then
wm=
"MyAES"
elif [ -e /proc/naes* ]; then
wm=
"N.AES"
elif [ -e /proc/geneva* ]; then
wm=
"Geneva"
else
wm=
"Atari AES"
fi
;;
esac
esac
fi
fi
...
@@ -1104,6 +1161,12 @@ get_cpu() {
...
@@ -1104,6 +1161,12 @@ get_cpu() {
# Get CPU cores.
# Get CPU cores.
cores
=
"
$(
sysconf NPROC_ONLN
)
"
cores
=
"
$(
sysconf NPROC_ONLN
)
"
;;
;;
"FreeMiNT"
)
cpu
=
"
$(
cat
/kern/cpuinfo |
awk
-F
':'
'/CPU:/ {printf $2}'
)
"
speed
=
"
$(
cat
/kern/cpuinfo |
awk
-F
':'
'/Clocking:/ {printf $2}'
|
awk
-F
'.'
'{ printf $1 }'
)
"
;;
esac
esac
# Remove un-needed patterns from cpu output.
# Remove un-needed patterns from cpu output.
...
@@ -1188,7 +1251,8 @@ get_cpu_usage() {
...
@@ -1188,7 +1251,8 @@ get_cpu_usage() {
"
Haiku
") cores="
$(
sysinfo
-cpu
|
grep
-c
-F
'CPU #'
)
" ;;
"
Haiku
") cores="
$(
sysinfo
-cpu
|
grep
-c
-F
'CPU #'
)
" ;;
"
iPhone OS
") cores="
${
cpu
/*\(
}
"; cores="
${
cores
/\)*
}
" ;;
"
iPhone OS
") cores="
${
cpu
/*\(
}
"; cores="
${
cores
/\)*
}
" ;;
"
AIX
") cores="
$(
lparstat
-i
|
awk
-F
':'
'/Online Virtual CPUs/ {printf $2}'
)
" ;;
"
AIX
") cores="
$(
lparstat
-i
|
awk
-F
':'
'/Online Virtual CPUs/ {printf $2}'
)
" ;;
"
IRIX
") cores="
$(
sysconf NPROC_ONLN
)
"
"
IRIX
") cores="
$(
sysconf NPROC_ONLN
)
" ;;
"
FreeMiNT
") cores="
$(
sysctl
-n
hw.ncpu
)
"
esac
esac
fi
fi
...
@@ -1445,6 +1509,15 @@ get_memory() {
...
@@ -1445,6 +1509,15 @@ get_memory() {
mem_free="
$((
mem_stat[5]
/
1024
))
"
mem_free="
$((
mem_stat[5]
/
1024
))
"
mem_used="
$((
mem_total
-
mem_free
))
"
mem_used="
$((
mem_total
-
mem_free
))
"
;;
;;
"
FreeMiNT
")
mem_total="
$(
cat
/kern/meminfo |
awk
-F
':|kB'
'/MemTotal:/ {printf $2}'
)
"
mem_free="
$(
cat
/kern/meminfo |
awk
-F
':|kB'
'/MemFree:/ {printf $2}'
)
"
mem_used="
$((
mem_total
-
mem_free
))
"
mem_total="
$((
mem_total
/
1024
))
"
mem_used="
$((
mem_used
/
1024
))
"
;;
esac
esac
memory="
${
mem_used
}${
mem_label
:-
MiB
}
/
${
mem_total
}${
mem_label
:-
MiB
}
"
memory="
${
mem_used
}${
mem_label
:-
MiB
}
/
${
mem_total
}${
mem_label
:-
MiB
}
"
...
@@ -1833,6 +1906,11 @@ get_term() {
...
@@ -1833,6 +1906,11 @@ get_term() {
*) term="
${
TERM_PROGRAM
/\.app
}
" ;;
*) term="
${
TERM_PROGRAM
/\.app
}
" ;;
esac
esac
# Most likely TosWin2 on FreeMiNT - quick check
if [[ "
$TERM
" == "
tw52
" || "
$TERM
" == "
tw100
" ]]; then
term="
TosWin2
"
fi
# Check
$PPID
for terminal emulator.
# Check
$PPID
for terminal emulator.
while [[ -z "
$term
" ]]; do
while [[ -z "
$term
" ]]; do
if [[ "
$SSH_CONNECTION
" ]]; then
if [[ "
$SSH_CONNECTION
" ]]; then
...
@@ -2384,6 +2462,12 @@ get_cols() {
...
@@ -2384,6 +2462,12 @@ get_cols() {
unset
-v
blocks blocks2 cols
unset
-v
blocks blocks2 cols
# TosWin2 on FreeMiNT is terrible at this,
# so we'll reset colors arbitrarily
if
[
"
${
term
}
"
==
"TosWin2"
]
;
then
printf
"%b
\n
"
"
\\
e[30;47m"
fi
# Tell info() that we printed manually.
# Tell info() that we printed manually.
prin
=
1
prin
=
1
}
}
...
@@ -3368,6 +3452,13 @@ get_distro_colors() {
...
@@ -3368,6 +3452,13 @@ get_distro_colors() {
ascii_file="
freebsd
"
ascii_file="
freebsd
"
;;
;;
"
FreeMiNT
"*)
# Don't explicitly set colors since
# TosWin2 doesn't reset well
# set_colors 0
ascii_file="
gem
"
;;
"
Frugalware
"*)
"
Frugalware
"*)
set_colors 4 7 1
set_colors 4 7 1
ascii_file="
frugalware
"
ascii_file="
frugalware
"
...
...
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