A simple replacement for i3status that is both extensible and customizable.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

vdstatus.py 604B

12345678910111213141516171819202122
  1. import json
  2. import os
  3. import configparser
  4. import importlib
  5. import plugins
  6. DEFAULT_CONFIG = os.path.join(os.environ['HOME'], 'IdeaProjects/vdstatus/conf.ini')
  7. configuration = configparser.ConfigParser()
  8. configuration.read(DEFAULT_CONFIG)
  9. def run_plugins():
  10. outputs = list()
  11. for section in configuration.sections():
  12. if section == 'main':
  13. continue
  14. plugin_name = '.' + configuration.get(section, 'plugin')
  15. plugin_module = importlib.import_module(plugin_name, 'plugins')
  16. outputs.append(plugin_module.execute(configuration, section))
  17. return outputs