aboutsummaryrefslogtreecommitdiff
path: root/i3-dmenu-desktop
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2013-03-21 23:32:46 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-03-21 23:32:46 +0100
commit7552a02d5ca5b46b985a89294126782b494e0ec0 (patch)
tree0630d464b03b2b20cfd706be1af5687ef0e86ce2 /i3-dmenu-desktop
parent505d87ef3e44fb3cb6f7776ef986a29d4236a1e2 (diff)
downloadi3-7552a02d5ca5b46b985a89294126782b494e0ec0.tar.gz
i3-7552a02d5ca5b46b985a89294126782b494e0ec0.zip
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)
Diffstat (limited to 'i3-dmenu-desktop')
-rwxr-xr-xi3-dmenu-desktop8
1 files changed, 7 insertions, 1 deletions
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} = '';
}
}