Skip to content
Snippets Groups Projects
Commit d8a8b6f5 authored by enlroma's avatar enlroma
Browse files

Fix issue #11

parent cc581a26
No related branches found
Tags v1.1.3
1 merge request!15Fix issue #11
......@@ -42,7 +42,7 @@ Item {
"integrated": "kdesu -c \"" + Plasmoid.configuration.envyControlSetCommand + " integrated" + const_KDESU_COMMANDS_OUTPUT + "\"",
"nvidia": "kdesu -c \"" + Plasmoid.configuration.envyControlSetCommand + " nvidia " + Plasmoid.configuration.envyControlSetNvidiaOptions + const_KDESU_COMMANDS_OUTPUT + "\"",
"hybrid": "kdesu -c \"" + Plasmoid.configuration.envyControlSetCommand + " hybrid " + Plasmoid.configuration.envyControlSetHybridOptions + const_KDESU_COMMANDS_OUTPUT + "\"",
"cpuManufacturer": "lscpu | grep -i \"model name\"",
"cpuManufacturer": "lscpu | grep \"GenuineIntel\\|AuthenticAMD\"",
// The * is used to mark the end of stdout and the start of stderr.
"kdesuCommandsOutput": "cat " + Qt.resolvedUrl("./stdout").substring(7) + " && echo '*' && " + "cat " + Qt.resolvedUrl("./stderr").substring(7)
})
......@@ -250,8 +250,8 @@ Item {
if (stderr) {
showNotification(const_IMAGE_ERROR, stderr, stdout)
} else {
var amdRegex = new RegExp("amd", "i")
var intelRegex = new RegExp("intel", "i")
var amdRegex = new RegExp("AuthenticAMD")
var intelRegex = new RegExp("GenuineIntel")
if(amdRegex.test(stdout)){
root.imageHybrid = Qt.resolvedUrl("./image/hybrid-amd.png")
......
......@@ -14,7 +14,7 @@ X-KDE-PluginInfo-Author=Eniel
X-KDE-PluginInfo-Email=eniel160990@gmail.com
X-KDE-PluginInfo-Website=
X-KDE-PluginInfo-Name=optimus-gpu-switcher
X-KDE-PluginInfo-Version=1.1.1
X-KDE-PluginInfo-Version=1.1.2
X-KDE-PluginInfo-License=GPL3
X-KDE-PluginInfo-Category=Hardware
X-Plasma-NotificationArea=true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment