lemonbar: Move last actions to modules and remove command dict
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user