--- /dev/null
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+[[package]]
+name = "dbus"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22c08adfeb70c940c14d8af988fa854dcb5529e6141f2397e4e0fa4c9375d094"
+dependencies = [
+ "libc",
+ "libdbus-sys",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.79"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2448f6066e80e3bfc792e9c98bf705b4b0fc6e8ef5b43e5889aff0eaa9c58743"
+
+[[package]]
+name = "libdbus-sys"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc12a3bc971424edbbf7edaf6e5740483444db63aa8e23d3751ff12a30f306f0"
+dependencies = [
+ "pkg-config",
+]
+
+[[package]]
+name = "pkg-config"
+version = "0.3.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
+
+[[package]]
+name = "xsetrootd"
+version = "0.1.0"
+dependencies = [
+ "dbus",
+]
--- /dev/null
+[package]
+name = "xsetrootd"
+version = "0.1.0"
+authors = ["Jacob Casper <git@jacobcasper.com>"]
+edition = "2018"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
+dbus = "0.9.0"
--- /dev/null
+use dbus::blocking::stdintf::org_freedesktop_dbus::PropertiesPropertiesChanged;
+use dbus::blocking::Connection;
+use dbus::message::Message;
+use std::time::Duration;
+
+fn main() -> Result<(), Box<dyn std::error::Error>> {
+ let conn = Connection::new_session()?;
+
+ let proxy = conn.with_proxy(
+ "org.mpris.MediaPlayer2.spotify",
+ "/org/mpris/MediaPlayer2",
+ Duration::from_millis(5000),
+ );
+
+ let _ = proxy.match_signal(
+ |pc: PropertiesPropertiesChanged, _: &Connection, _: &Message| {
+ println! {"dumping {:#x?}", pc.changed_properties["Metadata"]};
+ true
+ },
+ );
+
+ loop {
+ conn.process(Duration::from_millis(1000))?;
+ }
+}