A small trick
to have openbox configuration in HAML

$ gem install haml
$ gem install html2haml
$ cd ~/.config/openbox
$ cp rc.xml rc.bak
$ html2haml --html-attributes rc.xml rc.haml
$ haml rc.haml rc.xml
$ openbox --reconfigure

To automatically convert config from haml to xml before reconfiguration replace this default binding (or what are you using)

%action(name="Reconfigure")

with something like

%action(name="Execute")
  %command sh -c 'haml ~/.config/openbox/rc.haml ~/.config/openbox/rc.xml; openbox --reconfigure'

 

A small bug i've encountered is that openbox at least sometimes is case sentisitive to tags but html2haml lower cases them all.

Most of the tags are in lower case already, but some fixes to HAML may be needed. In my case f.ex. it was titleLayout. Conversion from HAML to XML preserves case, so no problem here.

 

 

shitpoet@gmail.com

 



 

free hit counters