From 5a1052349c1e57b3d7dc18e895518d1eae0ba65f Mon Sep 17 00:00:00 2001 From: nixOSp16s Date: Thu, 17 Sep 2026 18:48:46 +0200 Subject: [PATCH] feat(app-finder): changes dirs variable to query XDG_DATA_DIRS env variable instead of fixed pat --- src/scripts/list_apps.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 src/scripts/list_apps.py diff --git a/src/scripts/list_apps.py b/src/scripts/list_apps.py old mode 100644 new mode 100755 index cd07965..acc8b2c --- a/src/scripts/list_apps.py +++ b/src/scripts/list_apps.py @@ -2,10 +2,10 @@ import os, json, re, configparser def main(): - dirs = [ - "/usr/share/applications", - os.path.expanduser("~/.local/share/applications") - ] + + xdg_dirs = os.environ.get("XDG_DATA_DIRS", "").split(":") + dirs = [os.path.join(d, "applications") for d in xdg_dirs if d] + \ + [os.path.expanduser("~/.local/share/applications")] apps, seen = [], set() for d in dirs: