From 20916811c5343c8490208c2d8cd0fdbcceb80b6f Mon Sep 17 00:00:00 2001 From: gkeep Date: Mon, 29 Jun 2020 23:01:33 +0300 Subject: [PATCH] [modules/spotify] Fix layout parameter --- bumblebee_status/modules/contrib/spotify.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bumblebee_status/modules/contrib/spotify.py b/bumblebee_status/modules/contrib/spotify.py index f1e925c..8c69cde 100644 --- a/bumblebee_status/modules/contrib/spotify.py +++ b/bumblebee_status/modules/contrib/spotify.py @@ -6,12 +6,15 @@ Requires the following library: Parameters: * spotify.format: Format string (defaults to '{artist} - {title}') Available values are: {album}, {title}, {artist}, {trackNumber} - * spotify.layout: Comma-separated list to change order of widgets (defaults to song, previous, pause, next) + * spotify.layout: Space-separated list to change order of widgets (defaults to song, previous, pause, next) Widget names are: spotify.song, spotify.prev, spotify.pause, spotify.next + Example: `spotify.layout="spotify.prev spotify.song spotify.pause spotify.next"` contributed by `yvesh `_ - many thanks! added controls by `LtPeriwinkle `_ - many thanks! + +fixed icons and layout parameter by `gkeep `_ - many thanks! """ import sys @@ -29,8 +32,7 @@ class Module(core.module.Module): super().__init__(config, theme, []) self.__layout = self.parameter( - "layout", - util.format.aslist("spotify.song,spotify.prev,spotify.pause,spotify.next"), + "layout", "spotify.song spotify.prev spotify.pause spotify.next", ) self.__song = "" @@ -63,7 +65,7 @@ class Module(core.module.Module): self.__get_song() widget_map = {} - for widget_name in self.__layout: + for widget_name in self.__layout.split(): widget = self.add_widget(name=widget_name) if widget_name == "spotify.prev": widget_map[widget] = {