mpris-widget: remove more dead code
no need to update a widget that is never updated
This commit is contained in:
parent
588227cc1a
commit
2b829c7257
|
@ -152,11 +152,6 @@ local function worker()
|
||||||
}
|
}
|
||||||
|
|
||||||
local mpdarc_icon_widget = wibox.container.mirror(mpdarc, {horizontal = true})
|
local mpdarc_icon_widget = wibox.container.mirror(mpdarc, {horizontal = true})
|
||||||
local mpdarc_current_song_widget = wibox.widget {
|
|
||||||
id = 'current_song',
|
|
||||||
widget = wibox.widget.textbox,
|
|
||||||
font = 'Play 10'
|
|
||||||
}
|
|
||||||
|
|
||||||
local update_graphic = function(widget, stdout, _, _, _)
|
local update_graphic = function(widget, stdout, _, _, _)
|
||||||
local words = {}
|
local words = {}
|
||||||
|
@ -178,22 +173,18 @@ local function worker()
|
||||||
mpdarc_icon_widget.visible = true
|
mpdarc_icon_widget.visible = true
|
||||||
icon.image = PLAY_ICON_NAME
|
icon.image = PLAY_ICON_NAME
|
||||||
widget.colors = {beautiful.widget_main_color}
|
widget.colors = {beautiful.widget_main_color}
|
||||||
mpdarc_current_song_widget.markup = current_song
|
|
||||||
widget:set_text(artist, current_song)
|
widget:set_text(artist, current_song)
|
||||||
elseif player_status == "Paused" then
|
elseif player_status == "Paused" then
|
||||||
mpdarc_icon_widget.visible = true
|
mpdarc_icon_widget.visible = true
|
||||||
icon.image = PAUSE_ICON_NAME
|
icon.image = PAUSE_ICON_NAME
|
||||||
widget.colors = {beautiful.widget_main_color}
|
widget.colors = {beautiful.widget_main_color}
|
||||||
mpdarc_current_song_widget.markup = current_song
|
|
||||||
widget:set_text(artist, current_song)
|
widget:set_text(artist, current_song)
|
||||||
elseif player_status == "Stopped" then
|
elseif player_status == "Stopped" then
|
||||||
mpdarc_icon_widget.visible = true
|
mpdarc_icon_widget.visible = true
|
||||||
icon.image = STOP_ICON_NAME
|
icon.image = STOP_ICON_NAME
|
||||||
mpdarc_current_song_widget.markup = ""
|
|
||||||
else -- no player is running
|
else -- no player is running
|
||||||
icon.image = LIBRARY_ICON_NAME
|
icon.image = LIBRARY_ICON_NAME
|
||||||
mpdarc_icon_widget.visible = false
|
mpdarc_icon_widget.visible = false
|
||||||
mpdarc_current_song_widget.markup = ""
|
|
||||||
widget.colors = {beautiful.widget_red}
|
widget.colors = {beautiful.widget_red}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue