archboot/usr/bin/archboot-detect-vconsole.sh

16 lines
452 B
Bash
Raw Normal View History

2023-11-18 17:20:34 +01:00
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-or-later
2023-11-18 21:25:48 +01:00
# archboot--detect-vconsole.sh:
# sets bigger font on bigger display resolutions
# by Tobias Powalowski <tpowa@archlinux.org>
2023-11-18 17:20:34 +01:00
#
2023-11-18 20:49:12 +01:00
udevadm settle
2023-11-18 21:25:48 +01:00
FB_SIZE="$(sed -e 's#.*:##g' -e 's#x.*##g' /sys/class/graphics/fb0/modes 2>/dev/null)"
2023-11-18 17:20:34 +01:00
if [[ "${FB_SIZE}" -gt '1900' ]]; then
SIZE="32"
else
SIZE="16"
fi
echo KEYMAP=us >/etc/vconsole.conf
echo FONT=ter-v${SIZE}n >>/etc/vconsole.conf