mirror of
https://github.com/gryf/pywmtemp.git
synced 2025-12-19 04:10:17 +01:00
Added debug switch.
For now it only saves merged xpm image.
This commit is contained in:
@@ -176,6 +176,7 @@ class SensorDockApp(wmdocklib.DockApp):
|
|||||||
|
|
||||||
def __init__(self, args=None):
|
def __init__(self, args=None):
|
||||||
super().__init__(args)
|
super().__init__(args)
|
||||||
|
self._debug = args.debug
|
||||||
self.fonts = [wmdocklib.BitmapFonts(FONT, (6, 8))]
|
self.fonts = [wmdocklib.BitmapFonts(FONT, (6, 8))]
|
||||||
self.background = BACKGROUND
|
self.background = BACKGROUND
|
||||||
self.conf = {}
|
self.conf = {}
|
||||||
@@ -242,7 +243,7 @@ class SensorDockApp(wmdocklib.DockApp):
|
|||||||
|
|
||||||
# shift charset depending on the threshold defined in config, assuming
|
# shift charset depending on the threshold defined in config, assuming
|
||||||
# charset is the same row(s) copied with different color for warning
|
# charset is the same row(s) copied with different color for warning
|
||||||
# and critival.
|
# and critical.
|
||||||
# FIXME: remove hardcoded multiplies in favor of automatically
|
# FIXME: remove hardcoded multiplies in favor of automatically
|
||||||
# computed factors.
|
# computed factors.
|
||||||
displacement = 0
|
displacement = 0
|
||||||
@@ -345,6 +346,8 @@ class SensorDockApp(wmdocklib.DockApp):
|
|||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('-c', '--config', help='Alternate config file')
|
parser.add_argument('-c', '--config', help='Alternate config file')
|
||||||
|
parser.add_argument('-d', '--debug', action="store_true",
|
||||||
|
help='Turn on debug information')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
dockapp = SensorDockApp(args)
|
dockapp = SensorDockApp(args)
|
||||||
|
|||||||
Reference in New Issue
Block a user