Comments (7)
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.
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.
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.
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.
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.
Can't tell if this works for you, just try it :)
from i3status-rust.
Seems to do it man, thanks again! :D
from i3status-rust.
Related Issues (20)
- docs.rs build fails HOT 3
- "v4l" driver for Privacy block needs more documentation or a new function to update webcam devices HOT 2
- privacy block ignores webcam HOT 4
- Theme no longer being applied in swaybar after update HOT 4
- new privacy block seems to create some instability when switching on and off display outputs HOT 1
- new privacy block causes i3status-rs to be unstable in some conditions, especially when gamescope and certain games are launched HOT 1
- feature: add `format_alt` and `format_list` to all blocks HOT 3
- Wrong icons in sound block HOT 5
- Upgrading an old configuration to later i3status-rust versions HOT 6
- Typo in GitHub repository About description, "resourcefriendly" should be "resource-friendly"
- How to hide sound blocks for devices that are not present? (bluetooth/USB headsets, etc) HOT 4
- .Xresources color definition import? HOT 2
- Feature: Add support for non sway/i3 wayland compositors HOT 1
- amd_gpu: improve the error when a device does not exist HOT 3
- Implement format_alt for sound block HOT 4
- Battery block not showing battery percentage HOT 1
- `headphones_indicator` set to `true` doesn't show when headphones are connected HOT 12
- eng formatter: support prefixes in the range argument
- `sound`: Make the warning status when muted configurable HOT 2
- Request: DNS information to network block HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i3status-rust.