1 #include "openbox/action.h"
2 #include "openbox/action_list_run.h"
3 #include "openbox/config_value.h"
4 #include "openbox/client_set.h"
11 static gpointer setup_func(GHashTable *config);
12 static void free_func(gpointer options);
13 static gboolean run_func(const ObClientSet *set,
14 const ObActionListRun *data, gpointer options);
16 void action_debug_startup(void)
18 action_register("Debug", OB_ACTION_DEFAULT_FILTER_EMPTY,
19 setup_func, free_func, run_func);
22 static gpointer setup_func(GHashTable *config)
27 o = g_slice_new0(Options);
29 v = g_hash_table_lookup(config, "string");
30 if (v && config_value_is_string(v))
31 o->str = g_strdup(config_value_string(v));
35 static void free_func(gpointer options)
39 g_slice_free(Options, o);
42 /* Always return FALSE because its not interactive */
43 static gboolean run_func(const ObClientSet *set,
44 const ObActionListRun *data, gpointer options)
48 if (o->str) g_print("%s\n", o->str);