2023-08-07 00:30:11 +00:00
|
|
|
#!/bin/sh
|
2023-10-23 22:44:47 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2022-08-31 23:24:15 +00:00
|
|
|
# Copyright (C) 2022-present Fewtarius (https://github.com/fewtarius)
|
|
|
|
|
2023-08-07 00:30:11 +00:00
|
|
|
# Minimal OS variable loading for performance
|
2023-09-04 10:46:11 +00:00
|
|
|
. /etc/profile.d/001-functions
|
2022-08-31 23:24:15 +00:00
|
|
|
|
2023-07-22 23:56:23 +00:00
|
|
|
tocon "Configuring user interface..."
|
2023-04-22 20:01:07 +00:00
|
|
|
|
2022-08-31 23:24:15 +00:00
|
|
|
UIMODE=$(get_setting desktop.enabled)
|
2023-04-21 21:40:02 +00:00
|
|
|
if [ "${UIMODE}" = "1" ] || \
|
|
|
|
[ ! -e "/usr/bin/emulationstation" ]
|
2022-08-31 23:24:15 +00:00
|
|
|
then
|
|
|
|
cp -f /usr/share/weston/weston.ini /storage/.config/weston.ini
|
|
|
|
else
|
|
|
|
cp -f /usr/share/weston/kiosk.ini /storage/.config/weston.ini
|
|
|
|
fi
|
2022-10-27 11:51:00 +00:00
|
|
|
|
|
|
|
STARTUP=$(get_setting weston.startup)
|
2023-04-21 21:40:02 +00:00
|
|
|
if [ -z "${STARTUP}" ] && \
|
|
|
|
[ -e "/usr/bin/emulationstation" ]
|
2022-10-27 11:51:00 +00:00
|
|
|
then
|
|
|
|
STARTUP="/usr/bin/start_es.sh"
|
|
|
|
set_setting weston.startup "${STARTUP}"
|
|
|
|
fi
|
|
|
|
sed -i "s#@STARTUP@#${STARTUP}#g" /storage/.config/weston.ini
|