From: Michael Stapelberg Date: Tue, 25 Dec 2012 11:41:00 +0000 (+0100) Subject: i3-dmenu-desktop: strip newlines from dmenu ≥ 4.4 (Thanks saurabhgeek92) X-Git-Tag: 4.5~81 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f866607c676495ddfd0e3e7d80f56931d95d73cd;p=i3%2Fi3 i3-dmenu-desktop: strip newlines from dmenu ≥ 4.4 (Thanks saurabhgeek92) fixes #891 --- diff --git a/i3-dmenu-desktop b/i3-dmenu-desktop index 5bf77c2f..80d33c23 100755 --- a/i3-dmenu-desktop +++ b/i3-dmenu-desktop @@ -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})) {