[modules/pulsectl] add option to automatically start pulseaudio

This commit is contained in:
tobi-wan-kenobi 2022-09-10 08:57:00 +02:00
parent 003a6efc8e
commit ca6bf2e189

View file

@ -7,6 +7,7 @@ import core.widget
import core.input
import core.event
import util.cli
import util.format
class Module(core.module.Module):
@ -43,6 +44,9 @@ class Module(core.module.Module):
for event in events:
core.input.register(self, button=event["button"], cmd=event["action"])
if util.format.asbool(self.parameter("autostart", False)):
util.cli.execute("pulseaudio --start", ignore_errors=True)
self.process(None)
def display(self, _):