Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
FENZIGO authored May 17, 2024
1 parent 98817ad commit 639e72e
Show file tree
Hide file tree
Showing 6 changed files with 775 additions and 0 deletions.
675 changes: 675 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

Binary file added contents/libs/libryzenadj.so
Binary file not shown.
Binary file added contents/libs/ryzenadj
Binary file not shown.
65 changes: 65 additions & 0 deletions contents/ui/main.qml
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);
}


}


15 changes: 15 additions & 0 deletions metadata.desktop
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
20 changes: 20 additions & 0 deletions metadata.json
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"
}

0 comments on commit 639e72e

Please sign in to comment.