commit b48a012aaca2d8a75c212e2d0c549318dce130d3 parent 9bf833ae0d4aeb366fcd87456680985cc421da39 Author: mysterymarshak <test1132100948@gmail.com> Date: Sun, 21 Dec 2025 16:31:18 +0500 filter suggested applications by matching mime-type Diffstat:
| M | plugins/xdgdefault | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plugins/xdgdefault b/plugins/xdgdefault @@ -40,7 +40,8 @@ while [ -n "$dirs" ]; do dirs=${dirs#*:} done -app=$(find "$@" -iname '*.desktop' -exec grep '^Name=' {} + \ +app=$(find "$@" -iname '*.desktop' -exec grep -l "MimeType=.*$ftype" {} + 2>/dev/null \ + | xargs -I {} grep '^Name=' {} /dev/null \ | sort -u -t ':' -k 1,1 \ | sed -e 's;..*/\(..*desktop\):Name=\(..*\);\2:\1;' \ | sort -t ':' -k 1,1 \