X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/b106596ea51f33b91b4c1ab2a6748a5f099338ce..7f526fc6fe28b15c3bb4b4094c9d66a051999630:/bin/disorder-notify diff --git a/bin/disorder-notify b/bin/disorder-notify index ac329ba..84c702f 100755 --- a/bin/disorder-notify +++ b/bin/disorder-notify @@ -3,16 +3,16 @@ 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; } @@ -100,6 +100,8 @@ for (;;) { 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]; }