extern const char *inputbox_bg[2];
static CommandInfo cmd_list[] = {
- /* command function arg mode */
- {"open", command_open, {VP_TARGET_CURRENT, ""}, VP_MODE_NORMAL},
- {"input", command_input, {0, ":"}, VP_MODE_COMMAND},
- {"inputopen", command_input, {0, ":open "}, VP_MODE_COMMAND},
- {"inputopencurrent", command_input, {VP_INPUT_CURRENT_URI, ":open "}, VP_MODE_NORMAL},
- {"quit", command_close, {0}, VP_MODE_NORMAL},
- {"source", command_view_source, {0}, VP_MODE_NORMAL},
- {"back", command_navigate, {VP_NAVIG_BACK}, VP_MODE_NORMAL},
- {"forward", command_navigate, {VP_NAVIG_FORWARD}, VP_MODE_NORMAL},
- {"reload", command_navigate, {VP_NAVIG_RELOAD}, VP_MODE_NORMAL},
- {"reload!", command_navigate, {VP_NAVIG_RELOAD_FORCE}, VP_MODE_NORMAL},
- {"stop", command_navigate, {VP_NAVIG_STOP_LOADING}, VP_MODE_NORMAL},
- {"jumpleft", command_scroll, {VP_SCROLL_TYPE_JUMP | VP_SCROLL_DIRECTION_LEFT}, VP_MODE_NORMAL},
- {"jumpright", command_scroll, {VP_SCROLL_TYPE_JUMP | VP_SCROLL_DIRECTION_RIGHT}, VP_MODE_NORMAL},
- {"jumptop", command_scroll, {VP_SCROLL_TYPE_JUMP | VP_SCROLL_DIRECTION_TOP}, VP_MODE_NORMAL},
- {"jumpbottom", command_scroll, {VP_SCROLL_TYPE_JUMP | VP_SCROLL_DIRECTION_DOWN}, VP_MODE_NORMAL},
- {"pageup", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_TOP | VP_SCROLL_UNIT_PAGE}, VP_MODE_NORMAL},
- {"pagedown", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_DOWN | VP_SCROLL_UNIT_PAGE}, VP_MODE_NORMAL},
- {"halfpageup", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_TOP | VP_SCROLL_UNIT_HALFPAGE}, VP_MODE_NORMAL},
- {"halfpagedown", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_DOWN | VP_SCROLL_UNIT_HALFPAGE}, VP_MODE_NORMAL},
- {"scrollleft", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_LEFT | VP_SCROLL_UNIT_LINE}, VP_MODE_NORMAL},
- {"scrollright", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_RIGHT | VP_SCROLL_UNIT_LINE}, VP_MODE_NORMAL},
- {"scrollup", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_TOP | VP_SCROLL_UNIT_LINE}, VP_MODE_NORMAL},
- {"scrolldown", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_DOWN | VP_SCROLL_UNIT_LINE}, VP_MODE_NORMAL},
- {"nmap", command_map, {VP_MODE_NORMAL}, VP_MODE_NORMAL},
- {"imap", command_map, {VP_MODE_INSERT}, VP_MODE_NORMAL},
- {"cmap", command_map, {VP_MODE_COMMAND}, VP_MODE_NORMAL},
- {"hmap", command_map, {VP_MODE_HINTING}, VP_MODE_NORMAL},
- {"nunmap", command_unmap, {VP_MODE_NORMAL}, VP_MODE_NORMAL},
- {"iunmap", command_unmap, {VP_MODE_INSERT}, VP_MODE_NORMAL},
- {"cunmap", command_unmap, {VP_MODE_COMMAND}, VP_MODE_NORMAL},
- {"hunmap", command_unmap, {VP_MODE_HINTING}, VP_MODE_NORMAL},
- {"set", command_set, {0}, VP_MODE_NORMAL},
- {"complete", command_complete, {0}, VP_MODE_COMMAND | VP_MODE_COMPLETE},
- {"complete-back", command_complete, {1}, VP_MODE_COMMAND | VP_MODE_COMPLETE},
- {"inspect", command_inspect, {0}, VP_MODE_NORMAL},
- {"hint-link", command_hints, {HINTS_MODE_LINK, "."}, VP_MODE_HINTING},
- {"hint-link-new", command_hints, {HINTS_MODE_LINK_NEW, ","}, VP_MODE_HINTING},
- {"hint-focus-next", command_hints_focus, {0}, VP_MODE_HINTING},
- {"hint-focus-prev", command_hints_focus, {1}, VP_MODE_HINTING},
+ /* command function arg mode */
+ {"open", command_open, {VP_TARGET_CURRENT, ""}, VP_MODE_NORMAL},
+ {"tabopen", command_open, {VP_TARGET_NEW, ""}, VP_MODE_NORMAL},
+ {"input", command_input, {0, ":"}, VP_MODE_COMMAND},
+ {"inputopen", command_input, {0, ":open "}, VP_MODE_COMMAND},
+ {"inputtabopen", command_input, {0, ":tabopen "}, VP_MODE_COMMAND},
+ {"inputopencurrent", command_input, {VP_INPUT_CURRENT_URI, ":open "}, VP_MODE_COMMAND},
+ {"inputtabopencurrent", command_input, {VP_INPUT_CURRENT_URI, ":tabopen "}, VP_MODE_COMMAND},
+ {"quit", command_close, {0}, VP_MODE_NORMAL},
+ {"source", command_view_source, {0}, VP_MODE_NORMAL},
+ {"back", command_navigate, {VP_NAVIG_BACK}, VP_MODE_NORMAL},
+ {"forward", command_navigate, {VP_NAVIG_FORWARD}, VP_MODE_NORMAL},
+ {"reload", command_navigate, {VP_NAVIG_RELOAD}, VP_MODE_NORMAL},
+ {"reload!", command_navigate, {VP_NAVIG_RELOAD_FORCE}, VP_MODE_NORMAL},
+ {"stop", command_navigate, {VP_NAVIG_STOP_LOADING}, VP_MODE_NORMAL},
+ {"jumpleft", command_scroll, {VP_SCROLL_TYPE_JUMP | VP_SCROLL_DIRECTION_LEFT}, VP_MODE_NORMAL},
+ {"jumpright", command_scroll, {VP_SCROLL_TYPE_JUMP | VP_SCROLL_DIRECTION_RIGHT}, VP_MODE_NORMAL},
+ {"jumptop", command_scroll, {VP_SCROLL_TYPE_JUMP | VP_SCROLL_DIRECTION_TOP}, VP_MODE_NORMAL},
+ {"jumpbottom", command_scroll, {VP_SCROLL_TYPE_JUMP | VP_SCROLL_DIRECTION_DOWN}, VP_MODE_NORMAL},
+ {"pageup", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_TOP | VP_SCROLL_UNIT_PAGE}, VP_MODE_NORMAL},
+ {"pagedown", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_DOWN | VP_SCROLL_UNIT_PAGE}, VP_MODE_NORMAL},
+ {"halfpageup", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_TOP | VP_SCROLL_UNIT_HALFPAGE}, VP_MODE_NORMAL},
+ {"halfpagedown", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_DOWN | VP_SCROLL_UNIT_HALFPAGE}, VP_MODE_NORMAL},
+ {"scrollleft", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_LEFT | VP_SCROLL_UNIT_LINE}, VP_MODE_NORMAL},
+ {"scrollright", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_RIGHT | VP_SCROLL_UNIT_LINE}, VP_MODE_NORMAL},
+ {"scrollup", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_TOP | VP_SCROLL_UNIT_LINE}, VP_MODE_NORMAL},
+ {"scrolldown", command_scroll, {VP_SCROLL_TYPE_SCROLL | VP_SCROLL_DIRECTION_DOWN | VP_SCROLL_UNIT_LINE}, VP_MODE_NORMAL},
+ {"nmap", command_map, {VP_MODE_NORMAL}, VP_MODE_NORMAL},
+ {"imap", command_map, {VP_MODE_INSERT}, VP_MODE_NORMAL},
+ {"cmap", command_map, {VP_MODE_COMMAND}, VP_MODE_NORMAL},
+ {"hmap", command_map, {VP_MODE_HINTING}, VP_MODE_NORMAL},
+ {"nunmap", command_unmap, {VP_MODE_NORMAL}, VP_MODE_NORMAL},
+ {"iunmap", command_unmap, {VP_MODE_INSERT}, VP_MODE_NORMAL},
+ {"cunmap", command_unmap, {VP_MODE_COMMAND}, VP_MODE_NORMAL},
+ {"hunmap", command_unmap, {VP_MODE_HINTING}, VP_MODE_NORMAL},
+ {"set", command_set, {0}, VP_MODE_NORMAL},
+ {"complete", command_complete, {0}, VP_MODE_COMMAND | VP_MODE_COMPLETE},
+ {"complete-back", command_complete, {1}, VP_MODE_COMMAND | VP_MODE_COMPLETE},
+ {"inspect", command_inspect, {0}, VP_MODE_NORMAL},
+ {"hint-link", command_hints, {HINTS_MODE_LINK, "."}, VP_MODE_HINTING},
+ {"hint-link-new", command_hints, {HINTS_MODE_LINK_NEW, ","}, VP_MODE_HINTING},
+ {"hint-focus-next", command_hints_focus, {0}, VP_MODE_HINTING},
+ {"hint-focus-prev", command_hints_focus, {1}, VP_MODE_HINTING},
};
static void command_write_input(const gchar* str);