Merge pull request #1410 from ArmstrongJ/freemint-fixes

FreeMiNT-specific fixes and updates
This commit is contained in:
dylan 2020-02-15 10:55:23 +02:00 committed by GitHub
commit d29abf1a8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1267,6 +1267,7 @@ get_model() {
FreeMiNT)
model=$(sysctl -n hw.model)
model=${model/ (_MCH *)}
;;
esac
@ -1810,11 +1811,11 @@ get_wm() {
freemint_wm=(/proc/*)
case ${freemint_wm[*]} in
*xaaes*) wm=XaAES ;;
*myaes*) wm=MyAES ;;
*naes*) wm=N.AES ;;
geneva) wm=Geneva ;;
*) wm="Atari AES" ;;
*xaaes* | *xaloader*) wm=XaAES ;;
*myaes*) wm=MyAES ;;
*naes*) wm=N.AES ;;
geneva) wm=Geneva ;;
*) wm="Atari AES" ;;
esac
;;
esac
@ -2571,7 +2572,7 @@ get_memory() {
"FreeMiNT")
mem="$(awk -F ':|kB' '/MemTotal:|MemFree:/ {printf $2, " "}' /kern/meminfo)"
mem_free="${mem/* }"
mem_total="${mem/ *}"
mem_total="${mem/$mem_free}"
mem_used="$((mem_total - mem_free))"
mem_total="$((mem_total / 1024))"
mem_used="$((mem_used / 1024))"
@ -2838,6 +2839,10 @@ get_resolution() {
[[ "$refresh_rate" == "off" ]] && resolution="${resolution/ @*}"
;;
"FreeMiNT")
# Need to block X11 queries
;;
*)
if type -p xrandr >/dev/null && [[ $DISPLAY && -z $WAYLAND_DISPLAY ]]; then
case $refresh_rate in
@ -3722,10 +3727,6 @@ get_cols() {
unset -v blocks blocks2 cols
# TosWin2 on FreeMiNT is terrible at this,
# so we'll reset colors arbitrarily.
[[ "$term" == "TosWin2" ]] && printf '\e[30;47m'
# Tell info() that we printed manually.
prin=1
}
@ -6776,8 +6777,7 @@ EOF
;;
"FreeMiNT"*)
# Don't explicitly set colors since
# TosWin2 doesn't reset well.
set_colors 7
read -rd '' ascii_data <<'EOF'
${c1} ##
## #########