1 #include "openbox/action.h"
2 #include "openbox/action_list_run.h"
3 #include "openbox/action_value.h"
4 #include "openbox/client_set.h"
5 #include "openbox/openbox.h"
12 static gpointer setup_func(GHashTable *config);
13 static void free_func(gpointer options);
14 static gboolean run_func(const ObClientSet *set,
15 const ObActionListRun *data, gpointer options);
17 void action_restart_startup(void)
19 action_register("Restart", OB_ACTION_DEFAULT_FILTER_EMPTY,
20 setup_func, free_func, run_func);
23 static gpointer setup_func(GHashTable *config)
28 o = g_slice_new0(Options);
30 v = g_hash_table_lookup(config, "command");
31 if (v && action_value_is_string(v))
32 o->cmd = obt_paths_expand_tilde(action_value_string(v));
36 static void free_func(gpointer options)
40 g_slice_free(Options, o);
43 /* Always return FALSE because its not interactive */
44 static gboolean run_func(const ObClientSet *set,
45 const ObActionListRun *data, gpointer options)
49 ob_restart_other(o->cmd);