]> git.rmz.io Git - dotfiles.git/commitdiff
awesome/mpd_widget: some cleanup
authorSamir Benmendil <me@rmz.io>
Sat, 8 Aug 2020 10:10:58 +0000 (11:10 +0100)
committerSamir Benmendil <me@rmz.io>
Sat, 8 Aug 2020 10:49:32 +0000 (11:49 +0100)
awesome/widgets/mpd_widget.lua

index d5b72e9dd8716547f1ad4c56670737249adb4eaf..f8510efcbec8e4102899bbce00e326378a3ef0aa 100644 (file)
@@ -1,13 +1,10 @@
-local mpc = require("widgets/mpc")
-local textbox = require("wibox.widget.textbox")
-local gears = require("gears")
-local awful = require("awful")
+local awful   = require("awful")
+local gears   = require("gears")
+local mpc     = require("widgets/mpc")
 local naughty = require("naughty")
-local timer = require("gears.timer")
-local wibox = require("wibox")
-
---TODO remove
-local dbg = require("gears.debug")
+local textbox = require("wibox.widget.textbox")
+local timer   = require("gears.timer")
+local wibox   = require("wibox")
 
 local widget = {}
 widget._textbox = textbox()
@@ -28,7 +25,6 @@ function widget:update_widget()
     local artist = self._currentsong.artist
     local title = self._currentsong.title
     local file = self._currentsong.file
-    text = text .. tostring(artist or "") .. " - " .. tostring(title or "")
     if not artist then
         text = string.format("%s", title or file )
     else
@@ -60,7 +56,6 @@ function widget:get_info(callback)
         info.text = tostring(song.artist or "") .. " - " .. tostring(song.title or "") .. "\n"
             .. tostring(song.album or "")
         callback(info)
-        return false
     end)
 end