summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2017-08-03 21:45:40 +0200
committerRasmus Steinke <rasi@xssn.at>2017-08-03 21:45:40 +0200
commit6f0b6d0975fe42afff73f6efbc9002a0463103b0 (patch)
treefaa32f380addf5333e7c615d6872619e80d28ea7
parente1a0e88acd4b8ed10279810df56b433d28a63839 (diff)
downloadperl-app-clerk-6f0b6d0975fe42afff73f6efbc9002a0463103b0.tar.gz
perl-app-clerk-6f0b6d0975fe42afff73f6efbc9002a0463103b0.tar.xz
fix prompt for rofi
-rwxr-xr-xclerk.pl11
1 files changed, 5 insertions, 6 deletions
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