GithubHelp home page GithubHelp logo

Comments (7)

greshake avatar greshake commented on August 14, 2024

It does hide when your music program communicates correctly. But, afaik, Spotify doesn't signal program exit correctly (maybe I just misread some interface docs) and so might others. I'll implement a periodic check if the music program is still alive, and if not collapse the block.

from i3status-rust.

greshake avatar greshake commented on August 14, 2024

I already implemented the feature in my first implementation of the music block 😄 Due to a bug it got stuck when you're not using the marquee feature. Now it hides correctly with marquee disabled.

from i3status-rust.

rubdos avatar rubdos commented on August 14, 2024

I already implemented the feature in my first implementation of the music block 😄 Due to a bug it got stuck when you're not using the marquee feature. Now it hides correctly with marquee disabled.

Thanks! Problem here probably is that I'm on MPD, and as MPD is a daemon, it's always running. Sometimes, it's just that the music is stopped/playlist is empty, and such it's not very useful to have it around.

But you know what; it's probably more useful to use systemd socket activation here, such that MPD starts on use. Still have to find a way to kill it when not in use though :P thanks!

from i3status-rust.

rubdos avatar rubdos commented on August 14, 2024

Oh wait, that of course doesn't work. i3status connects to that socket, and so activates mpd.

Would it be possible to check for an empty playlist or something like that?

from i3status-rust.

greshake avatar greshake commented on August 14, 2024

Hmm. That totally depends on what data MPD provides over its dbus interface. I wanted to keep the features used at a minimum to increase compatibility.. But, as far as I can tell from your post, MPD actually provides empty metadata when there is no current track, right? At least that is what Spotify does on startup. And there is a case currently where empty-string metadata is displayed as just | which is probably what you're seeing. Guessing here. I will make the block interpret that the same as an unavailable player, but I don't think there is more I can do without making this an MPD specific change, which I'd like to avoid.

from i3status-rust.

greshake avatar greshake commented on August 14, 2024

Can't tell if this works for you, just try it :)

from i3status-rust.

rubdos avatar rubdos commented on August 14, 2024

Seems to do it man, thanks again! :D

from i3status-rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.