diff --git a/app/src/handlers/systemhandler.cpp b/app/src/handlers/systemhandler.cpp index 5c4cb04ab6c0240bf93d4494fc9b8c9c3b8ac614..461cbce430c7a462b49dc837e9c42ea1c327eef7 100644 --- a/app/src/handlers/systemhandler.cpp +++ b/app/src/handlers/systemhandler.cpp @@ -99,7 +99,11 @@ bool SystemHandler::isApplicableType(const QString &installType) const applicableTypes << "wallpapers"; } else if (desktop == "gnome") { - applicableTypes << "wallpapers" << "icons" << "cursors" << "gtk3_themes"; + applicableTypes << "wallpapers" + << "icons" + << "cursors" + << "gtk3_themes" + << "gnome_shell_themes"; } else if (desktop == "xfce") { applicableTypes << "wallpapers"; @@ -132,6 +136,9 @@ bool SystemHandler::applyFile(const QString &path, const QString &installType) c else if (installType == "gtk3_themes") { return applyGnomeGtk3Theme(path); } + else if (installType == "gnome_shell_themes") { + return applyGnomeGnomeShellTheme(path); + } } else if (desktop == "xfce") { if (installType == "wallpapers") { @@ -199,6 +206,13 @@ bool SystemHandler::applyGnomeGtk3Theme(const QString &path) const return QProcess::startDetached("gsettings", arguments); } +bool SystemHandler::applyGnomeGnomeShellTheme(const QString &path) const +{ + auto themeName = QFileInfo(path).fileName(); + QStringList arguments{"set", "org.gnome.shell.extensions.user-theme", "name", themeName}; + return QProcess::startDetached("gsettings", arguments); +} + bool SystemHandler::applyXfceWallpaper(const QString &path) const { auto message = QDBusMessage::createMethodCall("org.xfce.Xfconf", "/org/xfce/Xfconf", "org.xfce.Xfconf", "SetProperty"); diff --git a/app/src/handlers/systemhandler.h b/app/src/handlers/systemhandler.h index d99d48468e36f3161ea0bf60577ceb54542d0901..3ea555e5983718de0a9fae0b17ddc8983d7e39c8 100644 --- a/app/src/handlers/systemhandler.h +++ b/app/src/handlers/systemhandler.h @@ -29,6 +29,7 @@ private: bool applyGnomeIcon(const QString &path) const; bool applyGnomeCursor(const QString &path) const; bool applyGnomeGtk3Theme(const QString &path) const; + bool applyGnomeGnomeShellTheme(const QString &path) const; bool applyXfceWallpaper(const QString &path) const; #endif