File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -282,7 +282,22 @@ QString FluTools::getWallpaperFilePath() {
282
282
auto path = result.mid (startIndex + 7 , result.length () - startIndex - 8 );
283
283
return path;
284
284
}
285
+ } else if (type == " ubuntu" ) {
286
+ QProcess process;
287
+ QStringList args;
288
+ args << " get" ;
289
+ args << " org.gnome.desktop.background" ;
290
+ args << " picture-uri" ;
291
+ process.start (" gsettings" , args);
292
+ process.waitForFinished ();
293
+ QByteArray result = process.readAllStandardOutput ().trimmed ();
294
+ result = result.mid (1 , result.length () - 2 );
295
+ if (result.startsWith (" file:///" )) {
296
+ auto path = result.mid (7 );
297
+ return path;
298
+ }
285
299
}
300
+ return {};
286
301
#elif defined(Q_OS_MACOS)
287
302
QProcess process;
288
303
QStringList args;
You can’t perform that action at this time.
0 commit comments