shift-shell/bin/startplasmamobile.in
Devin Lin 0e6221ce52 envmanager: Add overlay configs through XDG_CONFIG_DIRS
We currently directly write our settings to ~/.config/kwinrc and ~/.config/ksmserver.

Instead, create a separate config file with our settings (in ~/.config/plasma-mobile), and in startplasmamobile, add that path to XDG_CONFIG_DIRS. These options will be applied in the mobile session, unless the user explicitly sets the config option.
2025-05-22 23:12:43 -04:00

33 lines
1.2 KiB
Bash
Executable file

#!/bin/sh
# SPDX-FileCopyrightText: 2019-2021 Aleix Pol <apol@kde.org>
# SPDX-FileCopyrightText: 2019-2021 Bhushan Shah <bshah@kde.org>
# SPDX-FileCopyrightText: 2019-2020 Jonah Brüchert <jbb@kaidan.im>
# SPDX-License-Identifier: GPL-2.0-or-later
[ -f /etc/profile ] && . /etc/profile
export QT_QPA_PLATFORMTHEME=KDE
export EGL_PLATFORM=wayland
export QT_QUICK_CONTROLS_STYLE=org.kde.breeze
export QT_ENABLE_GLYPH_CACHE_WORKAROUND=1
export QT_QUICK_CONTROLS_MOBILE=true
export PLASMA_INTEGRATION_USE_PORTAL=1
export PLASMA_PLATFORM=phone:handset
# Set ~/.config/plasma-mobile/... as location for default mobile configs (i.e. envmanager generated)
export XDG_CONFIG_DIRS="$HOME/.config/plasma-mobile:/etc/xdg:$XDG_CONFIG_DIRS"
# if coredumpd knows about the dumps, make sure drkonqi catches them
if grep -q '/systemd-coredump' /proc/sys/kernel/core_pattern
then
export KDE_COREDUMP_NOTIFY=1
fi
# ensure that we have our environment settings set properly prior to the shell being loaded (otherwise there is a race condition with autostart)
QT_QPA_PLATFORM=offscreen plasma-mobile-envmanager --apply-settings
# start the shell
export PLASMA_DEFAULT_SHELL=org.kde.plasma.mobileshell
startplasma-wayland --xwayland --inputmethod maliit-keyboard