Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Added MorphOS support #195

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions pfetch
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,13 @@ get_uptime() {
s=$(($(system_time) / 1000000))
;;

(MorphOS)
IFS=':, ' read -r _ _ _ _ h m _ <<-EOF
$(uptime)
EOF
s=$((${h:-0}*3600 + ${m:-0}*60))
;;

(SunOS)
# Split the output of 'kstat' on '.' and any white-space
# which exists in the command output.
Expand Down Expand Up @@ -855,6 +862,20 @@ get_memory() {
mem_full=$(( mem_full / 1024))
;;

(MorphOS)
while read -r line _ mem_used mem_full _; do
case $line in
(total)
mem_used=$(( mem_used / 1024 / 1024))
mem_full=$(( mem_full / 1024 / 1024))
break
;;
esac
done <<-EOF
$(avail)
EOF
;;

(SunOS)
hw_pagesize=$(pagesize)

Expand Down Expand Up @@ -1579,6 +1600,17 @@ get_ascii() {
EOF
;;

([Mm]orphOS*)
read_ascii 1 <<-EOF
${c4} __ \/ __
${c4} /o \{}/ o\\
${c4} \ () /
${c4} \`> /\ <\`
${c4} (o/\/\o)
${c4} ) (
EOF
;;

([Mm][Xx]*)
read_ascii <<-EOF
${c7} \\\\ /
Expand Down