Menus: An Alternative Approach to EPIC
By its very nature, ircII-EPIC is a command-driven irc client. It primarily relies on typed commands for end-user interaction. However, for the novice, EPIC presents an alternative; an interactive menuing system. Menus are like scripts, in that you have to write one (or otherwise obtain one), as they aren't hard-coded into the client. Like a script, a menu must be loaded before it can be used; the command is /mload: /mload some_menu The menu is now loaded into memory, ready for use. To make it availble for use, the MENU builtin variable must be set to the menu's name. The names of all menus can be displayed with /mlist if you aren't sure of the internal name of the menu you loaded. Once you have the menu's name /set menu menu_name The menu will now be displayed on the upper portion of the display window. It will use only as many lines as it needs to display the complete menu, plus one to divide the menu window from the one below it. Now, to actually enter the menu to select options, the ENTER_MENU key function must be used. By default, it is bound to ^R (use /rbind if you aren't sure). Once you enter the bound key and enter the menu, you may navigate with the arrow keys (or, at your option, vi- or Emacs-like keys). Options are selected by selecting them and hitting the Enter key (or the spacebar or a '.'). To leave the menu, type a 'Q', or unset MENU. The actual format of a menu file is really quite simple: * a line beginning with a '#' is a comment * blank lines are ignored * a line beginning with 'MENU' defines a new menu with the given name * a line beginning with 'OPTION' adds an option to the menu + the subdirective 'COMMAND' specifies a client command to run + the subdirective 'EXIT' causes the user to exit the menu * whitespace preceding a MENU or OPTION directive is ignored * directive names are not sensitive to case Multiple menus may be specified in a single file, if desired. The following is an example of how a menu might be set up: # example main menu menu main option "Join Channel" command join $"Channel Name: " option "Leave Channel" command part $"Channel Name: " option "Server Query" command set menu server_query option "Leave Menu" exit option "Quit IRC" command signoff $"Quit Message: " # example submenu menu server_query option "Do Whois" command whois $"Nickname: " option "Do Names" command names $"Channel Name: " option "Read MOTD" command motd option "Go Back" command set menu main # end example See Also: bind(4) enter_menu; mlist(4); mload(4); set(4) menu