i3-dmenu-desktop: strip newlines from dmenu ≥ 4.4 (Thanks saurabhgeek92)

fixes #891
This commit is contained in:
Michael Stapelberg 2012-12-25 12:41:00 +01:00
parent 0045cfa637
commit f866607c67
1 changed files with 2 additions and 0 deletions

View File

@ -287,6 +287,8 @@ my $status = ($? >> 8);
exit $status unless $status == 0;
my $choice = <$dmenu_out>;
# dmenu ≥ 4.4 adds a newline after the choice
chomp($choice);
my $app;
# Exact match: the user chose “Avidemux (GTK+)”
if (exists($choices{$choice})) {