summaryrefslogtreecommitdiffstats
path: root/pkgs/simple/flameshot-once/flameshot/flameshot-15.applauncher.patch
blob: c1cf2f86543bcbae8115f89daefd7189e6c73186 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/src/tools/launcher/applauncherwidget.cpp b/src/tools/launcher/applauncherwidget.cpp
index c3e1f30..3f5205c 100644
--- a/src/tools/launcher/applauncherwidget.cpp
+++ b/src/tools/launcher/applauncherwidget.cpp
@@ -23,6 +23,7 @@
 #include <QStandardPaths>
 #include <QTabWidget>
 #include <QTemporaryFile>
+#include <stdlib.h>
 
 namespace {
 
@@ -74,6 +75,15 @@ AppLauncherWidget::AppLauncherWidget(const QPixmap& p, QWidget* parent)
         m_parser.processDirectory(QDir(appsDir));
     }
 
+    const char *USER = secure_getenv("USER");
+    QString dirUser = "/etc/profiles/per-user/" + QString::fromUtf8(USER) + "/share/applications/";
+    QDir appsDirUser(dirUser);
+    m_parser.processDirectory(appsDirUser);
+
+    QString dir = QStringLiteral("/run/current-system/sw/share/applications/");
+    QDir appsDir(dir);
+    m_parser.processDirectory(appsDir);
+
 #endif
 
     initAppMap();