[modules/scroll] add preliminary version of scrolling module

add a scrolling module that can be used to scroll the whole bar to an
arbitrary number of widgets.

its parameter is "width", which determines the number of widgets to
display.

see #921
This commit is contained in:
tobi-wan-kenobi 2022-09-11 13:12:51 +02:00
parent 910b9a8963
commit 21cbbe685d
3 changed files with 81 additions and 1 deletions

View file

@ -112,6 +112,15 @@ class Module(core.input.Object):
def hidden(self):
return False
"""Override this to show the module even if it normally would be scrolled away
:return: True if the module should be hidden, False otherwise
:rtype: boolean
"""
def scroll(self):
return True
"""Retrieve CLI/configuration parameters for this module. For example, if
the module is called "test" and the user specifies "-p test.x=123" on the
commandline, using self.parameter("x") retrieves the value 123.