let _ = Command::new("xsetroot")
.arg("-name")
.arg(format!(
- "[🔊 {title} - {artist}] | ✉ {unread_count} | {date_time}",
+ "[{playback_status} {title} - {artist}] | ✉ {unread_count} | {date_time}",
+ playback_status = map.get("playback-status").unwrap_or(&String::from("🔈")),
title = map.get("title").unwrap_or(&String::from("")),
artist = map.get("artist").unwrap_or(&String::from("")),
unread_count = map.get("unread_count").unwrap_or(&String::from("?")),
}
Some(())
});
+ let playback_status = &pc.changed_properties["PlaybackStatus"].0;
+ update_map(
+ spotify_match_map.clone(),
+ "playback_status",
+ match &*playback_status.as_str().unwrap_or("🔈") {
+ "Playing" => "🔊",
+ _ => "🔈",
+ },
+ );
true
},
);