blob: 0e3f826023fee19c7bfb834f345dd86357669d9d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/usr/local/bin/perl
sub main
{
my $action;
my $current;
my $prompt;
$current = `mpc`;
if ($current =~ /volume: n\/a/) {
$current = "Current: Stopped";
}
else {
$current =~ /$\.+/d;
$current = "Current: " . $current;
}
$prompt = "toggle\nstop\nnext\nprev\n$current\n";
$action = `printf '$prompt' | dmenu`;
system("mpc " . $action);
return;
}
main();
__END__
|