diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rwxr-xr-x | fbrokendesktop.py | 9 |
3 files changed, 12 insertions, 7 deletions
@@ -1,12 +1,12 @@ pkgbase = find-broken-desktop pkgdesc = Find desktop entries files with broken executables. Similar in functionality to fbrokendesktop, but written in python to avoid some of the shortcomings of parsing .desktop files with shell scripts pkgver = 1.3 - pkgrel = 2 + pkgrel = 3 arch = any license = MIT depends = python depends = python-pyxdg source = fbrokendesktop.py - sha256sums = af8bfb0d6d587beeafea67a528b638a20f76eb436ce9fa9a89e8a0161ab2ec71 + sha256sums = 844a5dc47575df7282877fab95a972c0d763d3832a10adc4bf3cf112e8900db1 pkgname = find-broken-desktop @@ -1,7 +1,7 @@ # Maintainer: FirstAirBender <noblechuk5[at]web[dot]de> pkgname=find-broken-desktop pkgver=1.3 -pkgrel=2 +pkgrel=3 pkgdesc="Find desktop entries files with broken executables. Similar in functionality to fbrokendesktop, but written in python to avoid some of the shortcomings of parsing .desktop files with shell scripts" @@ -9,9 +9,9 @@ arch=("any") license=('MIT') depends=('python' 'python-pyxdg') source=("fbrokendesktop.py") -sha256sums=('af8bfb0d6d587beeafea67a528b638a20f76eb436ce9fa9a89e8a0161ab2ec71') +sha256sums=('844a5dc47575df7282877fab95a972c0d763d3832a10adc4bf3cf112e8900db1') package() { - chmod +x fbrokendesktop.py + chmod a+x fbrokendesktop.py install -D fbrokendesktop.py "$pkgdir/usr/bin/findbrokendesktop" } diff --git a/fbrokendesktop.py b/fbrokendesktop.py index 872b6b58d6e1..496933395c5b 100755 --- a/fbrokendesktop.py +++ b/fbrokendesktop.py @@ -58,6 +58,11 @@ def find_missing_desktop_files(desktop_dir: str, show_all: bool): for df in glob.iglob("*.desktop", root_dir=desktop_dir): file_path = path.join(desktop_dir, df) de = DesktopEntry(file_path) + file_name = shlex.quote(de.getFileName()) + if de.getHidden(): + yield file_name + continue + if show_all or not de.getNoDisplay(): if exc := cast(str | None, (de.getExec() or de.getTryExec())): try: @@ -65,9 +70,9 @@ def find_missing_desktop_files(desktop_dir: str, show_all: bool): cmd = strip_command_parent(cmd) if is_gapp_cmd(cmd): if not is_valid_gapp_cmd(cmd[2]): - yield shlex.quote(de.getFileName()) + yield file_name elif not (cmd and shutil.which(cmd[0])): - yield shlex.quote(de.getFileName()) + yield file_name except ValueError as err: print(f"Error parsing '{file_path}': {err}", file=sys.stderr) |