2023-02-23 16:43:38 +00:00
|
|
|
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <utility>
|
|
|
|
|
|
|
|
|
|
#include <QMap>
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <QVariant>
|
|
|
|
|
|
2023-03-30 02:40:47 +00:00
|
|
|
#include <KConfigGroup>
|
|
|
|
|
#include <KSharedConfig>
|
2023-02-23 16:43:38 +00:00
|
|
|
|
|
|
|
|
// applications-blacklistrc
|
|
|
|
|
// NOTE: we only write these entries if they are not already defined in the config
|
2023-11-23 18:28:19 +00:00
|
|
|
const QMap<QString, QMap<QString, QVariant>> APPLICATIONS_BLACKLIST_DEFAULT_SETTINGS = {
|
2023-02-23 16:43:38 +00:00
|
|
|
{"Applications",
|
|
|
|
|
{{"blacklist",
|
|
|
|
|
"cuttlefish,org.kde.plasma.themeexplorer,org.kde.klipper,ciborium,syncmonitorhelper,org.kde.okular,wordview,assistant,assistant-qt5,designer,designer-"
|
|
|
|
|
"qt5,linguist,linguist-qt5,org.kde.perusecreator,UserFeedbackConsole,org.kde.kuserfeedback-console,avahi-discover,bssh,bvnc,ktelnetservice5,qv4l2,"
|
|
|
|
|
"qvidcap"}}}};
|
|
|
|
|
|
|
|
|
|
// kdeglobals
|
|
|
|
|
// NOTE: we only write these entries if they are not already defined in the config
|
2023-11-23 18:28:19 +00:00
|
|
|
const QMap<QString, QMap<QString, QVariant>> KDEGLOBALS_DEFAULT_SETTINGS = {{"General", {{"BrowserApplication", "angelfish"}}}};
|
2023-03-30 02:40:47 +00:00
|
|
|
|
2023-12-09 03:09:26 +00:00
|
|
|
const QMap<QString, QMap<QString, QVariant>> KDEGLOBALS_SETTINGS = {{"KDE", {{"LookAndFeelPackage", "org.kde.breeze.mobile"}}}};
|
|
|
|
|
|
2023-03-30 02:40:47 +00:00
|
|
|
// kwinrc
|
|
|
|
|
QMap<QString, QMap<QString, QVariant>> getKwinrcSettings(KSharedConfig::Ptr m_mobileConfig)
|
|
|
|
|
{
|
|
|
|
|
auto group = KConfigGroup{m_mobileConfig, QStringLiteral("General")};
|
|
|
|
|
bool convergenceModeEnabled = group.readEntry("convergenceModeEnabled", false);
|
|
|
|
|
|
2024-03-09 02:21:35 +00:00
|
|
|
return {{"Windows",
|
|
|
|
|
{
|
|
|
|
|
{"Placement", convergenceModeEnabled ? "Centered" : "Maximizing"} // maximize all windows by default if we aren't in convergence mode
|
|
|
|
|
}},
|
|
|
|
|
{"Plugins",
|
|
|
|
|
{
|
|
|
|
|
{"blurEnabled", false}, // disable blur for performance reasons, we could reconsider in the future for more powerful devices
|
|
|
|
|
{"convergentwindowsEnabled", true} // enable our convergent window plugin
|
|
|
|
|
}},
|
|
|
|
|
{"Wayland",
|
|
|
|
|
{
|
|
|
|
|
{"InputMethod", "/usr/share/applications/com.github.maliit.keyboard.desktop"}, // ensure maliit is our vkbd
|
|
|
|
|
{"VirtualKeyboardEnabled", true} // enable vkbd
|
|
|
|
|
}},
|
|
|
|
|
{"org.kde.kdecoration2",
|
|
|
|
|
{
|
|
|
|
|
{"ButtonsOnRight", convergenceModeEnabled ? "HIAX" : "H"}, // ButtonsOnRight changes depending on whether the device is in convergence mode
|
|
|
|
|
{"NoPlugin", false} // ensure that the window decoration plugin is always enabled, otherwise we get Qt default window decorations
|
|
|
|
|
}},
|
|
|
|
|
{"Input",
|
|
|
|
|
{
|
|
|
|
|
{"TabletMode", convergenceModeEnabled ? "off" : "auto"} // TabletMode changes depending on whether the device is in convergence mode
|
|
|
|
|
}}};
|
2023-03-30 02:40:47 +00:00
|
|
|
}
|