dot/gnus-local.el.distorted: Sink `gnus-posting-styles' below `odin'.
[profile] / bin / disorder-notify
index ac329ba..84c702f 100755 (executable)
@@ -3,16 +3,16 @@
 sub notify ($$) {
   my ($head, $body) = @_;
 
+  $body =~ s:\&:&:g;
+  $body =~ s:\<:&lt;:g;
+  $body =~ s:\>:&gt;: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];
     }