summaryrefslogtreecommitdiff
path: root/spotify-widget
diff options
context:
space:
mode:
authorChris Bruce <aprofessionalemailaddress@gmail.com>2020-09-19 01:08:15 -0700
committerChris Bruce <aprofessionalemailaddress@gmail.com>2020-09-19 01:08:15 -0700
commita2eddcdfcd87976866f797b5ad2b795495d2e620 (patch)
treee3498520985e33915a211389951d6c0c971b972b /spotify-widget
parenta127ffe8efc8ccb91b7a8495c23f67278609df25 (diff)
Add widget timeouts
Diffstat (limited to 'spotify-widget')
-rw-r--r--spotify-widget/spotify.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/spotify-widget/spotify.lua b/spotify-widget/spotify.lua
index eea9b0b..abd19ef 100644
--- a/spotify-widget/spotify.lua
+++ b/spotify-widget/spotify.lua
@@ -35,6 +35,7 @@ local function worker(args)
local dim_opacity = args.dim_opacity or 0.2
local max_length = args.max_length or 15
local show_tooltip = args.show_tooltip == nil and false or args.show_tooltip
+ local timeout = args.timeout or 1
local cur_artist = ''
local cur_title = ''
@@ -106,8 +107,8 @@ local function worker(args)
end
end
- watch(GET_SPOTIFY_STATUS_CMD, 1, update_widget_icon, spotify_widget)
- watch(GET_CURRENT_SONG_CMD, 1, update_widget_text, spotify_widget)
+ watch(GET_SPOTIFY_STATUS_CMD, timeout, update_widget_icon, spotify_widget)
+ watch(GET_CURRENT_SONG_CMD, timeout, update_widget_text, spotify_widget)
--- Adds mouse controls to the widget:
-- - left click - play/pause