From: Michael Stapelberg Date: Thu, 21 Mar 2013 22:32:46 +0000 (+0100) Subject: i3-dmenu-desktop: run commands when they don’t match a .desktop file X-Git-Tag: 4.6~69 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7552a02d5ca5b46b985a89294126782b494e0ec0;p=i3%2Fi3 i3-dmenu-desktop: run commands when they don’t match a .desktop file This allows you to enter e.g. "i3 layout stacking" (provided you don’t have an i3 .desktop file) --- diff --git a/i3-dmenu-desktop b/i3-dmenu-desktop index 65e99ec0..cf5b41e0 100755 --- a/i3-dmenu-desktop +++ b/i3-dmenu-desktop @@ -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} = ''; } }