summaryrefslogtreecommitdiff
path: root/spotify-widget
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@users.noreply.github.com>2020-12-07 15:33:55 -0500
committerGitHub <noreply@github.com>2020-12-07 15:33:55 -0500
commitd4971690cec1e074999e730d87045e578d71e43c (patch)
treeb0f05079840eba5467e14bdcd093ad3ed5362cf4 /spotify-widget
parentf078748e76eacae599cf0ad06120d9fff54f8fa5 (diff)
parented2b256407291d8edadfcea9380029633cc7d9d8 (diff)
Merge pull request #224 from streetturtle/comply-with-luacheck
Comply with luacheck
Diffstat (limited to 'spotify-widget')
-rw-r--r--spotify-widget/spotify.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/spotify-widget/spotify.lua b/spotify-widget/spotify.lua
index fb903e8..bd2309f 100644
--- a/spotify-widget/spotify.lua
+++ b/spotify-widget/spotify.lua
@@ -11,7 +11,6 @@
local awful = require("awful")
local wibox = require("wibox")
local watch = require("awful.widget.watch")
-local naughty = require("naughty")
local GET_SPOTIFY_STATUS_CMD = 'sp status'
local GET_CURRENT_SONG_CMD = 'sp current'
@@ -24,9 +23,9 @@ end
local spotify_widget = {}
-local function worker(args)
+local function worker(user_args)
- local args = args or {}
+ local args = user_args or {}
local play_icon = args.play_icon or '/usr/share/icons/Arc/actions/24/player_play.png'
local pause_icon = args.pause_icon or '/usr/share/icons/Arc/actions/24/player_pause.png'
@@ -100,7 +99,7 @@ local function worker(args)
end
local escaped = string.gsub(stdout, "&", '&amp;')
- local album, album_artist, artist, title =
+ local album, _, artist, title =
string.match(escaped, 'Album%s*(.*)\nAlbumArtist%s*(.*)\nArtist%s*(.*)\nTitle%s*(.*)\n')
if album ~= nil and title ~=nil and artist ~= nil then