Added sp_bin option to spotify-widget
Allows specifying a custom location for the sp binary via widget config. This is intended for users who don't want to add the sp binary to their system PATH.
This commit is contained in:
parent
83914c91c8
commit
cd162c9a17
|
@ -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 = ''
|
||||
|
|
Loading…
Reference in New Issue