From 6f0b6d0975fe42afff73f6efbc9002a0463103b0 Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Thu, 3 Aug 2017 21:45:40 +0200 Subject: fix prompt for rofi --- clerk.pl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'clerk.pl') diff --git a/clerk.pl b/clerk.pl index e69aacf..8cff8af 100755 --- a/clerk.pl +++ b/clerk.pl @@ -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 -- cgit v1.2.3-24-g4f1b