diff options
author | Rasmus Steinke <rasi@xssn.at> | 2017-08-03 21:45:40 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2017-08-03 21:45:40 +0200 |
commit | 6f0b6d0975fe42afff73f6efbc9002a0463103b0 (patch) | |
tree | faa32f380addf5333e7c615d6872619e80d28ea7 | |
parent | e1a0e88acd4b8ed10279810df56b433d28a63839 (diff) | |
download | perl-app-clerk-6f0b6d0975fe42afff73f6efbc9002a0463103b0.tar.gz perl-app-clerk-6f0b6d0975fe42afff73f6efbc9002a0463103b0.tar.xz |
fix prompt for rofi
-rwxr-xr-x | clerk.pl | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -98,9 +98,10 @@ sub backend_call { '-width', '1300', '-dmenu', + '-multi-select', '-i', '-p', - ' >' + '> ' ] ); my $handle = start $backends{$backend} // die('backend not found'), \$input, \$out; @@ -131,17 +132,15 @@ sub do_action { if ($action eq "Replace\n") { $mpd->clear(); } - if ($action eq "Replace\n") { - $mpd->play(); - } my $input; my ($in) = @_; foreach my $line (split /\n/, $in) { - print "${line}x\n"; my $uri = (split /[\t\n]/, $line)[-1]; - print "${uri}x\n"; $mpd->add($uri); } + if ($action eq "Replace\n") { + $mpd->play(); + } } # read messagepack file and output strings |