debugging
This commit is contained in:
@@ -15,7 +15,6 @@ import fileinput
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
import argparse
|
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
|
|
||||||
@@ -66,13 +65,7 @@ def get_config_dir():
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
refresh_signal = os.getenv("SIG") if os.getenv("SIG") else 10
|
||||||
parser.add_argument("-s",
|
|
||||||
"--signal",
|
|
||||||
type=int,
|
|
||||||
default=10,
|
|
||||||
help="signal to refresh dwl-tags module; default: 10 (SIGUSR1)")
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
outputs = list_outputs()
|
outputs = list_outputs()
|
||||||
if len(outputs) > 0:
|
if len(outputs) > 0:
|
||||||
@@ -145,7 +138,7 @@ def main():
|
|||||||
with open(output_file, 'w') as fp:
|
with open(output_file, 'w') as fp:
|
||||||
json.dump(data, fp, indent=4)
|
json.dump(data, fp, indent=4)
|
||||||
|
|
||||||
subprocess.Popen("pkill -f -{} nwg-panel".format(args.signal), shell=True)
|
subprocess.Popen("pkill -f -{} nwg-panel".format(refresh_signal), shell=True)
|
||||||
cnt = 0
|
cnt = 0
|
||||||
|
|
||||||
|
|
||||||
|
@@ -203,7 +203,7 @@ def instantiate_content(panel, container, content_list, icons_path=""):
|
|||||||
container.pack_start(cpu_avg, False, False, panel["items-padding"])
|
container.pack_start(cpu_avg, False, False, panel["items-padding"])
|
||||||
|
|
||||||
if item == "dwl-tags":
|
if item == "dwl-tags":
|
||||||
#if os.path.isfile(common.dwl_data_file):
|
if os.path.isfile(common.dwl_data_file):
|
||||||
if "dwl-tags" not in panel:
|
if "dwl-tags" not in panel:
|
||||||
panel["dwl-tags"] = {}
|
panel["dwl-tags"] = {}
|
||||||
|
|
||||||
@@ -213,8 +213,8 @@ def instantiate_content(panel, container, content_list, icons_path=""):
|
|||||||
dwl_data = load_json(common.dwl_data_file)
|
dwl_data = load_json(common.dwl_data_file)
|
||||||
if dwl_data:
|
if dwl_data:
|
||||||
dwl_tags.refresh(dwl_data)
|
dwl_tags.refresh(dwl_data)
|
||||||
#else:
|
else:
|
||||||
# print("{} data file not found".format(common.dwl_data_file))
|
print("{} data file not found".format(common.dwl_data_file))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
Reference in New Issue
Block a user