Hello community,
here is the log from the commit of package bumblebee-status for openSUSE:Factory checked in at 2020-06-30 22:25:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bumblebee-status (Old)
and /work/SRC/openSUSE:Factory/.bumblebee-status.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bumblebee-status"
Tue Jun 30 22:25:29 2020 rev:9 rq:817901 version:2.0.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/bumblebee-status/bumblebee-status.changes 2020-06-29 21:17:54.609699493 +0200
+++ /work/SRC/openSUSE:Factory/.bumblebee-status.new.3060/bumblebee-status.changes 2020-06-30 22:25:31.855981041 +0200
@@ -1,0 +2,8 @@
+Tue Jun 30 14:21:32 UTC 2020 - Michael Vetter
+
+- Update to 2.0.5:
+ * fixed "spamming" of mouse click events (#668)
+ * fixed theme iconset handling (#666)
+ * improved spotify (#667)
+
+-------------------------------------------------------------------
Old:
----
bumblebee-status-2.0.4.tar.gz
New:
----
bumblebee-status-2.0.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bumblebee-status.spec ++++++
--- /var/tmp/diff_new_pack.JeMFJ2/_old 2020-06-30 22:25:32.967984427 +0200
+++ /var/tmp/diff_new_pack.JeMFJ2/_new 2020-06-30 22:25:32.971984439 +0200
@@ -17,7 +17,7 @@
Name: bumblebee-status
-Version: 2.0.4
+Version: 2.0.5
Release: 0
Summary: Modular, theme-able status line generator for the i3 window manager
License: MIT
++++++ bumblebee-status-2.0.4.tar.gz -> bumblebee-status-2.0.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.0.4/bumblebee_status/core/event.py new/bumblebee-status-2.0.5/bumblebee_status/core/event.py
--- old/bumblebee-status-2.0.4/bumblebee_status/core/event.py 2020-06-28 11:00:51.000000000 +0200
+++ new/bumblebee-status-2.0.5/bumblebee_status/core/event.py 2020-06-29 20:07:24.000000000 +0200
@@ -8,6 +8,9 @@
__callbacks.setdefault(event, []).append(cb)
+def unregister(event):
+ if event in __callbacks:
+ del __callbacks[event]
def clear():
__callbacks.clear()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.0.4/bumblebee_status/core/input.py new/bumblebee-status-2.0.5/bumblebee_status/core/input.py
--- old/bumblebee-status-2.0.4/bumblebee_status/core/input.py 2020-06-28 11:00:51.000000000 +0200
+++ new/bumblebee-status-2.0.5/bumblebee_status/core/input.py 2020-06-29 20:07:24.000000000 +0200
@@ -50,6 +50,7 @@
def register(obj, button=None, cmd=None, wait=False):
event_id = __event_id(obj.id if obj is not None else "", button)
logging.debug("registering callback {}".format(event_id))
+ core.event.unregister(event_id) # make sure there's always only one input event
if callable(cmd):
core.event.register(event_id, cmd)
else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.0.4/bumblebee_status/core/theme.py new/bumblebee-status-2.0.5/bumblebee_status/core/theme.py
--- old/bumblebee-status-2.0.4/bumblebee_status/core/theme.py 2020-06-28 11:00:51.000000000 +0200
+++ new/bumblebee-status-2.0.5/bumblebee_status/core/theme.py 2020-06-29 20:07:24.000000000 +0200
@@ -53,7 +53,7 @@
self.__data = raw_data if raw_data else self.load(name)
for icons in self.__data.get("icons", []):
- self.__data = util.algorithm.merge(self.load(icons, "icons"), self.__data)
+ self.__data = util.algorithm.merge(self.__data, self.load(icons, "icons"))
if iconset != "auto":
self.__data = util.algorithm.merge(self.load(iconset, "icons"), self.__data)
for colors in self.__data.get("colors", []):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.0.4/bumblebee_status/modules/contrib/spotify.py new/bumblebee-status-2.0.5/bumblebee_status/modules/contrib/spotify.py
--- old/bumblebee-status-2.0.4/bumblebee_status/modules/contrib/spotify.py 2020-06-28 11:00:51.000000000 +0200
+++ new/bumblebee-status-2.0.5/bumblebee_status/modules/contrib/spotify.py 2020-06-29 20:07:24.000000000 +0200
@@ -50,25 +50,18 @@
)
spotify_iface = dbus.Interface(spotify, "org.freedesktop.DBus.Properties")
props = spotify_iface.Get("org.mpris.MediaPlayer2.Player", "Metadata")
- playback_status = str(
- spotify_iface.Get("org.mpris.MediaPlayer2.Player", "PlaybackStatus")
- )
- if playback_status == "Playing":
- self.__pause = "\u258D\u258D"
- else:
- self.__pause = "\u25B6"
- self.__song = self.__format.format(
+ self.__song = self.__format.format(
album=str(props.get("xesam:album")),
title=str(props.get("xesam:title")),
- artist=",".join(props.get("xesam:artist")),
- trackNumber=str(props.get("xesam:trackNumber")),
- )
+ artist=",".join(props.get("xesam:artist")),
+ trackNumber=str(props.get("xesam:trackNumber")),
+ )
def update(self):
try:
self.clear_widgets()
self.__get_song()
-
+
widget_map = {}
for widget_name in self.__layout:
widget = self.add_widget(name=widget_name)
@@ -77,20 +70,29 @@
"button": core.input.LEFT_MOUSE,
"cmd": self.__cmd + "Previous",
}
- widget.full_text("\u258F\u25C0")
+ widget.set("state", "prev")
elif widget_name == "spotify.pause":
widget_map[widget] = {
"button": core.input.LEFT_MOUSE,
"cmd": self.__cmd + "PlayPause",
}
- widget.full_text(self.__pause)
+ playback_status = str(
+ dbus.Interface(dbus.SessionBus().get_object(
+ "org.mpris.MediaPlayer2.spotify", "/org/mpris/MediaPlayer2"), "org.freedesktop.DBus.Properties")
+ .Get("org.mpris.MediaPlayer2.Player", "PlaybackStatus")
+ )
+ if playback_status == "Playing":
+ widget.set("state", "playing")
+ else:
+ widget.set("state", "paused")
elif widget_name == "spotify.next":
widget_map[widget] = {
"button": core.input.LEFT_MOUSE,
"cmd": self.__cmd + "Next",
}
- widget.full_text("\u25B6\u2595")
+ widget.set("state", "next")
elif widget_name == "spotify.song":
+ widget.set("state", "song")
widget.full_text(self.__song)
else:
raise KeyError(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.0.4/docs/development/theme.rst new/bumblebee-status-2.0.5/docs/development/theme.rst
--- old/bumblebee-status-2.0.4/docs/development/theme.rst 2020-06-28 11:00:51.000000000 +0200
+++ new/bumblebee-status-2.0.5/docs/development/theme.rst 2020-06-29 20:07:24.000000000 +0200
@@ -52,6 +52,21 @@
icon file is identical to the theme itself (as the two are essentially
just merged into a single JSON.
+To create an "icon-only" widget (e.g. the play/pause/forward/rewind buttons
+of a media player), you need to do the following:
+
+1. In the module, create a widget, and set its state to a descriptive value
+ (for example `widget.set("state", "next")`
+2. In the theme's icon definition JSON, define a `prefix` for that state:
+
+.. code:: json
+
+ {
+ "spotify": {
+ "next": { "prefix": "<next icon>" }
+ },
+ }
+
Color definitions and pyWAL support
-----------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.0.4/tests/core/test_input.py new/bumblebee-status-2.0.5/tests/core/test_input.py
--- old/bumblebee-status-2.0.4/tests/core/test_input.py 2020-06-28 11:00:51.000000000 +0200
+++ new/bumblebee-status-2.0.5/tests/core/test_input.py 2020-06-29 20:07:24.000000000 +0200
@@ -59,14 +59,14 @@
cb2.assert_not_called()
-def test_multiple_registrations(obj, cb, cb2):
+def test_multiple_registrations_on_same_button(obj, cb, cb2):
core.input.register(obj, event(obj)["button"], cb)
core.input.register(obj, event(obj)["button"], cb2)
core.input.trigger(event(obj))
- cb.assert_called_once_with(event(obj))
cb2.assert_called_once_with(event(obj))
+ cb.assert_not_called()
def test_event_names():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.0.4/themes/icons/ascii.json new/bumblebee-status-2.0.5/themes/icons/ascii.json
--- old/bumblebee-status-2.0.4/themes/icons/ascii.json 2020-06-28 11:00:51.000000000 +0200
+++ new/bumblebee-status-2.0.5/themes/icons/ascii.json 2020-06-29 20:07:24.000000000 +0200
@@ -297,7 +297,11 @@
"prefix": ""
},
"spotify": {
- "prefix": ""
+ "song": { "prefix": "spotify" },
+ "prev": { "prefix": "|<" },
+ "playing": { "prefix": "|>" },
+ "paused": { "prefix": "||" },
+ "next": { "prefix": ">|" }
},
"uptime": {
"prefix": "uptime"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.0.4/themes/icons/awesome-fonts.json new/bumblebee-status-2.0.5/themes/icons/awesome-fonts.json
--- old/bumblebee-status-2.0.4/themes/icons/awesome-fonts.json 2020-06-28 11:00:51.000000000 +0200
+++ new/bumblebee-status-2.0.5/themes/icons/awesome-fonts.json 2020-06-29 20:07:24.000000000 +0200
@@ -219,7 +219,11 @@
"prefix": " "
},
"spotify": {
- "prefix": " "
+ "song": { "prefix": "" },
+ "prev": { "prefix": "" },
+ "playing": { "prefix": "" },
+ "paused": { "prefix": "" },
+ "next": { "prefix": "" }
},
"publicip": {
"prefix": " "