From eeb18679e6a6a8f1d7bd038b963d49cab606d9d1 Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Mon, 1 Jan 2024 01:52:19 +0100 Subject: [PATCH] add option to debug command output --- README | 11 +++++++++-- controldeck.py | 7 ++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README b/README index 0b14b79..a234e57 100644 --- a/README +++ b/README @@ -1,8 +1,15 @@ Install Requirements: - - python package justpy, the framework: pip install justpy --upgrade - - (optionally) for volume buttons: libpulse + - controldeck + - python package justpy, the framework: pip install justpy --upgrade + - (optionally) for volume buttons: libpulse + - controldeck-gui + - render engine + - GTK: python-gobject, python-cairo, webkit2gtk>=2.22 + - QT: qt5-webkit, python-qtpy + - QT5: python-pyqt5-webengine, python-pyqt5 + - QT: pyside2, pyside6 local: ./setup.sh diff --git a/controldeck.py b/controldeck.py index 24510ed..727b865 100755 --- a/controldeck.py +++ b/controldeck.py @@ -293,11 +293,11 @@ class Button(QBtn): if DEBUG: print(f"[DEBUG.btn.{self.text}] command: {self.command}") # output=True freezes controldeck until process finished (until e.g. an emacs button is closed) - output = False + outputting = False if DEBUG and self.command_output: - output = True + outputting = True - process(self.command, shell=True, output=output) + output = process(self.command, shell=True, output=outputting) # def upd(): # time.sleep(2) @@ -1150,6 +1150,7 @@ async def application(request): description=j['description'], description_alt=j['description-alt'], command=j['command'], command_alt=j['command-alt'], + command_output=j['command-output'], color_bg=j['color-bg'], color_fg=j['color-fg'], state_pattern=j['state'], state_pattern_alt=j['state-alt'], state_command=j['state-command'],