Use handymenu conf from /etc/

parent 5d669418
......@@ -27,8 +27,7 @@ def parse_desktop(desktop):
def add_to_handymenu(user, cmd, category):
# TODO : change path
path = '/home/{}/.config/handymenu/conf.default.yaml'.format(user)
path = '/etc/handymenu/handymenu-{}-default.yaml'.format(user)
subprocess.run(['sed', '-i', '-e', 's/!!python\/str//g', path])
print(path)
with open(path) as stream:
......@@ -69,7 +68,7 @@ if __name__ == '__main__':
desktop = find_desktop(args.app[0])
values = parse_desktop(desktop)
links = {
'Exec' : 'cmd',
'Exec': 'cmd',
'GenericName': 'generic',
'GenericName[fr]': 'generic',
'Name[fr]': 'name',
......@@ -77,7 +76,7 @@ if __name__ == '__main__':
'Icon': 'icon',
}
cmd = {}
for k,v in links.items():
for k, v in links.items():
try:
cmd[v] = values[k]
except KeyError:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment