[modules] re-enable xkcd

This commit is contained in:
tobi-wan-kenobi 2020-04-13 09:20:17 +02:00
parent f2a62ca7c6
commit 06ca5024dc

17
modules/contrib/xkcd.py Normal file
View file

@ -0,0 +1,17 @@
#pylint: disable=C0111,R0903
"""Opens a random xkcd comic in the browser."""
import bumblebee.input
import bumblebee.output
import bumblebee.engine
class Module(bumblebee.engine.Module):
def __init__(self, engine, config):
super(Module, self).__init__(engine, config,
bumblebee.output.Widget(full_text="xkcd")
)
engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE,
cmd="xdg-open https://c.xkcd.com/random/comic/"
)