1 #include "openbox/action.h"
2 #include "openbox/action_list_run.h"
3 #include "openbox/action_value.h"
10 static gpointer setup_func(GHashTable *config);
11 static void free_func(gpointer options);
12 static gboolean run_func(const ObActionListRun *data, gpointer options);
14 void action_debug_startup(void)
16 action_register("Debug", OB_ACTION_DEFAULT_FILTER_EMPTY,
17 setup_func, free_func, run_func);
20 static gpointer setup_func(GHashTable *config)
25 o = g_slice_new0(Options);
27 v = g_hash_table_lookup(config, "string");
28 if (v && action_value_is_string(v))
29 o->str = g_strdup(action_value_string(v));
33 static void free_func(gpointer options)
37 g_slice_free(Options, o);
40 /* Always return FALSE because its not interactive */
41 static gboolean run_func(const ObActionListRun *data, gpointer options)
45 if (o->str) g_print("%s\n", o->str);