From e6e0a230e6509e4e9d448bbbb977be8478769aa3 Mon Sep 17 00:00:00 2001
From: Michael Jennings
-The menubar system in Eterm is probably the most complex, convoluted, -complicated, and poorly-implemented feature of Eterm. The code, though -modified somewhat, is still almost entirely derived from rxvt. It will be -rewritten from scratch as part of -Project Resurrection, but -for now, here are the basics. You'll probably want to look at the menubar -files that come with Eterm; they're pretty good samples.
- --First, let's discuss the paradigm used by the menubar system. Like so many -things these days, the menubar uses a filesystem analogy, with the menubar -itself comprising the top level (root) and each menu and submenu is a -"directory" or "subdirectory" thereof. You manipulate the contents of the -menubar by adding and removing menus, menu items, and submenus via their -respective "paths." You even have a "working directory" and can add/remove -several items at a time by changing to the directory you want.
- --The following table shows the commands which are recognized by the menubar -system. These commands can be supplied as string in the menubar escape -sequence, or they can be lines in a menubar file.
- -Command | -Action | -
= title | -Set the menubar title to title. Note that the menubar title is - entirely separate from Eterm's titlebar text. Any occurance of - %v in title is replaced by the Eterm version. - %n is replaced by the resource name (as specified by the - -n option. %% inserts a literal '%'. - | -
[ + ] path | -Change directories to path. If path doesn't exist, it is - created. / represents the menubar itself. - /some_menu/ represents a primary menu in the - menubar. /some_menu/submenu/ - represents a submenu underneath that menu. And so on.... You can also - use "." and ".." just like you would on a UNIX filesystem. - | -
-path | -Removes the menu at path. All submenus and menu items are - automatically removed. - | -
[ + ] [ path ] { menuitem } [ - { rtext } ] [ { action } ] - | -Add a menu item at path. The label (menuitem) is required
- but can be hidden by using a dot ('.') as the first
- character of menuitem, or by using the same text for rtext.
- The optional string rtext will be right-justified; this is
- generally used to note the key sequence bound to a particular menu item.
- If action is not specified, the contents of rtext are
- used.
- - action is the string which is bound to the menuitem. It is parsed - for escape sequences, control characters, etc. See the table below for a - list of valid encodings. If action begins with a NUL character - (^@), the string is sent to Eterm instead of to the - application. (To send a string beginning with a NUL to the application, - simply prefix the string with two NUL's. The first one will be stripped - and the remainder send to the application.) So any escape sequences you - want Eterm to parse should begin with ^@. -- As mentioned in the table below, M- can be used as a - substitute for ESC in an action string, with one difference: - a carriage return (\r) is appending automatically to - any string that begins with M- and does not already have - the trailing CR. -- To add a separator bar, specify - as menuitem. - |
-
- [ path ] { menuitem } | -Removes menuitem. | -
[apptitle: title ] | -Sets Eterm's titlebar title to title. Not to be confused with the - [title:] command, which sets the menubar title. - | -
[clear] | -Clears the menubar of all menus. Equivalent to rm -rf / - on a UNIX filesystem. - | -
[done [ : tag ] ] | -Sets the current menubar to read-only. No modification attempts will be - accepted (unless they are enclosed in [::]; see below). - | -
[dump] | -Dumps the current menubars out to a file. The path of this file is placed - in the Eterm titlebar. The menubars are dumped so that the resulting file - is a valid Eterm menubar file which can be parsed by Eterm in the future - to restore the current menubar settings. - | -
[echo: text ] | -Sends text to the application running in the Eterm window. | -
[hide] | -Hides (toggles off) the menubar and sets it to read-only. | -
[menu [ : name ] ] | -Begin addition/modification of the name menubar. If name is - not given, "default" is used. This command sets the - menubar to read-write. | -
[pixmap: string ] | -A convenience command. string should follow the syntax shown in - the Pixmap Escape Sequences section below. - | -
[read: file ] | -Reads the menubar file file and parses the commands it contains. A - menubar file consists of commands shown in this table. Lines beginning - with '#' and blank lines are ignored. - | -
[rm [ : ] [ spec ] ] | -Removes part or all of the contents of a menubar. spec can be a - path, a menu item, or '*', or empty. The latter two - remove all menus in the menubar. - | -
[show] | -Shows (toggles on) the menubar and sets it to read-only. | -
[title: title ] | -Sets the menubar title to title | -
[:command:] | -Specifies that the current menu's read-only status should be ignored in - order to parse command. command should be one of the above - commands. - | -
-The string supplied to the pixmap escape sequence (above) consists of a +The string supplied to the image escape sequence (above) consists of a filename (which can be empty) followed by a semicolon, then one or more geometry strings. The following table shows the valid geometry strings and -their affects on the background pixmap:
+their affects on the background image:Set scaling to W% by H%, and position to X% by Y%. W and H are percentages of the original image size. The position is a percentage, where +50+50 centers the - pixmap in the window. | + image in the window.|||
WxH+X | @@ -752,7 +586,7 @@ their affects on the background pixmap:|||
WxH | -Assumes Y == X == 50 (centers the pixmap) | +Assumes Y == X == 50 (centers the image) | |
W+X+Y | @@ -1240,8 +1074,9 @@ are: 1, on, yes, or (of course)ESC [ 9 n | Titlebar Status. This places Eterm's current status in the titlebar. The status information includes the application name and version number, as - well as the shading/tinting state if transparent, the pixmap path if their - is a background pixmap, or "No Pixmap" if neither of these is true. + well as the shading/tinting state if transparent, the path to the + background image if there is one, or "No Pixmap" if neither of these is + true. | |
ESC ] 6 ; 0 [ ; boolean ] BEL | -Set/toggle transparency state. | +Set/toggle transparency state. This affects all images for which + transparency is an allowed mode. | |
ESC ] 6 ; 1 ; pct BEL | -Set shading percentage to pct. | -||
ESC ] 6 ; 2 ; mask BEL | -Set tint mask to mask. As a favor to keebler, I left support for
- the old text aliases in the escape sequence parser. Thus, the following
- are supported as alternative values for mask:
-
|
+ ESC ] 6 ; 1 ; [ class ; ] color ; attribute ; value BEL | +Adjusts a color modifier. class determines which image class will + have its color modifier altered, bg (background, the default), + sb (scrollbar trough), sa (scrollbar anchor), up + (up arrow), or down (down arrow). Next comes the color + which determines how pixels are modified. This is either + image, red, green, or blue. + attribute is one of brightness, contrast, or + gamma, and value is the actual integer value (>= 0). |
ESC ] 6 ; 3 ; BEL | Force an update the of transparency background. | ||
ESC ] 6 ; 4 [ ; boolean ] BEL | -Set/toggle desktop watching. | -||
ESC ] 6 ; 10 ; [ type ] [ ; width ] BEL | Set scrollbar style to type and scrollbar width to width. @@ -1309,10 +1132,6 @@ are: 1, on, yes, or (of course) focus and disappears when it does not). | ||
ESC ] 6 ; 15 [ ; boolean ] BEL | -Set/toggle menubar move. | -||
ESC ] 6 ; 20 [ ; boolean ] BEL | Set/toggle visual bell. | @@ -1331,12 +1150,17 @@ are: 1, on, yes, or (of course)||
ESC ] 6 ; 24 [ ; boolean ] BEL | -Set/toggle viewport mode. | +Set/toggle viewport mode for all images that have allowed viewport + mode. | |
ESC ] 6 ; 25 [ ; boolean ] BEL | Set/toggle selection trailing spaces. | ||
ESC ] 6 ; 26 [ ; boolean ] BEL | +Set/toggle reporting as keysyms See the man page for details. | +||
ESC ] 6 ; 50 ; desktop BEL | Move Eterm to desktop desktop and make it the current desktop. @@ -1346,7 +1170,7 @@ are: 1, on, yes, or (of course) | ||
ESC ] 6 ; 70 BEL | -Exit Eterm (most useful from a menubar). | +Exit Eterm (most useful from a menu). | |
ESC ] 6 ; 71 [ ; path ] BEL | @@ -1356,14 +1180,47 @@ are: 1, on, yes, or (of course) YYYYMMDD.HHMMSS is the current system time).|||
ESC ] 6 ; 80 ; level BEL | +Set the debugging level to level. | +||
ESC ] 7 ; { echo | tty_write } : params BEL | +Eterm IPC: Sends the string params to the client application. | +||
ESC ] 7 ; parse : params BEL | +Eterm IPC: Causes Eterm to parse params itself. | +||
ESC ] 7 ; enl_send : params BEL | +Eterm IPC: Sends an IPC command to Enlightenment. Does not wait for a + reply. | +||
ESC ] 7 ; enl_query : params BEL | +Eterm IPC: Sends an IPC command to Enlightenment and waits for a reply. | +||
ESC ] 7 ; winop : op [ windowid ] BEL | +Eterm IPC: Performs a window operation on the window given by + windowid. Valid window operations are raise, + lower, map, unmap, kill, and + iconify. The operation should be separated from the + window ID by a space. The default window is the Eterm window itself. | +||
ESC ] 7 ; exit BEL | +Eterm IPC: Exits Eterm. | +
The standard for implementing transparency was a mutual effort between myself,
-Carsten Haitzler
diff --git a/src/options.c b/src/options.c index 0af42fa..35c86b1 100644 --- a/src/options.c +++ b/src/options.c @@ -3092,7 +3092,7 @@ init_defaults(void) } #endif - Options = (Opt_scrollBar); + Options = (Opt_scrollBar | Opt_select_trailing_spaces); Xdisplay = NULL; display_name = NULL; rs_term_name = NULL;