commit bumblebee-status for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package bumblebee-status for openSUSE:Factory checked in at 2021-02-26 21:59:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bumblebee-status (Old) and /work/SRC/openSUSE:Factory/.bumblebee-status.new.2378 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "bumblebee-status" Fri Feb 26 21:59:23 2021 rev:12 rq:875141 version:2.1.2 Changes: -------- --- /work/SRC/openSUSE:Factory/bumblebee-status/bumblebee-status.changes 2021-01-20 18:27:44.719535381 +0100 +++ /work/SRC/openSUSE:Factory/.bumblebee-status.new.2378/bumblebee-status.changes 2021-02-26 21:59:25.643819553 +0100 @@ -1,0 +2,15 @@ +Thu Feb 25 11:14:36 UTC 2021 - John Vandenberg <jayvdb@gmail.com> + +- Add explicit BR for pyusb to fix Leap builds +- Add Suggests for all modules + +------------------------------------------------------------------- +Thu Feb 25 10:16:30 UTC 2021 - Michael Vetter <mvetter@suse.com> + +- Update to 2.1.2: + * make configuration file name configurable (#764) + * Support for spotifyd (#752) + * add /usr/share/ as theme directory (#753) + * playerctl improvements + +------------------------------------------------------------------- Old: ---- bumblebee-status-2.1.1.tar.gz New: ---- bumblebee-status-2.1.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bumblebee-status.spec ++++++ --- /var/tmp/diff_new_pack.ggxtxh/_old 2021-02-26 21:59:26.263820098 +0100 +++ /var/tmp/diff_new_pack.ggxtxh/_new 2021-02-26 21:59:26.267820102 +0100 @@ -18,7 +18,7 @@ %define skip_python2 1 Name: bumblebee-status -Version: 2.1.1 +Version: 2.1.2 Release: 0 Summary: Modular, theme-able status line generator for the i3 window manager License: MIT @@ -45,6 +45,7 @@ BuildRequires: %{python_module python-dateutil} BuildRequires: %{python_module python-yubico} BuildRequires: %{python_module pytz} +BuildRequires: %{python_module pyusb} BuildRequires: %{python_module requests} BuildRequires: %{python_module simplejson} BuildRequires: %{python_module suntime} @@ -98,7 +99,6 @@ Recommends: iputils # wireless-tools provides iwgetid, used by core module nic Recommends: wireless-tools -Recommends: bumblebee-status-theme-powerline = %{version} Recommends: bumblebee-status-module-caffeine = %{version} Recommends: bumblebee-status-module-indicator = %{version} Recommends: bumblebee-status-module-layout = %{version} @@ -110,8 +110,41 @@ Recommends: bumblebee-status-module-sun = %{version} Recommends: bumblebee-status-module-title = %{version} Recommends: bumblebee-status-module-xrandr = %{version} +Recommends: bumblebee-status-theme-powerline = %{version} +Suggests: bumblebee-status-module-alsa = %{version} +Suggests: bumblebee-status-module-arandr = %{version} +Suggests: bumblebee-status-module-brightness = %{version} +Suggests: bumblebee-status-module-cmus = %{version} +Suggests: bumblebee-status-module-deadbeef = %{version} +Suggests: bumblebee-status-module-deezer = %{version} +Suggests: bumblebee-status-module-docker-ps = %{version} +Suggests: bumblebee-status-module-duns = %{version} +Suggests: bumblebee-status-module-git = %{version} +Suggests: bumblebee-status-module-hddtemp = %{version} +Suggests: bumblebee-status-module-layout-xkbswitch = %{version} +Suggests: bumblebee-status-module-libvirt = %{version} +Suggests: bumblebee-status-module-mocp = %{version} +Suggests: bumblebee-status-module-mpd = %{version} +Suggests: bumblebee-status-module-notmuch = %{version} +Suggests: bumblebee-status-module-nvidia-prime = %{version} +Suggests: bumblebee-status-module-octoprint = %{version} Suggests: bumblebee-status-module-progress = %{version} -BuildArch: noarch +Suggests: bumblebee-status-module-redshift = %{version} +Suggests: bumblebee-status-module-smartstatus = %{version} +Suggests: bumblebee-status-module-speedtest = %{version} +Suggests: bumblebee-status-module-spotify = %{version} +Suggests: bumblebee-status-module-taskwarrior = %{version} +Suggests: bumblebee-status-module-vault = %{version} +Suggests: bumblebee-status-module-vpn = %{version} +Suggests: bumblebee-status-module-watson = %{version} +Suggests: bumblebee-status-module-yubikey = %{version} +BuildArch: noarch +# SECTION missing dependencies +#Suggests: bumblebee-status-module-nvidia = %{version} +#Suggests: bumblebee-status-module-pihole = %{version} +#Suggests: bumblebee-status-module-twmn = %{version} +#Suggests: bumblebee-status-module-zfs = %{version} +# /SECTION %description bumblebee-status is a modular, themeable status line generator for the i3 window manager. ++++++ bumblebee-status-2.1.1.tar.gz -> bumblebee-status-2.1.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/README.md new/bumblebee-status-2.1.2/README.md --- old/bumblebee-status-2.1.1/README.md 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/README.md 2021-02-20 14:49:45.000000000 +0100 @@ -8,6 +8,7 @@ [![Code Climate](https://codeclimate.com/github/tobi-wan-kenobi/bumblebee-status/badges/gpa.svg)](https://codeclimate.com/github/tobi-wan-kenobi/bumblebee-status) [![Test Coverage](https://codeclimate.com/github/tobi-wan-kenobi/bumblebee-status/badges/coverage.svg)](https://codeclimate.com/github/tobi-wan-kenobi/bumblebee-status/coverage) [![Issue Count](https://codeclimate.com/github/tobi-wan-kenobi/bumblebee-status/badges/issue_count.svg)](https://codeclimate.com/github/tobi-wan-kenobi/bumblebee-status) +![License](https://img.shields.io/github/license/tobi-wan-kenobi/bumblebee-status) **Many, many thanks to all contributors! I am still amazed by and deeply grateful for how many PRs this project gets.** @@ -76,6 +77,8 @@ pip install --user bumblebee-status ``` +There is also a SlackBuild available here: [slackbuilds:bumblebee-status](http://slackbuilds.org/repository/14.2/desktop/bumblebee-status/) - many thanks to [@Tonus1](https://github.com/Tonus1)! + # Dependencies [Available modules](https://bumblebee-status.readthedocs.io/en/main/modules.html) lists the dependencies (Python modules and external executables) for each module. If you are not using a module, you don't need the dependencies. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/bumblebee_status/core/config.py new/bumblebee-status-2.1.2/bumblebee_status/core/config.py --- old/bumblebee-status-2.1.1/bumblebee_status/core/config.py 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/bumblebee_status/core/config.py 2021-02-20 14:49:45.000000000 +0100 @@ -148,6 +148,13 @@ description="bumblebee-status is a modular, theme-able status line generator for the i3 window manager. https://github.com/tobi-wan-kenobi/bumblebee-status/wiki" ) parser.add_argument( + "-c", + "--config-file", + action="store", + default=None, + help="Specify a configuration file to use" + ) + parser.add_argument( "-m", "--modules", nargs="+", action="append", default=[], help=MODULE_HELP ) parser.add_argument( @@ -173,6 +180,13 @@ help="Specify a list of modules to hide when not in warning/error state", ) parser.add_argument( + "-e", + "--errorhide", + nargs="+", + default=[], + help="Specify a list of modules that are hidden when in state error" + ) + parser.add_argument( "-d", "--debug", action="store_true", help="Add debug fields to i3 output" ) parser.add_argument( @@ -196,13 +210,18 @@ self.__args = parser.parse_args(args) - for cfg in [ - "~/.bumblebee-status.conf", - "~/.config/bumblebee-status.conf", - "~/.config/bumblebee-status/config", - ]: + if self.__args.config_file: + cfg = self.__args.config_file cfg = os.path.expanduser(cfg) self.load_config(cfg) + else: + for cfg in [ + "~/.bumblebee-status.conf", + "~/.config/bumblebee-status.conf", + "~/.config/bumblebee-status/config", + ]: + cfg = os.path.expanduser(cfg) + self.load_config(cfg) parameters = [item for sub in self.__args.parameters for item in sub] for param in parameters: @@ -302,14 +321,21 @@ def iconset(self): return self.__args.iconset - """Returns which modules should be hidden if their state is not warning/critical + """Returns whether a module should be hidden if their state is not warning/critical - :return: list of modules to hide automatically - :rtype: list of strings + :return: True if module should be hidden automatically, False otherwise + :rtype: bool """ def autohide(self, name): return name in self.__args.autohide + """Returns which modules should be hidden if they are in state error + + :return: returns True if name should be hidden, False otherwise + :rtype: bool + """ + def errorhide(self, name): + return name in self.__args.errorhide # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/bumblebee_status/core/module.py new/bumblebee-status-2.1.2/bumblebee_status/core/module.py --- old/bumblebee-status-2.1.1/bumblebee_status/core/module.py 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/bumblebee_status/core/module.py 2021-02-20 14:49:45.000000000 +0100 @@ -17,7 +17,6 @@ log = logging.getLogger(__name__) - """Loads a module by name :param module_name: Name of the module to load @@ -33,20 +32,30 @@ error = None module_short, alias = (module_name.split(":") + [module_name])[0:2] config.set("__alias__", alias) - for namespace in ["core", "contrib"]: + + try: + mod = importlib.import_module("modules.core.{}".format(module_short)) + log.debug("importing {} from core".format(module_short)) + return getattr(mod, "Module")(config, theme) + except ImportError as e: try: - mod = importlib.import_module( - "modules.{}.{}".format(namespace, module_short) - ) - log.debug( - "importing {} from {}.{}".format(module_short, namespace, module_short) - ) + log.warning("failed to import {} from core: {}".format(module_short, e)) + mod = importlib.import_module("modules.contrib.{}".format(module_short)) + log.debug("importing {} from contrib".format(module_short)) return getattr(mod, "Module")(config, theme) except ImportError as e: - log.debug("failed to import {}: {}".format(module_name, e)) - error = e - log.fatal("failed to import {}: {}".format(module_name, error)) - return Error(config=config, module=module_name, error=error) + usermod = os.path.expanduser("~/.config/bumblebee-status/modules/{}.py".format(module_short)) + if os.path.exists(usermod): + try: + log.warning("failed to import {} from system: {}".format(module_short, e)) + mod = importlib.machinery.SourceFileLoader("modules.{}".format(module_short), + os.path.expanduser(usermod)).load_module() + log.debug("importing {} from user".format(module_short)) + return getattr(mod, "Module")(config, theme) + except ImportError as e: + log.fatal("import failed: {}".format(e)) + log.fatal("failed to import {}".format(module_short)) + return Error(config=config, module=module_name, error="unable to load module") class Module(core.input.Object): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/bumblebee_status/core/output.py new/bumblebee-status-2.1.2/bumblebee_status/core/output.py --- old/bumblebee-status-2.1.1/bumblebee_status/core/output.py 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/bumblebee_status/core/output.py 2021-02-20 14:49:45.000000000 +0100 @@ -216,6 +216,8 @@ continue if module.hidden(): continue + if "critical" in widget.state() and self.__config.errorhide(widget.module.name): + continue blocks.extend(self.separator_block(module, widget)) blocks.append(self.__content_block(module, widget)) core.event.trigger("next-widget") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/bumblebee_status/core/theme.py new/bumblebee-status-2.1.2/bumblebee_status/core/theme.py --- old/bumblebee-status-2.1.1/bumblebee_status/core/theme.py 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/bumblebee_status/core/theme.py 2021-02-20 14:49:45.000000000 +0100 @@ -17,6 +17,7 @@ os.path.join(THEME_BASE_DIR, "../../themes"), os.path.expanduser("~/.config/bumblebee-status/themes"), os.path.expanduser("~/.local/share/bumblebee-status/themes"), # PIP + "/usr/share/bumblebee-status/themes", ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/bumblebee_status/modules/contrib/hddtemp.py new/bumblebee-status-2.1.2/bumblebee_status/modules/contrib/hddtemp.py --- old/bumblebee-status-2.1.1/bumblebee_status/modules/contrib/hddtemp.py 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/bumblebee_status/modules/contrib/hddtemp.py 2021-02-20 14:49:45.000000000 +0100 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -"""Fetch hard drive temeperature data from a hddtemp daemon +"""Fetch hard drive temperature data from a hddtemp daemon that runs on localhost and default port (7634) contributed by `somospocos <https://github.com/somospocos>`_ - many thanks! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/bumblebee_status/modules/contrib/playerctl.py new/bumblebee-status-2.1.2/bumblebee_status/modules/contrib/playerctl.py --- old/bumblebee-status-2.1.1/bumblebee_status/modules/contrib/playerctl.py 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/bumblebee_status/modules/contrib/playerctl.py 2021-02-20 14:49:45.000000000 +0100 @@ -5,57 +5,113 @@ Requires the following executable: * playerctl -contributed by `smitajit <https://github.com/smitajit>`_ - many thanks! +Parameters: + * playerctl.format: Format string (defaults to '{artist} - {title}') + Available values are: {album}, {title}, {artist}, {trackNumber} + * playerctl.layout: Comma-separated list to change order of widgets (defaults to song, previous, pause, next) + Widget names are: playerctl.song, playerctl.prev, playerctl.pause, playerctl.next + +Parameters are inherited from `spotify` module, many thanks to its developers! +contributed by `smitajit <https://github.com/smitajit>`_ - many thanks! """ import core.module import core.widget import core.input import util.cli +import util.format + +import logging class Module(core.module.Module): - def __init__(self,config , theme): - widgets = [ - core.widget.Widget(name="playerctl.prev"), - core.widget.Widget(name="playerctl.main", full_text=self.description), - core.widget.Widget(name="playerctl.next"), - ] - super(Module, self).__init__(config, theme , widgets) - - core.input.register(widgets[0], button=core.input.LEFT_MOUSE, - cmd="playerctl previous") - core.input.register(widgets[1], button=core.input.LEFT_MOUSE, - cmd="playerctl play-pause") - core.input.register(widgets[2], button=core.input.LEFT_MOUSE, - cmd="playerctl next") + def __init__(self, config, theme): + super(Module, self).__init__(config, theme, []) - self._status = None - self._tags = None + self.background = True - def description(self, widget): - return self._tags if self._tags else "..." + self.__layout = util.format.aslist( + self.parameter( + "layout", "playerctl.prev, playerctl.song, playerctl.pause, playerctl.next" + ) + ) + + self.__song = "" + self.__cmd = "playerctl " + self.__format = self.parameter("format", "{artist} - {title}") + + widget_map = {} + for widget_name in self.__layout: + widget = self.add_widget(name=widget_name) + if widget_name == "playerctl.prev": + widget_map[widget] = { + "button": core.input.LEFT_MOUSE, + "cmd": self.__cmd + "previous", + } + widget.set("state", "prev") + elif widget_name == "playerctl.pause": + widget_map[widget] = { + "button": core.input.LEFT_MOUSE, + "cmd": self.__cmd + "play-pause", + } + elif widget_name == "playerctl.next": + widget_map[widget] = { + "button": core.input.LEFT_MOUSE, + "cmd": self.__cmd + "next", + } + widget.set("state", "next") + elif widget_name == "playerctl.song": + widget_map[widget] = [ + { + "button": core.input.LEFT_MOUSE, + "cmd": self.__cmd + "play-pause", + }, { + "button": core.input.WHEEL_UP, + "cmd": self.__cmd + "next", + }, { + "button": core.input.WHEEL_DOWN, + "cmd": self.__cmd + "previous", + } + ] + else: + raise KeyError( + "The playerctl module does not have a {widget_name!r} widget".format( + widget_name=widget_name + ) + ) + + for widget, callback_options in widget_map.items(): + if isinstance(callback_options, dict): + core.input.register(widget, **callback_options) def update(self): - self._load_song() - - def state(self, widget): - if widget.name == "playerctl.prev": - return "prev" - if widget.name == "playerctl.next": - return "next" - return self._status - - def _load_song(self): - info = "" try: - status = util.cli.execute("playerctl status").lower() - info = util.cli.execute("playerctl metadata xesam:title") - except : - self._status = None - self._tags = None - return - self._status = status.split("\n")[0].lower() - self._tags = info.split("\n")[0][:20] + self.__get_song() -# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 + for widget in self.widgets(): + if widget.name == "playerctl.pause": + playback_status = str(util.cli.execute(self.__cmd + "status")).strip() + if playback_status != "": + if playback_status == "Playing": + widget.set("state", "playing") + else: + widget.set("state", "paused") + elif widget.name == "playerctl.song": + widget.set("state", "song") + widget.full_text(self.__song) + except Exception as e: + logging.exception(e) + self.__song = "" + + def __get_song(self): + album = str(util.cli.execute(self.__cmd + "metadata xesam:album")).strip() + title = str(util.cli.execute(self.__cmd + "metadata xesam:title")).strip() + artist = str(util.cli.execute(self.__cmd + "metadata xesam:albumArtist")).strip() + track_number = str(util.cli.execute(self.__cmd + "metadata xesam:trackNumber")).strip() + + self.__song = self.__format.format( + album = album, + title = title, + artist = artist, + trackNumber = track_number + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/bumblebee_status/modules/contrib/shortcut.py new/bumblebee-status-2.1.2/bumblebee_status/modules/contrib/shortcut.py --- old/bumblebee-status-2.1.1/bumblebee_status/modules/contrib/shortcut.py 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/bumblebee_status/modules/contrib/shortcut.py 2021-02-20 14:49:45.000000000 +0100 @@ -4,7 +4,7 @@ when clicking on it. For more than one shortcut, the commands and labels are strings separated by -a demiliter (; semicolon by default). +a delimiter (; semicolon by default). For example in order to create two shortcuts labeled A and B with commands cmdA and cmdB you could do: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/bumblebee_status/modules/contrib/spotify.py new/bumblebee-status-2.1.2/bumblebee_status/modules/contrib/spotify.py --- old/bumblebee-status-2.1.1/bumblebee_status/modules/contrib/spotify.py 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/bumblebee_status/modules/contrib/spotify.py 2021-02-20 14:49:45.000000000 +0100 @@ -10,6 +10,8 @@ Widget names are: spotify.song, spotify.prev, spotify.pause, spotify.next * spotify.concise_controls: When enabled, allows spotify to be controlled from just the spotify.song widget. Concise controls are: Left Click: Toggle Pause; Wheel Up: Next; Wheel Down; Previous. + * spotify.bus_name: String (defaults to `spotify`) + Available values: spotify, spotifyd contributed by `yvesh <https://github.com/yvesh>`_ - many thanks! @@ -35,6 +37,8 @@ self.background = True + self.__bus_name = self.parameter("bus_name", "spotify") + self.__layout = util.format.aslist( self.parameter( "layout", "spotify.song,spotify.prev,spotify.pause,spotify.next", @@ -46,7 +50,11 @@ self.__pause = "" self.__format = self.parameter("format", "{artist} - {title}") - self.__cmd = "dbus-send --session --type=method_call --dest=org.mpris.MediaPlayer2.spotify \ + if self.__bus_name == "spotifyd": + self.__cmd = "dbus-send --session --type=method_call --dest=org.mpris.MediaPlayer2.spotifyd \ + /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player." + else: + self.__cmd = "dbus-send --session --type=method_call --dest=org.mpris.MediaPlayer2.spotify \ /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player." widget_map = {} @@ -104,9 +112,14 @@ def __get_song(self): bus = self.__bus - spotify = bus.get_object( - "org.mpris.MediaPlayer2.spotify", "/org/mpris/MediaPlayer2" - ) + if self.__bus_name == "spotifyd": + spotify = bus.get_object( + "org.mpris.MediaPlayer2.spotifyd", "/org/mpris/MediaPlayer2" + ) + else: + spotify = bus.get_object( + "org.mpris.MediaPlayer2.spotify", "/org/mpris/MediaPlayer2" + ) spotify_iface = dbus.Interface(spotify, "org.freedesktop.DBus.Properties") props = spotify_iface.Get("org.mpris.MediaPlayer2.Player", "Metadata") self.__song = self.__format.format( @@ -120,14 +133,20 @@ try: self.__get_song() + if self.__bus_name == "spotifyd": + bus = self.__bus.get_object( + "org.mpris.MediaPlayer2.spotifyd", "/org/mpris/MediaPlayer2" + ) + else: + bus = self.__bus.get_object( + "org.mpris.MediaPlayer2.spotify", "/org/mpris/MediaPlayer2" + ) + for widget in self.widgets(): if widget.name == "spotify.pause": playback_status = str( dbus.Interface( - self.__bus.get_object( - "org.mpris.MediaPlayer2.spotify", - "/org/mpris/MediaPlayer2", - ), + bus, "org.freedesktop.DBus.Properties", ).Get("org.mpris.MediaPlayer2.Player", "PlaybackStatus") ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/bumblebee_status/modules/core/time.py new/bumblebee-status-2.1.2/bumblebee_status/modules/core/time.py --- old/bumblebee-status-2.1.1/bumblebee_status/modules/core/time.py 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/bumblebee_status/modules/core/time.py 2021-02-20 14:49:45.000000000 +0100 @@ -12,7 +12,6 @@ class Module(Module): - @core.decorators.every(seconds=59) # ensures one update per minute def __init__(self, config, theme): super().__init__(config, theme) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/docs/development/module.rst new/bumblebee-status-2.1.2/docs/development/module.rst --- old/bumblebee-status-2.1.1/docs/development/module.rst 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/docs/development/module.rst 2021-02-20 14:49:45.000000000 +0100 @@ -11,6 +11,7 @@ ``bumblebee-status`` (i.e.��a module called ``bumblebee_status/modules/contrib/test.py`` will be loaded using ``bumblebee-status -m test``) +- Alternatively, you can put your module in ``~/.config/bumblebee-status/modules/`` - The module name must follow the `Python Naming Conventions <https://www.python.org/dev/peps/pep-0008/#package-and-module-names>`_ - See below for how to actually write the module - Test (run ``bumblebee-status`` in the CLI) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/docs/features.rst new/bumblebee-status-2.1.2/docs/features.rst --- old/bumblebee-status-2.1.1/docs/features.rst 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/docs/features.rst 2021-02-20 14:49:45.000000000 +0100 @@ -1,6 +1,25 @@ Advanced usage =========================== +Intervals +--------- + +Some modules define their own update intervals (e.g. most modules that query +an online service), such as to not cause a storm of "once every second" queries. + +For such modules, the "global" interval defined via the ``interval`` parameter effectively defines the +highest possible "resolution". If you have a global interval of 10s, for example, +any other module can update at 10s, 20s, 30s, etc., but not every 25s. The status +bar will internally always align to the next future time slot. + +The update interval can also be changed on a per-module basis, like +this (overriding the default module interval indicated above): + +.. code-block:: bash + + $ ./bumblebee-status -m cpu memory -p cpu.interval=5s memory.interval=1m + + Events ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/docs/introduction.rst new/bumblebee-status-2.1.2/docs/introduction.rst --- old/bumblebee-status-2.1.1/docs/introduction.rst 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/docs/introduction.rst 2021-02-20 14:49:45.000000000 +0100 @@ -19,6 +19,9 @@ # will install bumblebee-status into ~/.local/bin/bumblebee-status pip install --user bumblebee-status + +There is also a SlackBuild available here: [slackbuilds:bumblebee-status](http://slackbuilds.org/repository/14.2/desktop/bumblebee-status/) - many thanks to [@Tonus1](https://github.com/Tonus1)! + Dependencies ------------ @@ -56,12 +59,15 @@ $ ./bumblebee-status -m <list of modules> -p interval=<interval in seconds> -The update interval can also be changed on a per-module basis, like -this: +The update interval is the global "refresh" interval of the modules (i.e. how often +the bar will be updated with new data). The default interval is one second. It is +possible to use suffixes such as "m" (for minutes), or "h" for hours (e.g. +``-p interval=5m`` to update once every 5 minutes. -.. code-block:: bash +Note that some modules define their own intervals (e.g. most modules that query +an online service), such as to not cause a storm of "once every second" queries. - $ ./bumblebee-status -m cpu memory -p cpu.interval=5s memory.interval=1m +For more details on that, please refer to :doc:`features`. All modules can be given ���aliases��� using ``<module name>:<alias>``, by which they can be parametrized, for example: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/docs/modules.rst new/bumblebee-status-2.1.2/docs/modules.rst --- old/bumblebee-status-2.1.1/docs/modules.rst 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/docs/modules.rst 2021-02-20 14:49:45.000000000 +0100 @@ -63,6 +63,7 @@ * disk.path: Path to calculate disk usage from (defaults to /) * disk.open: Which application / file manager to launch (default xdg-open) * disk.format: Format string, tags {path}, {used}, {left}, {size} and {percent} (defaults to '{path} {used}/{size} ({percent:05.02f}%)') + * disk.system: Unit system to use - SI (KB, MB, ...) or IEC (KiB, MiB, ...) (defaults to 'IEC') .. image:: ../screenshots/disk.png @@ -620,8 +621,6 @@ Left click toggles pause, scroll up skips the current song, scroll down returns to the previous song. -Requires the following library: - * subprocess Parameters: * deadbeef.format: Format string (defaults to '{artist} - {title}') Available values are: {artist}, {title}, {album}, {length}, @@ -772,7 +771,7 @@ hddtemp ~~~~~~~ -Fetch hard drive temeperature data from a hddtemp daemon +Fetch hard drive temperature data from a hddtemp daemon that runs on localhost and default port (7634) contributed by `somospocos <https://github.com/somospocos>`_ - many thanks! @@ -1051,6 +1050,14 @@ Requires the following executable: * playerctl +Parameters: + * playerctl.format: Format string (defaults to '{artist} - {title}') + Available values are: {album}, {title}, {artist}, {trackNumber} + * playerctl.layout: Comma-separated list to change order of widgets (defaults to song, previous, pause, next) + Widget names are: playerctl.song, playerctl.prev, playerctl.pause, playerctl.next + +Parameters are inherited from `spotify` module, many thanks to its developers! + contributed by `smitajit <https://github.com/smitajit>`_ - many thanks! .. image:: ../screenshots/playerctl.png @@ -1225,7 +1232,7 @@ when clicking on it. For more than one shortcut, the commands and labels are strings separated by -a demiliter (; semicolon by default). +a delimiter (; semicolon by default). For example in order to create two shortcuts labeled A and B with commands cmdA and cmdB you could do: @@ -1265,7 +1272,6 @@ Requires the following libraries: * requests - * regex Parameters: * spaceapi.url: String representation of the api endpoint @@ -1298,6 +1304,8 @@ Widget names are: spotify.song, spotify.prev, spotify.pause, spotify.next * spotify.concise_controls: When enabled, allows spotify to be controlled from just the spotify.song widget. Concise controls are: Left Click: Toggle Pause; Wheel Up: Next; Wheel Down; Previous. + * spotify.bus_name: String (defaults to `spotify`) + Available values: spotify, spotifyd contributed by `yvesh <https://github.com/yvesh>`_ - many thanks! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bumblebee-status-2.1.1/tests/core/test_module.py new/bumblebee-status-2.1.2/tests/core/test_module.py --- old/bumblebee-status-2.1.1/tests/core/test_module.py 2020-12-07 10:00:20.000000000 +0100 +++ new/bumblebee-status-2.1.2/tests/core/test_module.py 2021-02-20 14:49:45.000000000 +0100 @@ -55,7 +55,8 @@ module = core.module.load(module_name="test", config=config) assert module.__class__.__name__ == "Error" - assert module.widget().full_text() == "test: some-error" + assert module.widget().full_text() == "test: some-error" or \ + module.widget().full_text() == "test: unable to load module" def test_loadvalid_module():
participants (1)
-
Source-Sync