client: rewrite focus()
[awesome.git] / build-utils / layoutgen.sh
blobf0f42985852dbb6fc573f41c67ab3ec60387a169
1 #!/bin/sh
2 top_srcdir="${1-.}"
3 echo "/* This file is autogenerated by" `basename $0` "*/"
4 echo
5 echo "const name_func_link_t LayoutList[] ="
6 echo "{"
7 for file in ${top_srcdir}/layouts/*.h
8 do
9 echo " /* $file */"
10 grep '^layout_t layout_' $file | cut -d' ' -f2 | cut -d\; -f1 | while read layout
12 shortname=`echo $layout | cut -d _ -f2-`
13 echo " {\"$shortname\", $layout},"
14 done
15 done
17 echo " {NULL, NULL}"
18 echo "};"