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)
This commit is contained in:
parent
505d87ef3e
commit
7552a02d5c
|
@ -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} = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue