auto generate uicb list
This commit is contained in:
parent
6a6fb58b9c
commit
135c418275
|
@ -61,6 +61,13 @@ defconfig.h: awesomerc
|
|||
@$(SED) 's,\\,\\\\,g;s/$$/ \\/;s/"/\\"/g' "awesomerc" >> defconfig.h
|
||||
@echo "\"" >> defconfig.h
|
||||
|
||||
CLEANFILES += uicbgen.h
|
||||
BUILT_SOURCES += uicbgen.h
|
||||
EXTRA_DIST += uicbgen.sh
|
||||
uicbgen.h: $(awesome_SOURCES)
|
||||
@echo "generating uicbgen.h from headers file"
|
||||
@$(top_srcdir)/uicbgen.sh > $(top_srcdir)/uicbgen.h
|
||||
|
||||
if USING_GCC
|
||||
# If you are using gcc, and want to deactivate this default set of
|
||||
# compile flags, run make with AWESOME_CFLAGS="".
|
||||
|
|
|
@ -277,7 +277,7 @@ typedef struct
|
|||
/** Status bar */
|
||||
Statusbar *statusbar;
|
||||
/** Padding */
|
||||
Padding padding;
|
||||
Padding padding;
|
||||
/** Font */
|
||||
XftFont *font;
|
||||
} VirtScreen;
|
||||
|
|
51
uicb.c
51
uicb.c
|
@ -33,56 +33,7 @@
|
|||
|
||||
extern AwesomeConf globalconf;
|
||||
|
||||
const name_func_link_t UicbList[] =
|
||||
{
|
||||
/* xutil.c */
|
||||
{"spawn", uicb_spawn},
|
||||
{"exec", uicb_exec},
|
||||
/* client.c */
|
||||
{"client_kill", uicb_client_kill},
|
||||
{"client_moveresize", uicb_client_moveresize},
|
||||
{"client_settrans", uicb_client_settrans},
|
||||
{"client_swapnext", uicb_client_swapnext},
|
||||
{"client_swapprev", uicb_client_swapprev},
|
||||
/* tag.c */
|
||||
{"client_tag", uicb_client_tag},
|
||||
{"client_togglefloating", uicb_client_togglefloating},
|
||||
{"tag_toggleview", uicb_tag_toggleview},
|
||||
{"client_toggletag", uicb_client_toggletag},
|
||||
{"tag_view", uicb_tag_view},
|
||||
{"tag_viewprev_selected", uicb_tag_prev_selected},
|
||||
{"tag_viewprev", uicb_tag_viewprev},
|
||||
{"tag_viewnext", uicb_tag_viewnext},
|
||||
{"tag_create", uicb_tag_create},
|
||||
/* layout.c */
|
||||
{"tag_setlayout", uicb_tag_setlayout},
|
||||
{"client_focusnext", uicb_client_focusnext},
|
||||
{"client_focusprev", uicb_client_focusprev},
|
||||
{"client_togglemax", uicb_client_togglemax},
|
||||
{"client_toggleverticalmax", uicb_client_toggleverticalmax},
|
||||
{"client_togglehorizontalmax", uicb_client_togglehorizontalmax},
|
||||
{"client_zoom", uicb_client_zoom},
|
||||
/* layouts/tile.c */
|
||||
{"tag_setmwfact", uicb_tag_setmwfact},
|
||||
{"tag_setnmaster", uicb_tag_setnmaster},
|
||||
{"tag_setncol", uicb_tag_setncol},
|
||||
/* screen.c */
|
||||
{"screen_focus", uicb_screen_focus},
|
||||
{"client_movetoscreen", uicb_client_movetoscreen},
|
||||
/* awesome.c */
|
||||
{"quit", uicb_quit},
|
||||
/* statusbar.c */
|
||||
{"statusbar_toggle", uicb_statusbar_toggle},
|
||||
/* mouse.c */
|
||||
{"client_movemouse", uicb_client_movemouse},
|
||||
{"client_resizemouse", uicb_client_resizemouse},
|
||||
/* focus.c */
|
||||
{"focus_history", uicb_focus_history},
|
||||
{"focus_client_byname", uicb_focus_client_byname},
|
||||
/* widgets.c */
|
||||
{"widget_tell", uicb_widget_tell},
|
||||
{NULL, NULL}
|
||||
};
|
||||
#include "uicbgen.h"
|
||||
|
||||
static int
|
||||
run_uicb(char *cmd)
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
echo "/* This file is autogenerated by" $(basename $0) "*/"
|
||||
echo
|
||||
echo "const name_func_link_t UicbList[] ="
|
||||
echo "{"
|
||||
for file in *.h layouts/*.h
|
||||
do
|
||||
echo " /* $file */"
|
||||
grep '^Uicb uicb_' $file | cut -d' ' -f2 | cut -d\; -f1 | while read uicb
|
||||
do
|
||||
shortname=$(echo $uicb | cut -d _ -f2-)
|
||||
echo " {\"$shortname\", $uicb},"
|
||||
done
|
||||
done
|
||||
|
||||
echo " {NULL, NULL}"
|
||||
echo "};"
|
Loading…
Reference in New Issue