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 21:48:54 +01:00
|
|
|
# wait for modules to initialize cmompletely
|
2023-11-18 20:49:12 +01:00
|
|
|
udevadm settle
|
2023-11-18 21:48:54 +01:00
|
|
|
# get screen setting mode from /sys
|
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
|
2023-11-18 21:48:54 +01:00
|
|
|
# update vconsole.conf accordingly
|
2023-11-18 17:20:34 +01:00
|
|
|
echo KEYMAP=us >/etc/vconsole.conf
|
|
|
|
echo FONT=ter-v${SIZE}n >>/etc/vconsole.conf
|
2023-11-19 09:39:38 +01:00
|
|
|
/lib/systemd/systemd-vconsole-setup
|