diff --git a/bumblebee-status b/bumblebee-status index ff1631f..0359142 100755 --- a/bumblebee-status +++ b/bumblebee-status @@ -1,114 +1,20 @@ #!/usr/bin/env python -import os -import sys -import time -import glob -import pkgutil -import argparse -import textwrap -import threading -import importlib import bumblebee.theme -import bumblebee.modules +import bumblebee.engine import bumblebee.outputs.i3 -def print_module_list(): - print "available modules:" - path = os.path.dirname(bumblebee.modules.__file__) - for mod in [ name for _, name, _ in pkgutil.iter_modules([path])]: - m = importlib.import_module("bumblebee.modules.{}".format(mod)) - - desc = "n/a" if not hasattr(m, "description") else getattr(m, "description")() - usage = "n/a" if not hasattr(m, "usage") else getattr(m, "usage")() - notes = "n/a" if not hasattr(m, "notes") else getattr(m, "notes")() - - print " {}: ".format(mod) - print textwrap.fill("Description: {}".format(desc), - 80, initial_indent=" ", subsequent_indent=" ") - print textwrap.fill("Usage : {}".format(usage), - 80, initial_indent=" ", subsequent_indent=" ") - print textwrap.fill("Notes : {}".format(notes), - 80, initial_indent=" ", subsequent_indent=" ") - print "" - -def print_theme_list(): - d = bumblebee.theme.getpath() - - print "available themes:" - print textwrap.fill(", ".join( - [ os.path.basename(f).replace(".json", "") for f in glob.iglob("{}/*.json".format(d)) ]), - 80, initial_indent = " ", subsequent_indent = " " - ) - -def init_argument_parser(): - parser = argparse.ArgumentParser(description="display system data in the i3bar") - parser.add_argument("-m", "--modules", nargs="+", help="List of modules to load. The order of the list determines their order in the i3bar (from left to right)", default=[]) - parser.add_argument("-e", "--events", nargs="+", help="List of click events that should be handled. Format is: