i3-dmenu-desktop: skip broken files (no/empty Exec=) but warn about them
This commit is contained in:
parent
ba1b3a3240
commit
0d354ebd0c
|
@ -221,6 +221,13 @@ for my $app (keys %apps) {
|
||||||
next if (!exists($apps{$app}->{Type}) ||
|
next if (!exists($apps{$app}->{Type}) ||
|
||||||
$apps{$app}->{Type} ne 'Application');
|
$apps{$app}->{Type} ne 'Application');
|
||||||
|
|
||||||
|
# Skip broken files (Type=application, but no Exec key).
|
||||||
|
if (!exists($apps{$app}->{Exec}) ||
|
||||||
|
$apps{$app}->{Exec} eq '') {
|
||||||
|
warn 'File ' . $apps{$app}->{_Location} . ' is broken: it contains Type=Application, but no Exec key/value pair.';
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
# Don’t offer apps which have NoDisplay == true or Hidden == true.
|
# Don’t offer apps which have NoDisplay == true or Hidden == true.
|
||||||
# See http://wiki.xfce.org/howto/customize-menu#hide_menu_entries
|
# See http://wiki.xfce.org/howto/customize-menu#hide_menu_entries
|
||||||
# for the difference between NoDisplay and Hidden.
|
# for the difference between NoDisplay and Hidden.
|
||||||
|
|
Loading…
Reference in New Issue