sub notify ($$) {
my ($head, $body) = @_;
+ $body =~ s:\&:&:g;
+ $body =~ s:\<:<:g;
+ $body =~ s:\>:>:g;
my $kid = fork;
defined $kid or return;
if (!$kid) {
open STDOUT, ">", "/dev/null";
- exec "gdbus", "call", "-e",
- "-d", "org.freedesktop.Notifications",
- "-o", "/org/freedesktop/Notifications",
- "-m", "org.freedesktop.Notifications.Notify", "--",
- "DisOrder", "0", "audio-volume-high",
- $head, $body, "[]", "{}", "5000";
+ exec "notify-send",
+ "-c", "DisOrder", "-i", "audio-volume-high", "-t", "5000",
+ $head, $body;
}
waitpid $kid, 0;
}
if (defined $startinfo) { $startinfo .= "; " . $msg; }
else { $startinfo = $msg; }
}
+ } elsif ($what eq "scratched") {
+ notify "DisOrder state", "Scratched playing track";
} elsif ($what eq "playing") {
now_playing $f[2];
}