From: Samir Benmendil Date: Sat, 8 Aug 2020 10:10:58 +0000 (+0100) Subject: awesome/mpd_widget: some cleanup X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/0c4f4413bf0c820215bb8def5e3945fcac66cc12 awesome/mpd_widget: some cleanup --- diff --git a/awesome/widgets/mpd_widget.lua b/awesome/widgets/mpd_widget.lua index d5b72e9..f8510ef 100644 --- a/awesome/widgets/mpd_widget.lua +++ b/awesome/widgets/mpd_widget.lua @@ -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