add option to debug command output

This commit is contained in:
2024-01-01 01:52:19 +01:00
parent 2046adfc79
commit eeb18679e6
2 changed files with 13 additions and 5 deletions

11
README
View File

@@ -1,8 +1,15 @@
Install Install
Requirements: Requirements:
- python package justpy, the framework: pip install justpy --upgrade - controldeck
- (optionally) for volume buttons: libpulse - 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: local:
./setup.sh ./setup.sh

View File

@@ -293,11 +293,11 @@ class Button(QBtn):
if DEBUG: if DEBUG:
print(f"[DEBUG.btn.{self.text}] command: {self.command}") 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=True freezes controldeck until process finished (until e.g. an emacs button is closed)
output = False outputting = False
if DEBUG and self.command_output: 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(): # def upd():
# time.sleep(2) # time.sleep(2)
@@ -1150,6 +1150,7 @@ async def application(request):
description=j['description'], description=j['description'],
description_alt=j['description-alt'], description_alt=j['description-alt'],
command=j['command'], command_alt=j['command-alt'], command=j['command'], command_alt=j['command-alt'],
command_output=j['command-output'],
color_bg=j['color-bg'], color_fg=j['color-fg'], color_bg=j['color-bg'], color_fg=j['color-fg'],
state_pattern=j['state'], state_pattern_alt=j['state-alt'], state_pattern=j['state'], state_pattern_alt=j['state-alt'],
state_command=j['state-command'], state_command=j['state-command'],