HomeAll CommandsGrouped CommandsModulesFAQ

WindowId


WindowId [id] [(conditions)] | [root [screen]] command

The WindowId command looks for a specific window id and runs the specified command on it. The second form of syntax retrieves the window id of the root window of the given screen. If no screen is given, the current screen is assumed. The window indicated by id may belong to a window not managed by fvwm or even a window on a different screen. Although most commands can not operate on such windows, there are some exceptions, for example the WarpToWindow command. Returns -1 if no window with the given id exists. See Conditions section for a list of conditions.

This command implies the conditions CirculateHit, CirculateHitIcon and CirculateHitShaded. They can be turned off by specifying !CirculateHit etc. explicitly.

Examples:

WindowId 0x34567890 Raise
WindowId root 1 WarpToWindow 50 50
WindowId $0 (Silly_Popup) Delete

In the past this command was mostly useful for functions used with the WindowList command, or for selective processing of FvwmEvent calls (as in the last example), but currently these handler functions are called within a window context, so this command is not really needed in these cases. Still it may be useful if, for example, the window id should be stored in the environment variable for a further proceeding.

Pick SetEnv BOOKMARKED_WINDOW $[w.id]
WindowId $[BOOKMARKED_WINDOW] WarpToWindow

fvwm 2.6.5