openbox/actions/execute.c \
openbox/actions/exit.c \
openbox/actions/focus.c \
+ openbox/actions/focustobottom.c \
openbox/actions/fullscreen.c \
openbox/actions/growtoedge.c \
openbox/actions/iconify.c \
openbox/actions/maximize.c \
openbox/actions/maximizehorizontal.c \
openbox/actions/maximizevertical.c \
- openbox/actions/menu.c \
openbox/actions/move.c \
openbox/actions/moverelative.c \
openbox/actions/moveresizeto.c \
openbox/actions/restart.c \
openbox/actions/shade.c \
openbox/actions/showdesktop.c \
+ openbox/actions/showmenu.c \
openbox/actions/unfocus.c \
openbox/actions.c \
openbox/actions.h \
<!-- XML Schema for the Openbox window manager configuration file -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://openbox.org/4.0/rc"
- xmlns:ob="http://openbox.org/4.0/rc"
+ targetNamespace="http://openbox.org/3.4/rc"
+ xmlns:ob="http://openbox.org/3.4/rc"
elementFormDefault="qualified">
<!--
root node
<xsd:enumeration value="Reconfigure"/>
<xsd:enumeration value="Resize"/>
<xsd:enumeration value="ResizeRelative"/>
- <xsd:enumeration value="ResizeRelativeHorz"/>
- <xsd:enumeration value="ResizeRelativeVert"/>
<xsd:enumeration value="Restart"/>
<xsd:enumeration value="SendToBottomLayer"/>
<xsd:enumeration value="SendToDesktop"/>
<xsd:enumeration value="Left"/>
<xsd:enumeration value="Right"/>
<xsd:enumeration value="Bottom"/>
+ <xsd:enumeration value="Handle"/>
<xsd:enumeration value="Maximize"/>
<xsd:enumeration value="AllDesktops"/>
<xsd:enumeration value="Shade"/>
static gpointer setup_add_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
static gpointer setup_remove_func(ObParseInst *i,
xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_addcurrent_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_addlast_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_removecurrent_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_removelast_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
free_func,
run_func,
NULL, NULL);
+ actions_register("AddDesktopLast",
+ setup_addlast_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("RemoveDesktopLast",
+ setup_removelast_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("AddDesktopCurrent",
+ setup_addcurrent_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("RemoveDesktopCurrent",
+ setup_removecurrent_func,
+ free_func,
+ run_func,
+ NULL, NULL);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_addcurrent_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_add_func(i, doc, node);
+ o->current = TRUE;
+ return o;
+}
+
+static gpointer setup_addlast_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_add_func(i, doc, node);
+ o->current = FALSE;
+ return o;
+}
+
+static gpointer setup_removecurrent_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_remove_func(i, doc, node);
+ o->current = TRUE;
+ return o;
+}
+
+static gpointer setup_removelast_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_remove_func(i, doc, node);
+ o->current = FALSE;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
{
action_execute_startup();
action_debug_startup();
- action_menu_startup();
+ action_showmenu_startup();
action_showdesktop_startup();
action_reconfigure_startup();
action_exit_startup();
action_movetoedge_startup();
action_growtoedge_startup();
action_if_startup();
+ action_focustobottom_startup();
}
void action_execute_startup();
void action_debug_startup();
-void action_menu_startup();
+void action_showmenu_startup();
void action_showdesktop_startup();
void action_reconfigure_startup();
void action_exit_startup();
void action_movetoedge_startup();
void action_growtoedge_startup();
void action_if_startup();
+void action_focustobottom_startup();
#endif
#include "openbox/event.h"
#include "openbox/focus_cycle.h"
#include "openbox/openbox.h"
+#include "openbox/client.h"
#include "gettext.h"
typedef struct {
static gboolean cycling = FALSE;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_next_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node);
+static gpointer setup_prev_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
static gboolean i_input_func(guint initial_state,
run_func,
i_input_func,
i_cancel_func);
+ actions_register("NextWindow",
+ setup_next_func,
+ free_func,
+ run_func,
+ i_input_func,
+ i_cancel_func);
+ actions_register("PreviousWindow",
+ setup_prev_func,
+ free_func,
+ run_func,
+ i_input_func,
+ i_cancel_func);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_next_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->forward = TRUE;
+ return o;
+}
+
+static gpointer setup_prev_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->forward = FALSE;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
TRUE,
o->dialog,
TRUE, cancel);
+ cycling = FALSE;
if (ft) {
- actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY,
- state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);
+ if (o->actions)
+ actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY,
+ state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);
+ else
+ client_activate(ft, FALSE, TRUE, TRUE, TRUE);
}
- cycling = FALSE;
}
} Options;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_toggle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
free_func,
run_func,
NULL, NULL);
+ actions_register("ToggleDecorations",
+ setup_toggle_func,
+ free_func,
+ run_func,
+ NULL, NULL);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_toggle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->toggle = TRUE;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
} Options;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_send_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node);
+static gpointer setup_last_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
free_func,
run_func,
NULL, NULL);
+ actions_register("DesktopLast",
+ setup_last_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("SendToDesktop",
+ setup_send_func,
+ free_func,
+ run_func,
+ NULL, NULL);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_send_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->send = TRUE;
+ return o;
+}
+
+static gpointer setup_last_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->last = TRUE;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
#include "openbox/event.h"
#include "openbox/focus_cycle.h"
#include "openbox/openbox.h"
+#include "openbox/client.h"
#include "openbox/misc.h"
#include "gettext.h"
} Options;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_north_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_south_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_east_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_west_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_northwest_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_northeast_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_southwest_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_southeast_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
static gboolean i_input_func(guint initial_state,
run_func,
i_input_func,
i_cancel_func);
+ actions_register("DirectionalFocusNorth",
+ setup_north_func,
+ free_func,
+ run_func,
+ i_input_func,
+ i_cancel_func);
+ actions_register("DirectionalFocusSouth",
+ setup_south_func,
+ free_func,
+ run_func,
+ i_input_func,
+ i_cancel_func);
+ actions_register("DirectionalFocusWest",
+ setup_west_func,
+ free_func,
+ run_func,
+ i_input_func,
+ i_cancel_func);
+ actions_register("DirectionalFocusEast",
+ setup_east_func,
+ free_func,
+ run_func,
+ i_input_func,
+ i_cancel_func);
+ actions_register("DirectionalFocusNorthWest",
+ setup_northwest_func,
+ free_func,
+ run_func,
+ i_input_func,
+ i_cancel_func);
+ actions_register("DirectionalFocusNorthEast",
+ setup_northeast_func,
+ free_func,
+ run_func,
+ i_input_func,
+ i_cancel_func);
+ actions_register("DirectionalFocusSouthWest",
+ setup_southwest_func,
+ free_func,
+ run_func,
+ i_input_func,
+ i_cancel_func);
+ actions_register("DirectionalFocusSouthEast",
+ setup_southeast_func,
+ free_func,
+ run_func,
+ i_input_func,
+ i_cancel_func);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_north_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->direction = OB_DIRECTION_NORTH;
+ return o;
+}
+
+static gpointer setup_south_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->direction = OB_DIRECTION_SOUTH;
+ return o;
+}
+
+static gpointer setup_west_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->direction = OB_DIRECTION_WEST;
+ return o;
+}
+
+static gpointer setup_east_func(ObParseInst *i, xmlDocPtr doc,xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->direction = OB_DIRECTION_EAST;
+ return o;
+}
+
+static gpointer setup_northwest_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->direction = OB_DIRECTION_NORTHWEST;
+ return o;
+}
+
+static gpointer setup_northeast_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->direction = OB_DIRECTION_NORTHEAST;
+ return o;
+}
+
+static gpointer setup_southwest_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->direction = OB_DIRECTION_SOUTHWEST;
+ return o;
+}
+
+static gpointer setup_southeast_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->direction = OB_DIRECTION_SOUTHEAST;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
TRUE, cancel);
if (ft) {
- actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY,
- state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);
+ if (o->actions)
+ actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY,
+ state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);
+ else
+ client_activate(ft, FALSE, TRUE, TRUE, TRUE);
}
}
} Options;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_next_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_prev_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_left_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_right_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_up_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_down_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendnext_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendprev_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendleft_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendright_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendup_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_senddown_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
free_func,
run_func,
NULL, NULL);
+ actions_register("DesktopNext",
+ setup_next_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("DesktopPrevious",
+ setup_prev_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("DesktopLeft",
+ setup_left_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("DesktopRight",
+ setup_right_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("DesktopUp",
+ setup_up_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("DesktopDown",
+ setup_down_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("SendToDesktopNext",
+ setup_sendnext_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("SendToDesktopPrevious",
+ setup_sendprev_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("SendToDesktopLeft",
+ setup_sendleft_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("SendToDesktopRight",
+ setup_sendright_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("SendToDesktopUp",
+ setup_sendup_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("SendToDesktopDown",
+ setup_senddown_func,
+ free_func,
+ run_func,
+ NULL, NULL);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_next_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->linear = TRUE;
+ o->dir = OB_DIRECTION_EAST;
+ return o;
+}
+
+static gpointer setup_prev_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->linear = TRUE;
+ o->dir = OB_DIRECTION_WEST;
+ return o;
+}
+
+static gpointer setup_right_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->linear = FALSE;
+ o->dir = OB_DIRECTION_EAST;
+ return o;
+}
+
+static gpointer setup_left_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->linear = FALSE;
+ o->dir = OB_DIRECTION_WEST;
+ return o;
+}
+
+static gpointer setup_up_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->linear = FALSE;
+ o->dir = OB_DIRECTION_NORTH;
+ return o;
+}
+
+static gpointer setup_down_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->linear = FALSE;
+ o->dir = OB_DIRECTION_SOUTH;
+ return o;
+}
+
+static gpointer setup_sendnext_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_next_func(i, doc, node);
+ o->send = TRUE;
+ return o;
+}
+
+static gpointer setup_sendprev_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_prev_func(i, doc, node);
+ o->send = TRUE;
+ return o;
+}
+
+static gpointer setup_sendright_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_right_func(i, doc, node);
+ o->send = TRUE;
+ return o;
+}
+
+static gpointer setup_sendleft_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_left_func(i, doc, node);
+ o->send = TRUE;
+ return o;
+}
+
+static gpointer setup_sendup_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_up_func(i, doc, node);
+ o->send = TRUE;
+ return o;
+}
+
+static gpointer setup_senddown_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_down_func(i, doc, node);
+ o->send = TRUE;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
o->dialog,
TRUE, FALSE);
- if (ft)
- actions_run_acts(o->actions, data->uact, data->state,
- data->x, data->y, data->button, data->context, ft);
+ if (ft) {
+ if (o->actions)
+ actions_run_acts(o->actions, data->uact, data->state,
+ data->x, data->y, data->button, data->context,
+ ft);
+ else
+ client_activate(ft, FALSE, TRUE, TRUE, TRUE);
+ }
return FALSE;
}
void action_dockautohide_startup()
{
- actions_register("DockAutoHide",
+ actions_register("ToggleDockAutoHide",
NULL, NULL,
run_func,
NULL, NULL);
o = g_new0(Options, 1);
- if ((n = parse_find_node("command", node))) {
+ if ((n = parse_find_node("command", node)) ||
+ (n = parse_find_node("execute", node)))
+ {
gchar *s = parse_string(doc, n);
o->cmd = parse_expand_tilde(s);
g_free(s);
typedef struct {
gboolean here;
+ gboolean activate;
} Options;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_activate_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
free_func,
run_func,
NULL, NULL);
+ actions_register("Activate",
+ setup_activate_func,
+ free_func,
+ run_func,
+ NULL, NULL);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_activate_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->activate = TRUE;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
(data->context != OB_FRAME_CONTEXT_CLIENT &&
data->context != OB_FRAME_CONTEXT_FRAME))
{
- client_activate(data->client, o->here, FALSE, FALSE, TRUE);
+ client_activate(data->client, o->here,
+ o->activate, o->activate, TRUE);
}
} else if (data->context == OB_FRAME_CONTEXT_DESKTOP) {
/* focus action on the root window. make keybindings work for this
NULL, NULL,
run_func,
NULL, NULL);
+ actions_register("ToggleFullscreen",
+ NULL, NULL,
+ run_func,
+ NULL, NULL);
}
/* Always return FALSE because its not interactive */
} Options;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_north_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_south_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_east_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_west_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
free_func,
run_func,
NULL, NULL);
+ actions_register("GrowToEdgeNorth",
+ setup_north_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("GrowToEdgeSouth",
+ setup_south_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("GrowToEdgeEast",
+ setup_east_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("GrowToEdgeWest",
+ setup_west_func,
+ free_func,
+ run_func,
+ NULL, NULL);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_north_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->dir = OB_DIRECTION_NORTH;
+ return o;
+}
+
+static gpointer setup_south_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->dir = OB_DIRECTION_SOUTH;
+ return o;
+}
+
+static gpointer setup_east_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->dir = OB_DIRECTION_EAST;
+ return o;
+}
+
+static gpointer setup_west_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->dir = OB_DIRECTION_WEST;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
} Options;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_toggletop_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_togglebottom_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendtop_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendbottom_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendnormal_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
free_func,
run_func,
NULL, NULL);
+ actions_register("ToggleAlwaysOnTop",
+ setup_toggletop_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("ToggleAlwaysOnBottom",
+ setup_togglebottom_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("SendToTopLayer",
+ setup_sendtop_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("SendToBottomLayer",
+ setup_sendbottom_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("SendToNormalLayer",
+ setup_sendnormal_func,
+ free_func,
+ run_func,
+ NULL, NULL);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_toggletop_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->toggle = TRUE;
+ o->layer = 1;
+ return o;
+}
+
+static gpointer setup_togglebottom_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->toggle = TRUE;
+ o->layer = -1;
+ return o;
+}
+
+static gpointer setup_sendtop_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->on = TRUE;
+ o->layer = 1;
+ return o;
+}
+
+static gpointer setup_sendbottom_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->on = TRUE;
+ o->layer = -1;
+ return o;
+}
+
+static gpointer setup_sendnormal_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->on = TRUE;
+ o->layer = 0;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
} Options;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_toggle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
free_func,
run_func,
NULL, NULL);
+ actions_register("MaximizeFull",
+ setup_on_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("UnmaximizeFull",
+ setup_off_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("ToggleMaximizeFull",
+ setup_toggle_func,
+ free_func,
+ run_func,
+ NULL, NULL);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->on = TRUE;
+ return o;
+}
+
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->on = FALSE;
+ return o;
+}
+
+static gpointer setup_toggle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->toggle = TRUE;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
} Options;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_toggle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
free_func,
run_func,
NULL, NULL);
+ actions_register("MaximizeHorz",
+ setup_on_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("UnmaximizeHorz",
+ setup_off_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("ToggleMaximizeHorz",
+ setup_toggle_func,
+ free_func,
+ run_func,
+ NULL, NULL);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->on = TRUE;
+ return o;
+}
+
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->on = FALSE;
+ return o;
+}
+
+static gpointer setup_toggle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->toggle = TRUE;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
} Options;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_toggle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
free_func,
run_func,
NULL, NULL);
+ actions_register("MaximizeVert",
+ setup_on_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("UnmaximizeVert",
+ setup_off_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("ToggleMaximizeVert",
+ setup_toggle_func,
+ free_func,
+ run_func,
+ NULL, NULL);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->on = TRUE;
+ return o;
+}
+
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->on = FALSE;
+ return o;
+}
+
+static gpointer setup_toggle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->toggle = TRUE;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
-#include "openbox/actions.h"
-#include "openbox/menu.h"
-#include <glib.h>
-
-typedef struct {
- gchar *name;
-} Options;
-
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
-static void free_func(gpointer options);
-static gboolean run_func(ObActionsData *data, gpointer options);
-
-void action_menu_startup()
-{
- actions_register("Menu",
- setup_func,
- free_func,
- run_func,
- NULL, NULL);
-}
-
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
-{
- xmlNodePtr n;
- Options *o;
-
- o = g_new0(Options, 1);
-
- if ((n = parse_find_node("menu", node)))
- o->name = parse_string(doc, n);
- return o;
-}
-
-static void free_func(gpointer options)
-{
- Options *o = options;
-
- if (o) {
- g_free(o->name);
- g_free(o);
- }
-}
-
-/* Always return FALSE because its not interactive */
-static gboolean run_func(ObActionsData *data, gpointer options)
-{
- Options *o = options;
-
- /* you cannot call ShowMenu from inside a menu */
- if (data->uact == OB_USER_ACTION_MENU_SELECTION) return FALSE;
-
- if (o->name) {
- menu_show(o->name, data->x, data->y, data->button != 0, data->client);
- }
-
- return FALSE;
-}
} Options;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_toggle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
void action_omnipresent_startup()
{
- actions_register("omnipresent",
+ actions_register("Omnipresent",
setup_func,
free_func,
run_func,
NULL, NULL);
+ actions_register("ToggleOmnipresent",
+ setup_toggle_func,
+ free_func,
+ run_func,
+ NULL, NULL);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_toggle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->toggle = TRUE;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
o->left = parse_int(doc, n);
if ((n = parse_find_node("right", node)))
o->right = parse_int(doc, n);
- if ((n = parse_find_node("top", node)))
+ if ((n = parse_find_node("top", node)) ||
+ (n = parse_find_node("up", node)))
o->top = parse_int(doc, n);
- if ((n = parse_find_node("bottom", node)))
+ if ((n = parse_find_node("bottom", node)) ||
+ (n = parse_find_node("down", node)))
o->bottom = parse_int(doc, n);
return o;
gboolean on;
} Options;
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_toggle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
void action_shade_startup()
{
actions_register("Shade",
- setup_func,
+ setup_on_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("Unshade",
+ setup_off_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("ToggleShade",
+ setup_toggle_func,
free_func,
run_func,
NULL, NULL);
}
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
{
- xmlNodePtr n;
- Options *o;
-
- o = g_new0(Options, 1);
- o->toggle = TRUE;
+ Options *o = g_new0(Options, 1);
+ o->on = TRUE;
+ return o;
+}
- if ((n = parse_find_node("state", node))) {
- gchar *s = parse_string(doc, n);
- if (g_ascii_strcasecmp(s, "toggle")) {
- o->toggle = FALSE;
- o->on = parse_bool(doc, n);
- }
- g_free(s);
- }
+static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->on = FALSE;
+ return o;
+}
+static gpointer setup_toggle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->toggle = TRUE;
return o;
}
void action_showdesktop_startup()
{
- actions_register("ShowDesktop",
+ actions_register("ToggleShowDesktop",
NULL, NULL,
run_func,
NULL, NULL);
Options *o;
o = g_new0(Options, 1);
- o->tobottom = TRUE;
+ o->tobottom = FALSE;
if ((n = parse_find_node("tobottom", node)))
o->tobottom = parse_bool(doc, n);
const gchar *actname;
} ObDefKeyBind;
+static void bind_default_keyboard()
+{
+ ObDefKeyBind *it;
+ ObDefKeyBind binds[] = {
+ { "A-Tab", "NextWindow" },
+ { "S-A-Tab", "PreviousWindow" },
+ { "A-F4", "Close" },
+ { NULL, NULL }
+ };
+
+ for (it = binds; it->key; ++it) {
+ GList *l = g_list_append(NULL, g_strdup(it->key));
+ keyboard_bind(l, actions_parse_string(it->actname));
+ }
+}
+
typedef struct
{
const gchar *button;
{ "Left", "AllDesktops", OB_MOUSE_ACTION_CLICK, "Raise" },
{ "Left", "Shade", OB_MOUSE_ACTION_CLICK, "Raise" },
{ "Left", "Close", OB_MOUSE_ACTION_CLICK, "Close" },
- { "Left", "Maximize", OB_MOUSE_ACTION_CLICK, "Maximize" },
+ { "Left", "Maximize", OB_MOUSE_ACTION_CLICK, "ToggleMaximizeFull" },
{ "Left", "Iconify", OB_MOUSE_ACTION_CLICK, "Iconify" },
- { "Left", "AllDesktops", OB_MOUSE_ACTION_CLICK, "Omnipresent" },
- { "Left", "Shade", OB_MOUSE_ACTION_CLICK, "Shade" },
+ { "Left", "AllDesktops", OB_MOUSE_ACTION_CLICK, "ToggleOmnipresent" },
+ { "Left", "Shade", OB_MOUSE_ACTION_CLICK, "ToggleShade" },
{ "Left", "TLCorner", OB_MOUSE_ACTION_MOTION, "Resize" },
{ "Left", "TRCorner", OB_MOUSE_ACTION_MOTION, "Resize" },
{ "Left", "BLCorner", OB_MOUSE_ACTION_MOTION, "Resize" },
translate_key("C-g", &config_keyboard_reset_state,
&config_keyboard_reset_keycode);
+ bind_default_keyboard();
+
parse_register(i, "keyboard", parse_keyboard, NULL);
config_mouse_threshold = 8;
return OB_FRAME_CONTEXT_TOP;
else if (!g_ascii_strcasecmp("Bottom", name))
return OB_FRAME_CONTEXT_BOTTOM;
+ else if (!g_ascii_strcasecmp("Handle", name))
+ return OB_FRAME_CONTEXT_BOTTOM;
else if (!g_ascii_strcasecmp("Left", name))
return OB_FRAME_CONTEXT_LEFT;
else if (!g_ascii_strcasecmp("Right", name))