summaryrefslogtreecommitdiff
path: root/spotify-widget
diff options
context:
space:
mode:
Diffstat (limited to 'spotify-widget')
-rw-r--r--spotify-widget/spotify.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/spotify-widget/spotify.lua b/spotify-widget/spotify.lua
index f8df1ea..85ea6b4 100644
--- a/spotify-widget/spotify.lua
+++ b/spotify-widget/spotify.lua
@@ -12,9 +12,6 @@ local awful = require("awful")
local wibox = require("wibox")
local watch = require("awful.widget.watch")
-local GET_SPOTIFY_STATUS_CMD = 'sp status'
-local GET_CURRENT_SONG_CMD = 'sp current'
-
local function ellipsize(text, length)
-- utf8 only available in Lua 5.3+
if utf8 == nil then
@@ -39,6 +36,10 @@ local function worker(user_args)
local max_length = args.max_length or 15
local show_tooltip = args.show_tooltip == nil and true or args.show_tooltip
local timeout = args.timeout or 1
+ local sp_bin = args.sp_bin or 'sp'
+
+ local GET_SPOTIFY_STATUS_CMD = sp_bin .. ' status'
+ local GET_CURRENT_SONG_CMD = sp_bin .. ' current'
local cur_artist = ''
local cur_title = ''