32 lines
591 B
Bash
Executable file
32 lines
591 B
Bash
Executable file
#!/bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
|
|
|
. /etc/profile
|
|
|
|
CHANGELOG="/storage/.cache/changelog"
|
|
|
|
if [ ! -e "${CHANGELOG}" ]
|
|
then
|
|
exit 0
|
|
fi
|
|
|
|
WIDTH=$(fbwidth)
|
|
|
|
if [ "${WIDTH}" -le "480" ]
|
|
then
|
|
FONTSIZE=8
|
|
elif [ "${WIDTH}" -gt "480" ] && [ "${WIDTH}" -le "640" ]
|
|
then
|
|
FONTSIZE=12
|
|
elif [ "${WIDTH}" -gt "640" ] && [ "${WIDTH}" -le "720" ]
|
|
then
|
|
FONTSIZE=14
|
|
elif [ "${WIDTH}" -gt "720" ] && [ "${WIDTH}" -lt "1080" ]
|
|
then
|
|
FONTSIZE=20
|
|
else
|
|
FONTSIZE=24
|
|
fi
|
|
|
|
/usr/bin/text_viewer -f ${FONTSIZE} ${CHANGELOG}
|