diff options
author | streetturtle <streetturtle@users.noreply.github.com> | 2020-12-07 15:33:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 15:33:55 -0500 |
commit | d4971690cec1e074999e730d87045e578d71e43c (patch) | |
tree | b0f05079840eba5467e14bdcd093ad3ed5362cf4 /spotify-widget | |
parent | f078748e76eacae599cf0ad06120d9fff54f8fa5 (diff) | |
parent | ed2b256407291d8edadfcea9380029633cc7d9d8 (diff) |
Merge pull request #224 from streetturtle/comply-with-luacheck
Comply with luacheck
Diffstat (limited to 'spotify-widget')
-rw-r--r-- | spotify-widget/spotify.lua | 7 |
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, "&", '&') - 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 |