[modules/pulsectl] add option to automatically start pulseaudio
This commit is contained in:
parent
003a6efc8e
commit
ca6bf2e189
1 changed files with 4 additions and 0 deletions
|
@ -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, _):
|
||||
|
|
Loading…
Reference in a new issue