lemonbar: Move last actions to modules and remove command dict

This commit is contained in:
2019-11-14 19:08:45 +01:00
committed by kuben
parent b8bf0c0f61
commit 1367be34be
3 changed files with 40 additions and 42 deletions

View File

@@ -152,15 +152,10 @@ def exec_commands():
common.logger.debug('Trying reading: "{0}"'.format(data.strip('\n')))
try:
for key,func in common.commands_dict.items():
l = len(key)
if data[:l] == key:
func(data)
break
modules.do_action(data.split()[0])
modules.do_action(data)
except:
common.logger.debug('Exception occured executing command\n Line in: {}\n Data: {}'.format(data, data[l:].split()))
common.logger.debug('Exception occured executing command\n Line in: {}'.format(data))
if len(data) == 0:
common.logger.debug("Lemonbar output closed")
break