diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4cc414d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +testing_config.yml diff --git a/easyconf.py b/easyconf.py new file mode 100644 index 0000000..2f94673 --- /dev/null +++ b/easyconf.py @@ -0,0 +1,7 @@ +import yaml +import io + +with io.open("./testing_config.yml", 'r', encoding='utf8') as file: + config = yaml.safe_load(file) + +print(config['bar']['config']) diff --git a/example_config.yml b/example_config.yml new file mode 100644 index 0000000..70bb8a1 --- /dev/null +++ b/example_config.yml @@ -0,0 +1,37 @@ +# SEE `man lemonbar` +bar: + + config: + geometry: 'widthxheight+x+y' # bar geomtery + bottom: true # dock bar at bottom + force: true # force the bar to dock + font: 'fontname' # see man page + name: 'name' # set WM_NAME + line_thickness: 3 # under/overline thickness + bg_color: '#000' # default color of the bar + fg_color: '#FFF' # default color of text + offset: 0 # vertical offset of text in pixels. can be negative. + line_color: '#ff0000' # default underline color + + modules: # bar modules + + time: # module name can be anything you want + command: 'date' # command to be run + refresh: 1000 # how often to refresh in milliseconds + bg_color: '#000' # color of the bar behind the text of this module + fg_color: '#FFF' # color of the text itself + align: left # left, right, or center + font: 'fontname' # the name of the font for this specific module + line: + type: underline # underline or overline + color: '#000' # line color + button: + activator: left # how to activate the button. clicks: left, right, middle. scroll wheel: scrup, scrdown + command: 'echo "hello" > ~/file.txt' # command to run when button is clicked + # you may have multiple buttons with different activators. + + memory: # define multiple modules... + command: "free -h | awk '/Mem/ {print $3}'" + refresh: 10000 + # etc... +