From 167089049104ec35b781305ab3f5ea1894a17efc Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Sat, 22 Apr 2017 13:10:13 +0200 Subject: [PATCH] [modules/cmus] Make text description scrollable Since the description of a song can get pretty lengthy, make it scrollable. fixes #27 --- bumblebee/modules/cmus.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bumblebee/modules/cmus.py b/bumblebee/modules/cmus.py index 90002d4..4bc0e56 100644 --- a/bumblebee/modules/cmus.py +++ b/bumblebee/modules/cmus.py @@ -19,6 +19,8 @@ import bumblebee.input import bumblebee.output import bumblebee.engine +from bumblebee.output import scrollable + class Module(bumblebee.engine.Module): def __init__(self, engine, config): widgets = [ @@ -47,6 +49,7 @@ class Module(bumblebee.engine.Module): self._repeat = False self._tags = defaultdict(lambda: '') + @scrollable def description(self, widget): return string.Formatter().vformat(self._fmt, (), self._tags)