summaryrefslogtreecommitdiff
path: root/spotify-widget/spotify.lua
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@users.noreply.github.com>2020-09-21 20:53:22 -0400
committerGitHub <noreply@github.com>2020-09-21 20:53:22 -0400
commit31213af0082bef8344475dbeb84205f1a7e31c7d (patch)
tree2a8b4cad8363c5a0019466edf86d8ef99941d2f4 /spotify-widget/spotify.lua
parenta127ffe8efc8ccb91b7a8495c23f67278609df25 (diff)
parent21150bd640f086f617c61b32cde5e45ecfb5158f (diff)
Merge pull request #188 from brucec5/widget-tweaks
Add customizable refresh timeouts to most widgets
Diffstat (limited to 'spotify-widget/spotify.lua')
-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