shift-shell/envmanager/devicepresets.h
Devin Lin afa2f06b47 envmanager: Attempt to autodetect device id
Attempt to use `/sys/firmware/devicetree/base/compatible` to autodetect
the device id for device profiles. This approach is described here: https://phosh.mobi/posts/notch-support/#the-compatibles-string
2025-12-15 20:58:31 -05:00

25 lines
550 B
C++

// SPDX-FileCopyrightText: 2025 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <QObject>
#include <KConfigGroup>
#include <KSharedConfig>
class DevicePresets : public QObject
{
Q_OBJECT
public:
DevicePresets(QObject *parent = nullptr);
void initialize();
private:
void setKey(KConfigGroup &fallbackGroup, KConfigGroup &fromGroup, KConfigGroup &toGroup, const QString &fromKey, const QString &toKey);
QStringList detectDeviceString();
KSharedConfig::Ptr m_mobileConfig;
};