Skip to content
Snippets Groups Projects
Commit a311a180 authored by akiraohgaki's avatar akiraohgaki
Browse files

Set Xcursor theme to xrdb

parent 4da10f1c
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,8 @@ bool KdeTheme::applyAsCursor() const
<< "c.writeEntry('cursorTheme', '" + themeName_ + "');";
if (evaluateScript(script)) {
QProcess::startDetached("sh -c \"echo 'Xcursor.theme: " + themeName_ + "' | xrdb -merge\"");
auto setLaunchEnv = QDBusMessage::createMethodCall("org.kde.klauncher5", "/KLauncher", "org.kde.KLauncher", "setLaunchEnv");
setLaunchEnv.setArguments(QVariantList() << QVariant(QString("XCURSOR_THEME")) << QVariant(themeName_));
QDBusConnection::sessionBus().call(setLaunchEnv);
......@@ -67,6 +69,10 @@ bool KdeTheme::applyAsCursor() const
notifyChange.setArguments(QVariantList() << QVariant(qint32(5)) << QVariant(qint32(0)));
QDBusConnection::sessionBus().send(notifyChange);
//QProcess::startDetached("kwin --replace");
//QProcess::startDetached("kquitapp5 plasmashell");
//QProcess::startDetached("kstart5 plasmashell");
return true;
}
return false;
......
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