-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
775 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import QtQuick 2.6 | ||
import QtQuick.Layouts 1.1 | ||
import org.kde.plasma.plasmoid 2.0 | ||
import org.kde.plasma.core 2.0 as PlasmaCore | ||
import org.kde.plasma.components 3.0 as PlasmaComponents3 | ||
|
||
|
||
|
||
ColumnLayout { | ||
|
||
PlasmaCore.DataSource { | ||
id: execute | ||
engine: "executable" | ||
connectedSources: [] | ||
onNewData: disconnectSource(sourceName) | ||
|
||
function run(command) { | ||
execute.connectSource(command) | ||
} | ||
} | ||
|
||
RowLayout { | ||
PlasmaComponents3.Label { | ||
id: tdp_label | ||
text: i18n("Set Max TDP:") | ||
|
||
} | ||
PlasmaComponents3.Slider { | ||
id: slider | ||
Layout.fillWidth: true | ||
from: 3 | ||
to: 15 | ||
value: 10 | ||
stepSize: 1 | ||
|
||
} | ||
PlasmaComponents3.Label { | ||
id: sliderValueLabel | ||
function formatText(value) { | ||
return i18n("%1W", value) | ||
} | ||
text: formatText(slider.value) | ||
Layout.minimumWidth: textMetrics.width | ||
|
||
} | ||
PlasmaComponents3.Button { | ||
text: i18n("Apply") | ||
|
||
onClicked: { | ||
runCommand1() | ||
} | ||
} | ||
} | ||
|
||
function runCommand1() { | ||
|
||
let value = slider.value; | ||
let command = `konsole -e sudo bash -c "/home/deck/.local/share/plasma/plasmoids/metadata/contents/libs/ryzenadj --stapm-limit=${value}000 --fast-limit=${value}000 --slow-limit=${value}000; read -p 'Press any key to continue...'"`; | ||
execute.run(command); | ||
} | ||
|
||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Desktop Entry] | ||
Name=SteamDeck TDP | ||
Comment=Ryzenadj minimalistic gui | ||
|
||
Type=Service | ||
Icon=new-command-alarm | ||
X-KDE-ServiceTypes=Plasma/Applet | ||
|
||
X-Plasma-API=declarativeappletscript | ||
X-Plasma-MainScript=ui/main.qml | ||
|
||
X-KDE-PluginInfo-Author=FENZIGO | ||
X-KDE-PluginInfo-Version=1.0 | ||
X-KDE-PluginInfo-Category=Utilities | ||
X-KDE-PluginInfo-License=GPL-3.0-or-later |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"KPlugin": { | ||
"Authors": [ | ||
{ | ||
"Name": "FENZIGO" | ||
} | ||
], | ||
"Category": "Utilities", | ||
"Description": "Ryzenadj minimalistic gui", | ||
"Icon": "new-command-alarm", | ||
"License": "GPL-3.0-or-later", | ||
"Name": "SteamDeck TDP", | ||
"ServiceTypes": [ | ||
"Plasma/Applet" | ||
], | ||
"Version": "1.0" | ||
}, | ||
"X-Plasma-API": "declarativeappletscript", | ||
"X-Plasma-MainScript": "ui/main.qml" | ||
} |