#!/usr/bin/env perl
# vim:ts=4:sw=4:expandtab
#
-# © 2012 Michael Stapelberg
+# © 2012-2013 Michael Stapelberg
#
# No dependencies except for perl ≥ v5.10
'dmenu=s' => \$dmenu_cmd,
'entry-type=s' => \@entry_types,
'version' => sub {
- say "dmenu-desktop 1.4 © 2012 Michael Stapelberg";
+ say "dmenu-desktop 1.4 © 2012-2013 Michael Stapelberg";
exit 0;
},
'help' => sub {
last;
}
if (!defined($app)) {
- die "Invalid input: “$choice” does not match any application.";
+ warn "Invalid input: “$choice” does not match any application. Trying to execute nevertheless.";
+ $app->{Name} = '';
+ $app->{Exec} = $choice;
+ # We assume that the app is old and does not support startup
+ # notifications because it doesn’t ship a desktop file.
+ $app->{StartupNotify} = 0;
+ $app->{_Location} = '';
}
}