mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-27 06:33:08 +00:00
Move from a C++ library + QML plugin to a QML plugin only for simplicity, since the homescreen switching architecture will be done from Plasma, and so use of the shell library only needs to be from QML.
27 lines
817 B
QML
27 lines
817 B
QML
/*
|
|
* SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
|
* SPDX-FileCopyrightText: 2019 Marco Martin <mart@kde.org>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
import QtQuick 2.6
|
|
import QtQuick.Layouts 1.4
|
|
|
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
|
import org.kde.plasma.workspace.components 2.0 as PW
|
|
|
|
pragma Singleton
|
|
|
|
Item {
|
|
property bool isVisible: pmSource.data["Battery"]["Has Cumulative"]
|
|
property int percent: pmSource.data["Battery"]["Percent"]
|
|
property bool pluggedIn: pmSource.data["AC Adapter"] ? pmSource.data["AC Adapter"]["Plugged in"] : false
|
|
|
|
property PlasmaCore.DataSource pmSource: PlasmaCore.DataSource {
|
|
engine: "powermanagement"
|
|
connectedSources: ["Battery", "AC Adapter"]
|
|
}
|
|
}
|
|
|