alexander-yakushev / awesompd

Advanced mpd widget for Awesome WM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't notify when disconnected / mpd down

pera opened this issue · comments

Would be nice to have a way to hide the "Disconnected" message when your local mpd is down. Maybe I'm the only one but I only start mpd when I wanna listen music..
One simple but probably bad approach to do it is changing the status string by "" and removing the line where notify_disconnected is called in update_track function (obviously you may put this inside a conditional statement with a boolean variable like self.show_status). But some code to check the existence of the pid file iff server == localhost would be much better.

Hello pera,

I think, the easiest way to for you to fix this personally is to add the next lines to your rc.lua:

awesompd.DISCONNECTED=""
musicwidget.notify_connect = function() end
musicwidget.notify_disconnect = function() end

Is this solution fine for you? I think if the feature is easy to remove personally for every user, but it might still be helpful for someone, it is better for it to stay.

Hi Alexander, thanks for your reply.
Your argument is right: anyone can easily customize the widget, though I had to read the "whole" script to be sure that those modifications were not going to mess up something else.. :)
If I may, I would include your code into the rcsample (at least commented) or in the awesomes wiki.

cheers

I think it will be perfect for Customization section on the wiki, I will appreciate much if you add it there. It can go to as comment to rcsample as well.