Wez's Evil Shell
Configuring the context menu
When EvilDesk starts, it looks for a file named %APPDATA%\Evil, as in
Dr.\Shell\evildesk.evdm; if it is not found, it will then try
%SystemDrive%\EvilDesk\default.evdm. The contents of this file
determine what appears on the context menu.
The file is assumed to be UTF-8 encoded, so that symbols from any language may
be used on the context menu (EvilDesk is 100% unicode aware). The #
symbol introduces a comment; the # and any text to the right of it
will be ignored.
The evdm file parser is line based, so you may not wrap the lines.
The input file is tokenized; there are three types of tokens:
- A string of alphanumeric characters, with no spaces
- E.g.: CONTEXTMENU. This string is tokenized as-is, so the parser will literally see CONTEXTMENU
- A C-style quoted string
- E.g.: "Hello there". This string will have backslash escapes expanded and will be stored without the enclosing quotation marks. Inside the quotes, a backslash introduces an escape character; the regular C-style escapes are supported. A backslash that is followed by any other character will expand to the character that follows the backslash.
- A $ sign, followed by alphanumeric characters
- E.g.: $CSIDL_PERSONAL. This is a symbolic constant, and will be replaced with the value of the constant. For $CSIDL_PERSONAL, the path to the current users "My Documents" folder will be substituted.
The tokens in the file must be space separated. The first token on a line specifies a configuration command; the following commands are recognized:
- CONTEXTMENU "name"
Defines a new context menu (or sub menu). The supplied name will be used to
invoke the context menu. The only names that have special meaning to EvilDesk
are root and workspace; context menus with those names should
be defined, otherwise there will be no working context menus when the shell is
run. The root menu is launched when you right click on the desktop. The workspace menu is launched when you press Win-W (by default).
- MergeDirs "caption" "dir1" "dir2"
Adds a menu item to the current CONTEXTMENU. The item will have the caption
you specified and, when selected, will create a sub-menu that will reflect the
context of dir1 and dir2 merged together. This is option you would use to
implement the "Programs" part of the start menu, or the "My Documents" part,
which merge the all-users version of those folders with your own personal
- SubMenu "caption" "name"
Adds a menu item that will create a sub-menu when selected. The sub-menu will
be the menu that you specify by name; that menu must exist.
- Execute "caption" "verb" "file" "arguments"
Adds a menu item that will execute a given file using the shell when clicked.
- Func "caption" "funcname" "arguments"
Adds a menu item that will run a built-in function, passing the specified arguments, when clicked.
Adds a menu separator to the current context menu.
- SaferExec NORMAL "/perl compatible regex/i"
Executes applications whose file name matches the regex using a "Safer" token.
This protection only applies to application launched from EvilDesk itself; it
cannot protect applications run using the "Run" dialog or Explorer, as those
are not really launched directly by EvilDesk.
EvilDesk ships with this enabled for some common applications that are likely
to be exposed to the hostile internet (web browsers, email clients, instant
messaging). The safer token should not adversely affect your experience with
the application, and reduces the impact that malware might have on your system
if it manages to compromise the application. Read more about the topic on MSDN.
- SaferExec CONSTRAINED "/perl compatible regex/i"
Executes applications whose file name matches the regex using a constrained "Safer" token.
This is a more restrictive version of the NORMAL safer token; it might affect the functionality of some poorly written applications.
- SaferExec UNTRUSTED "/perl compatible regex/i"
Executes applications whose file name matches the regex using an untrusted "Safer" token.
This is the most restrictive level of safer tokens; likely to cause some applications to fail when run in this mode.
- HOTKEY modifier key Func "funcname" "arguments"
Defines a hotkey that will cause function "funcname" to be run and passed
"arguments". modifier can be a combination of ALT,
WIN, SHIFT and CONTROL; combine the values by
separating them with a vertical bar (|). Key can be one of the
following symbolic names: F1 through to F11 (F12 is reserved
by Windows), or it can be a single letter, such as E to represent the
E key. I'll add more symbolic names for other keys (just let me know which
ones you're using), but in the meantime, you can also use a number prefixed by
a # symbol; this will be interpreted as the number you've specified.
- HOTKEY modifier key Execute "verb" "exe" "arguments"
Defines a hotkey that will execute a command. Works similarly to the HOTKEY
syntax above, crossed with the Execute syntax further above.
- MaximumWorkspaces number
Configures the maximum number of workspaces used by the alt-tab task switcher.
The number can be from 1 to 32. Note that EvilDesk supports 32 workspaces at all
times; this setting is used by the task-switcher only, so that you don't have
to cycle through 32 workspaces if you're only using 4.
- SLIT position gravity
Creates a new Slit window at the specified position with the specified gravity.
Position (and gravity) can be one of LEFT, RIGHT,
TOP or BOTTOM. Gravity may also have the value MIDDLE (since version 0.9).
- LOAD pluginname
Loads the specified plugin. If the plugin needs to attach to a Slit window, it
will attach to the most recently created Slit.
- MATCH CREATE property "/perl compatible regex/i" function funcarg
Defines a window match rule to perform actions for newly created windows that
match certain criteria. Property can be one of CAPTION,
CLASS or MODULE to match against the window title, the window
class or the window module respectively. Regex is a regular expression to
match against; if it matches the specified property, then the function is
The following example will move all newly created windows whose title contains
hello (case insensitive) to workspace 4.
MATCH CREATE CAPTION "/hello/i" "set-window-workspace" "4"