Compare commits
No commits in common. "2d04bddde96785dad1e6cd7642d2a91c750b4cd8" and "cf01291e4bb81a563307c571f297ec9bcff03e4b" have entirely different histories.
2d04bddde9
...
cf01291e4b
15
README.md
15
README.md
|
@ -1,16 +1 @@
|
||||||
# Headset Battery Widget
|
# Headset Battery Widget
|
||||||
|
|
||||||
## Install:
|
|
||||||
|
|
||||||
```
|
|
||||||
git clone https://git.lat/Flummi/headsetcontrol-battery-widget.git
|
|
||||||
cd headsetcontrol-battery-widget
|
|
||||||
kpackagetool5 -t Plasma/Applet --install ./package
|
|
||||||
```
|
|
||||||
|
|
||||||
## Uninstall:
|
|
||||||
|
|
||||||
```
|
|
||||||
cd headsetcontrol-battery-widget
|
|
||||||
kpackagetool5 -t Plasma/Applet --remove ./package
|
|
||||||
```
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
import QtQuick 2.0
|
|
||||||
import org.kde.plasma.configuration 2.0
|
|
||||||
|
|
||||||
ConfigModel {
|
|
||||||
ConfigCategory {
|
|
||||||
name: i18n("General")
|
|
||||||
icon: "configure"
|
|
||||||
source: "configGeneral.qml"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
|
|
||||||
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd">
|
|
||||||
<kcfgfile name=""/>
|
|
||||||
|
|
||||||
<group name="General">
|
|
||||||
<entry name="pollingrate" type="Int">
|
|
||||||
<default>10</default>
|
|
||||||
<min>2</min>
|
|
||||||
<max>60</max>
|
|
||||||
</entry>
|
|
||||||
</group>
|
|
||||||
</kcfg>
|
|
|
@ -1,24 +0,0 @@
|
||||||
import QtQuick 2.0
|
|
||||||
import QtQuick.Controls 2.5 as QQC2
|
|
||||||
import org.kde.kirigami 2.4 as Kirigami
|
|
||||||
|
|
||||||
QQC2.Pane {
|
|
||||||
id: root
|
|
||||||
|
|
||||||
property alias cfg_pollingrate: pollingrate.value
|
|
||||||
|
|
||||||
Kirigami.FormLayout {
|
|
||||||
anchors.fill: parent
|
|
||||||
wideMode: false
|
|
||||||
|
|
||||||
QQC2.SpinBox {
|
|
||||||
id: pollingrate
|
|
||||||
Kirigami.FormData.label: i18nc("@label", "pollingrate in seconds:")
|
|
||||||
onValueChanged: {
|
|
||||||
console.log("cfg_pollingrate: " + cfg_pollingrate);
|
|
||||||
}
|
|
||||||
from: 2
|
|
||||||
to: 60
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -6,14 +6,13 @@ import org.kde.plasma.core 2.0 as PlasmaCore
|
||||||
Item {
|
Item {
|
||||||
id: main
|
id: main
|
||||||
|
|
||||||
property int pollingrate: Plasmoid.configuration.pollingrate
|
|
||||||
property int batteryPercent: -2
|
property int batteryPercent: -2
|
||||||
|
|
||||||
PlasmaCore.DataSource {
|
PlasmaCore.DataSource {
|
||||||
id: hsSource
|
id: hsSource
|
||||||
engine: "executable"
|
engine: "executable"
|
||||||
connectedSources: ["headsetcontrol -bc"]
|
connectedSources: ["headsetcontrol -bc"]
|
||||||
interval: pollingrate * 1e3
|
interval: 2000
|
||||||
onNewData: {
|
onNewData: {
|
||||||
if(data['exit_code'] > 0)
|
if(data['exit_code'] > 0)
|
||||||
return console.log('error lol');
|
return console.log('error lol');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user