[docs] rcskeleton improving and completing

This commit is contained in:
marco candrian 2008-04-09 02:21:54 +02:00 committed by Marco Candrian
parent 76fb9906ca
commit 0113e69463
1 changed files with 9 additions and 10 deletions

View File

@ -20,13 +20,12 @@ print """Note: when there is no whitespace, quotes are optional.
<mod> -> A key modifier list (e.g. Mod1) <mod> -> A key modifier list (e.g. Mod1)
<regex> -> Regular expression <regex> -> Regular expression
<string> -> A string <string> -> A string
<string-list> -> A string list (e.g. {a, b, c, ...})
<uicb-arg> -> Argument to an uicb function <uicb-arg> -> Argument to an uicb function
<uicb-cmd> -> Uicb function, see UICB FUNCTIONS <uicb-cmd> -> Uicb function, see UICB FUNCTIONS
<position> -> A position: off, top, right, left, bottom, auto <style section> -> A style section: {fg= bg= border= font= shadow= shadow_offset= }
<style section> -> A style section
<titlebar sec> -> A titlebar section
<{.., ...}> -> List of available options <{.., ...}> -> List of available options
[MULTI] -> This item can be defines multiple times [MULTI] -> This item can be defined multiple times
""" """
import sys import sys
@ -46,8 +45,6 @@ def sections_print(sec):
indent += " " indent += " "
if sections[sec][opt][9:] == "style_opts": if sections[sec][opt][9:] == "style_opts":
print indent + "<style section>" print indent + "<style section>"
elif sections[sec][opt][9:] == "titlebar_opts":
print indent + "<titlebar section>"
else: else:
sections_print(sections[sec][opt][9:]) sections_print(sections[sec][opt][9:])
indent = indent[0:-4] indent = indent[0:-4]
@ -69,6 +66,10 @@ def sections_print(sec):
print indent + opt + " = <key, ...>" print indent + opt + " = <key, ...>"
elif opt in ["modkey"]: elif opt in ["modkey"]:
print indent + opt + " = <mod>" print indent + opt + " = <mod>"
elif opt in ["align"]:
print indent + opt + " = <{auto, left, right}>"
elif opt in ["text_align"]:
print indent + opt + " = <{left, center, right}>"
elif opt in ["arg"]: elif opt in ["arg"]:
print indent + opt + " = <uicb-arg>" print indent + opt + " = <uicb-arg>"
elif opt in ["command"]: elif opt in ["command"]:
@ -79,8 +80,6 @@ def sections_print(sec):
print indent + opt + " = <{all,tags,focus}>" print indent + opt + " = <{all,tags,focus}>"
elif opt in ["floating_placement"]: elif opt in ["floating_placement"]:
print indent + opt + " = <{smart,under_mouse}>" print indent + opt + " = <{smart,under_mouse}>"
elif opt in ["layout"]:
print indent + opt + " = <layout>"
else: else:
print indent + opt + " = " + sections[sec][opt] print indent + opt + " = " + sections[sec][opt]
@ -108,9 +107,9 @@ def sections_get(file):
elif line.startswith(" CFG_FLOAT"): elif line.startswith(" CFG_FLOAT"):
section_doc[option_title] = "<float>" section_doc[option_title] = "<float>"
elif line.startswith(" CFG_ALIGNMENT"): elif line.startswith(" CFG_ALIGNMENT"):
section_doc[option_title] = "<alignment>" section_doc[option_title] = "<{left, center, right, flex, auto}>"
elif line.startswith(" CFG_POSITION"): elif line.startswith(" CFG_POSITION"):
section_doc[option_title] = "<position>" section_doc[option_title] = "<{top, bottom, left, right, auto, off}>"
elif line.startswith(" CFG_STR_LIST"): elif line.startswith(" CFG_STR_LIST"):
section_doc[option_title] = "<string-list>" section_doc[option_title] = "<string-list>"
elif line.startswith(" CFG_STR"): elif line.startswith(" CFG_STR"):