menu format bummy
Marius Nita
marius at cs.pdx.edu
Wed Apr 9 01:02:42 EDT 2003
this is the stuff i was toying with for a general config format. below
is the unofficial grammar, and then some examples of what it would
look like. strings and ids are pretty much the same, but strings can
have spaces in them and such, when id's can't. id's can have other
characters in them though, such as '.' and '-'. so you can still say
Toolbar.bummy.color "blue"
if you want. '=' can also be added and made optional. sometimes it
might help readability.
blef = "red"
as opposed to
blef "red"
though the difference isn't huge. the cool thing is that it allows you
to be lame:
window.title bevel2, horizontal, blef
window.title.color "red"
window.title.colorTo "green"
window.title.font "tahoma"
window.title.font.size 14
or cool:
window {
title {
texture bevel2, horizontal, blef
colors red, green
font "tahoma", 14
}
}
----------------------------
config := exprs
exprs := | expr
| exprs '\n' expr
expr := id list block
| id list
| id block
list := elem
| list ',' elem
block := '{' exprs '}'
elem := id | number | string
-----------------------------
include "blef.conf"
include "foo.conf"
Section "Keyboard" {
mbind Titlebar, Handle, BLCorner, BRCorner, Client {
event Press
button Left
action Focus
}
mbind Maximize {
event Click
button Middle
action ToggleMaxVert
}
# ...
}
Style "merry" {
name "brit technology ltd inc co"
author "merry"
toolbar {
# ...
}
slit {
border 3
texture bevel9, vertical
colors "red", "blue"
}
window {
pixmaps {
close "close.xpm"
max "max.png", "max_down.png"
}
texture bevel3, pyramid, cyllindrical, crazy
colors "red", "blue"
}
}
-----------------
menu "the fonky of doom", fonky { # name it fonky
exec "Fonky Bummy", "/usr/bin/fonky -s"
sep
exec "hi", "/bin/hi"
}
menu "Main Menu" {
exec "Xterm", "xterm"
menu fonky # include "fonky" submenu
menu "Blef" { # explicit submenu
exec "hi", "/bin/hi"
shutdown "Down with the system"
}
}
------------------
More information about the openbox
mailing list