Closed thequantumcog closed 1 month ago
For some reason didn't see this earlier, my apologies. You should be able to do this in Waybar with its CSS. Otherwise, if you have any proposals for how it should be implemented, feel free to share.
I have shifted to using a script, I no longer have this problem
I would also like this feature, I added it in my own local build like this:
diff --git a/src/commands/monitor.rs b/src/commands/monitor.rs
index 839491b..0daf3da 100644
--- a/src/commands/monitor.rs
+++ b/src/commands/monitor.rs
@@ -69,7 +69,11 @@ pub async fn run(opts: Monitor) -> Result<()> {
class.push(status.into());
let text = match (track.artist, track.title) {
(Some(artist), Some(title)) => {
- format!("{} {} {}", artist, separator, title)
+ match status {
+ TrackStatus::Playing => format!(" {} {} {}", artist, separator, title),
+ TrackStatus::Paused => format!(" {} {} {}", artist, separator, title),
+ _ => format!("{} {} {}", artist, separator, title),
+ }
}
(Some(artist), None) => artist,
(None, Some(title)) => title,
Happy to open a PR if you'd like, but it would be even better to have some options in the config.toml to change waybar JSON output. For example, I personally prefer to switch the title and artist vars, so it would be good to not need to rebuild it just for a small change like this.
@dotaxis It should be more configurable. Some might not want an icon and some might want it in another place. Some polybar config for what it should output similar to what waybar
has in its config might be good.
Though I think this is better left implemented by polybar itself in its script module: https://github.com/polybar/polybar/wiki/Module:-script. It would be nice if it had some implementation like waybar.
Yeah, I agree. I'll work on implementing some options in the config.toml and then I'll PR that.
Sorry it took me a while to push a new version, this should now be available in 0.2.6.
Waybar does not support different icons for different states (for custom modules). So, can you add an option in config.toml to add a (paused-icon) in json output