mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
19 lines
604 B
Bash
Executable file
19 lines
604 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
# archboot--detect-vconsole.sh:
|
|
# sets bigger font on bigger display resolutions
|
|
# by Tobias Powalowski <tpowa@archlinux.org>
|
|
#
|
|
# wait for modules to initialize cmompletely
|
|
udevadm settle
|
|
# get screen setting mode from /sys
|
|
FB_SIZE="$(sed -e 's#.*:##g' -e 's#x.*##g' /sys/class/graphics/fb0/modes 2>/dev/null)"
|
|
if [[ "${FB_SIZE}" -gt '1900' ]]; then
|
|
SIZE="32"
|
|
else
|
|
SIZE="16"
|
|
fi
|
|
# update vconsole.conf accordingly
|
|
echo KEYMAP=us >/etc/vconsole.conf
|
|
echo FONT=ter-v${SIZE}n >>/etc/vconsole.conf
|
|
/lib/systemd/systemd-vconsole-setup
|