[core/theme] Add prefix/postfix methods
Add a way to specify prefix and postfix strings to the full text of a widget's text. Currently, the theme does not fill those yet. see #23
This commit is contained in:
parent
e6666becb3
commit
64f5fc100e
6 changed files with 73 additions and 6 deletions
|
@ -7,12 +7,14 @@ module parameters, etc.) to all other components
|
|||
import argparse
|
||||
|
||||
MODULE_HELP = ""
|
||||
THEME_HELP = ""
|
||||
|
||||
def create_parser():
|
||||
"""Create the argument parser"""
|
||||
parser = argparse.ArgumentParser(description="display system data in the i3bar")
|
||||
parser.add_argument("-m", "--modules", nargs="+", default=[],
|
||||
help=MODULE_HELP)
|
||||
help=MODULE_HELP)
|
||||
parser.add_argument("-t", "--theme", default="default", help=THEME_HELP)
|
||||
return parser
|
||||
|
||||
class Config(object):
|
||||
|
@ -32,4 +34,8 @@ class Config(object):
|
|||
"name": x if not ":" in x else x.split(":")[1],
|
||||
} for x in self._args.modules]
|
||||
|
||||
def theme(self):
|
||||
"""Return the name of the selected theme"""
|
||||
return self._args.theme
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue