]> git.sur5r.net Git - i3/i3/blobdiff - i3-dmenu-desktop
Merge branch 'master' into next
[i3/i3] / i3-dmenu-desktop
index e0a35b8dbb87c19d4d2f795ee80c3611241c139c..cf5b41e0f8f97d943aebc44e3ec6824d6d49de47 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env perl
 # vim:ts=4:sw=4:expandtab
 #
-# © 2012 Michael Stapelberg
+# © 2012-2013 Michael Stapelberg
 #
 # No dependencies except for perl ≥ v5.10
 
@@ -45,7 +45,7 @@ my $result = GetOptions(
     '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 {
@@ -346,7 +346,13 @@ if (exists($choices{$choice})) {
         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} = '';
     }
 }