pmaports/main/postmarketos-ui-fbkeyboard/fbkeyboard.init
Andreas Kemnade d928c75e7b
postmarketos-ui-fbkeyboard: fix energy waste (MR 5001)
Turn off blinking cursor as on e-ink screens this wastes energy.

[ci:skip-build]: already built successfully in CI
2024-04-05 00:02:34 +02:00

26 lines
647 B
Text

#!/sbin/openrc-run
name="fbkeyboard"
command="/usr/bin/fbkeyboard"
command_args="-r $(cat /sys/class/graphics/fbcon/rotate) -f /usr/share/fonts/dejavu/DejaVuSans.ttf"
pidfile="/var/run/fbkeyboard.pid"
command_background=true
depend()
{
after consolefont
keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
}
start_pre()
{
# Setup kernel support for user level drivers (input subsystem)
if [ ! -e /dev/uinput ]; then
if ! modprobe -q uinput; then
eerror "The uinput module needs to be loaded by " \
"the fbkeyboard service or built in."
fi
fi
# save energy
echo 0 >/sys/class/graphics/fbcon/cursor_blink
}