   _______       __    __    __ ___ ___ ___ ___ ___ ___
  |   _   \---.-.  |--.__|--|  |   Y   |   Y   |   Y   |
  |.  l   /  _  |  _  |  |  _  |.  |   |.  |   |.      |
  |.  _   1___._|_____|__|_____|.  |   |. / \  |. \_/  |
  |:  |   |                    |:  1   |:      |:  |   |
  |::.|:. |    v1.0 beta 1      \:.. ./|::.|:. |::.|:. |
  `--- ---'                      `---' `--- ---'--- ---'

Comments & Complaints to rabidcow@juno.com

This is a new VWM module, not based on sysvwm or VWM2.  Thanks to those who where involved anywhere in the life of ckVWM, as I learned how to write a VWM by tinkering with that :)

Small pieces of code have been used from jugg's tasks and Maduin's label, thanks guys!

This module is designed to be as flexible as possible in function and appearance, while remaining fairly efficient.

---- The Basics

VWMPos <x> <y>
VWMx <x>
VWMy <y>

  These set the position of the main vwm window, you can specify them in one line with VWMPos or in two with VWMx and VWMy.  Some possible coordinates are:
	VWMPos 0 0	; left edge of screen
	VWMPos -0 0	; right edge of screen (off screen)
	VWMPos %50-20 0	; 20 pixels left of center of screen
	VWMPos %25 0	; 25% across the screen
Percent based values are only allowed when you use the combined command, VWMPos

VWMSize <width> <height>
VWMWidth <width>
VWMHeight <height>

  These set the size of the main vwm window, again you can set them in one line or two.  All forms accepted for position can be used.  If you load the VWM into a box or wharf, you can leave the size out and it will fill the area.

VWMDesks <x> <y>
VWMDesksX <x>
VWMDesksY <y>

  Specifies the number of virtual desktops across and down.  Only positive integers are allowed.

----- Colors and Bevels

Older color settings should also work, but I don't recommend them since they don't make any sense.

VWMWinColor <color> - miniwindow color
VWMWinBorderColor <color> - border color, if no bevel
VWMWinDarkColor <color> - shadow color, if bevel
VWMWinLightColor <color> - light color, if bevel
VWMWinBevel <amount> - bevel amount to autocalculate dark/light colors (default is 64)
VWMWinAlpha <amount> - alpha amount, if fake/real transparency

VWMTitleColor <color> - miniwindow titlebars, if drawn
VWMTitleBorderColor <color>
VWMTitleDarkColor <color>
VWMTitleLightColor <color>
VWMTitleBevel <amount>
  Titles use the same alpha as the window.  Note that titles drawn in magic pink will probably not work the way you expect.  Don't do that.

VWMBackColor <color> - vwm background
VWMBackBorderColor <color>
VWMBackDarkColor <color>
VWMBackLightColor <color>
VWMBackBevel [<amount>] - enable bevel for background and optionally set amount
VWMBackAlpha <amount>

VWMFlashColor <color> - color that miniwindows will flash in
VWMFlashBorderColor <color>
VWMFlashDarkColor <color>
VWMFlashLightColor <color>
VWMFlashBevel <amount>
VWMFlashAlpha <amount>

(VWMFlashTitleColor) - to be added?

VWMSelColor <color> - color of selected desktop
VWMSelBorderColor <color>
VWMSelDarkColor <color>
VWMSelLightColor <color>
VWMSelBevel [<amount>] - enable bevel for select and optionally set amount
VWMSelAlpha <amount>

<color> can be:
	VWMWinColor :2		; system active titlebar color (see table in "reference" section)
	VWMWinColor :2*64	; system active titlebar color, scaled by 64
	VWMWinColor 00a000*-32	; standard ls color, scaled by -32
(the scale values are the same as for ...Bevel)

Alpha amounts range from 0 to 255: 255 = completely opaque/solid, 0 = completely transparent.  With real transparency, anything with an alpha of 0 will let mouse clicks through to whatever's underneath, use an alpha of 1 to prevent that.

VWMBevel

  Turns on bevelling so that there's a raised edge around all of the miniwindows.


----- Bitmaps

All borders can be either a single number to indicate a fixed border on all sides, or four numbers: left, top, right, and bottom border sizes.  Setting the border to 0 will effectively remove the border.

VWMBackBmp <bitmap>
VWMBackBorder <border size>
VWMBackTile

  Instructs the vwm to use a bitmap for the background of the main window, and specifies which bitmap should be used.  VWMBackTile makes the back bitmap tiled rather than stretched.  Use this if you just want to specify one bitmap and tile it for every desktop, for example.

  SNAPSHOT MODE: see VWMWinBmp, the same settings apply.

VWMDeskBorder

  Defines a border area inside the VWM window where desktops are not drawn.  The select bitmap can overlap this area.

VWMSelBmp <bitmap>
VWMSelBorder <border size>
VWMSelTile

  Bitmap for selected desktop.

VWMSelExpand <border size>

  The area that the desktop select bitmap is drawn in is the area for the selected desktop, plus this amount of padding on each side.

VWMWinBmp <bitmap>
VWMWinBorder <border size>
VWMWinTile

  Set the bitmap for the miniwindows.  VWMWinBorder specifies a border around the bitmap that does not get stretched.  This basically works the same as skins for systray except in separate commands.  VWMWinTile will tile anything that would have been stretched.

  SNAPSHOT MODE:  You can set VWMWinBMP to ".snapshot" and mini-windows will be given a shrunken snapshot of how the window looked last time it was on the screen.  This takes a lot of processor time, so you can select a quality setting (eg ".snapshot 3", including quotes) as a number from 0-5, 0 being the default:
	0	1 sample/pixel
	1	5 samples in a +
	2	5 samples in a X
	3	9 samples in an octagon
	4	same as 3, but without center
	5	17 samples in two octagons, for the truely insane
CPU usage will be higher with snapshot (and more samples), but the snapshots aren't updated very often.  One sample snapshot mode takes about the same CPU time as transparent bitmaps.

  VWMWinBmp is also used to switch to bitmapped miniwindow mode.  If no bitmap is specified, or it doesn't load, none of the other miniwindow bitmaps will work: VWMTitlebarBmp, VWMFlashBmp, VWMFlashTitleBmp.  (Miniwindows are then drawn using solid colors.)

VWMTitlebarBmp <bitmap>
VWMTitlebarBorder <border size>
VWMTitlebarTile

  Same as VWMWin... except for the titlebar of the miniwindows, if it gets drawn.  No effect without VWMTitlebars and VWMWinBmp.

VWMFlashBmp <bitmap>
VWMFlashBorder <border size>
VWMFlashTile

  Same as VWMWin... except for flashing miniwindows.  No effect without VWMWinBmp.

VWMFlashTitleBmp <bitmap>
VWMFlashTitleBorder <border size>
VWMFlashTitleTile

  Same as VWMTitlebar... except for flashing miniwindows.

VWMUseTransBlt

  This enables magic pink transparency in bitmaps.  This will take about 3 times the cpu usage of solid bitmaps, about the same as 1 sample snapshot mode.

----- Icons

VWMShowIcons

  Enables drawing icons in the miniwindows.

VWMScaleIconToFit

  Try to shrink the icons in miniwindows to fit inside them rather than letting them run over the edge.  This has no effect if VWMShowIcons has not been specified.

VWMIconSize <size>

  Icons are drawn this large, in pixels, square.  This has no effect unless VWMShowIcons is specified.  Defaults to 16.

VWMMinIconSize <size>

  If an icon should scale to smaller than this, it is not drawn.  This has no effect unless both VWMShowIcons and VWMScaleIconToFit are specified.  Defaults to 4.

VWMIconBorder <border size>

  Specifies the border around the window that the icon should not be draw on.  All values are distances in pixels from the appropriate edge.

VWMForceIconBorderTop

  If a titlebar is drawn on a miniwindow, the top border is usually replaced by the height of the titlebar.  This will prevent this and ensure that the top border space set with VWMIconBorder will be used.  This has no effect if VWMShowIcons and VWMTitlebars are not both enabled.

----- Titlebars

VWMTitlebars

  Enables drawing titlebars on the miniwindows.

VWMTitleForTitle

  Only draw titlebars on miniwindows corresponding to windows that have titlebars.  Splash screens, for example, tend to not have titlebars.  This has no effect if VWMTitlebars is not specified.

VWMTitlebarHeight <height>

  Specifies the height of the titlebars drawn in the miniwindows in pixels.  This has no effect if VWMTitlebars is not specified.  Default is 3 pixels.

VWMTitlebarMod <mod>

  Specifies the height of the titlebars as a fraction of the vwm desk size.  Actual size is (minidesk height)/mod.  This has no effect if VWMTitlebarHeight is specifically given.

----- VWM Behavior

VWMMouseLeft <action>
VWMMouseRight <action>
VWMMouseMiddle <action>

  These select an action for each mouse button when you click on the vwm window.  Valid actions are:
	0	Do nothing
	1	Switch desktops
	2	Drag miniwindow (hold down CTRL to snap on drop)
These all default to 0, so I strongly suggest you set them.  (I mean you don't *have* to, say if you just want a pretty box that shows all your windows.)

VWMAlwaysOnTop

  Makes the vwm window float above mere mortal windows.  This has no effect if the VWM is in the Wharf or a Box.

VWMFocusTop

  Set the input focus to the topmost window on the desktop you're switching to.

VWMFocusLast

  Set the input focus to whichever window last had input focus on the desktop you're switching to.

VWMNoBorder

  Doesn't draw borders around desks or miniwindows.  If VWMBevel is specified miniwindows still get a bevelled border.

VWMNoWindows

  Doesn't draw any miniwindows.

VWMNoGathering

  Doesn't gather all windows on exit.  This may not work if you use VWMHideTaskOnSwitch.

VWMReturnToFirstScreen

  Causes the VWM to switch to the top-left desk on exit.

VWMNoShow
VWMHidden

  If either of these is present, the VWM windows starts hidden.  Use !VWMShow to make it visible.

VWMNoSwitchOnFocus

  Prevents the VWM from switching desktops when a LiteSteps gives a window on a different desk input focus.  Switching to a window with ALT-TAB or any way but through LiteStep will not change desks.

VWMSwitchOnAnyFocus

  Switches to the desk containing the window with input focus no matter how it was set.  This will enable switching desks with ALT-TAB, but also sometimes when you close the last window on a desk or other times.

VWMNoWrap

  Normally going right from the right-most desktop will take you to the left-most, etc.  This setting will disable that.

VWMDeskSpacing <width> <height>

  Maximized windows are usually sized to slightly larger than the visible area so that their borders are place offscreen.  To prevent these borders from being drawn on adjacent desks, an amount of space is reserved between desks that never appears on screen.  This option specifies the size of that space.  Default is 16 12, other VWMs use 10 10, so use that is you're going to switch between them with windows still up.
  This will also affect the space between desks in the VWM, but in scale with the screen resolution.

VWMInitialDesk <desk>

  Specifies desk to start on.  Note that any existing windows may not be in the correct desk if you use this.

VWMHideTaskOnSwitch

  Hides tasks that aren't on the current desktop.  This means they don't show up in tasks-type modules, or in the alt-tab list.  If litestep crashes with this setting, you're in trouble.  (During testing, I had music coming from an invisible and uncontrollable winamp.)

VWMSnapWindowOnDrag

  Windows snap while they are being dragged, hold down ctrl to drag normally.

VWMHoverTime <millisec>

  Specifies the amount of time that the mouse stays in one place before it is considered to be hovering, and the time after the mouse leaves the window that it is considered gone.  Default is 500 milliseconds = 1/2 second.

VWMUseFakeTrans

  This enables "fake" background transparency by drawing the background image in the transparent areas.  Windows behind the VWM will be obscured.

VWMDetectTitleChange

  Tells it to monitor the titles of windows, so miniwindows corresponding to new windows or windows whose titles have changed will flash until they're given attention.  (ie, input focus)

VWMFlashOnTitleChange

  Causes miniwindows to flash when their window's title changes.  This has no effect without VWMDetectTitleChange.  (This was the default in earlier versions.)

VWMNoShellFlash

  Stop miniwindows from flashing when their window's titles do.  (AIM for example.)

VWMConstantUpdate

  This causes the VWM window to be redrawn constantly even if no windows have changed.  This is intended to be used with .snapshot mode if you want the miniwindows to stay up to date better (off screen windows will still not be updated), but it does take a lot more CPU time.  Without .snapshot windows this should have no visible effect.

----- !Bang Commands

Anywhere you see <deskno>, you can use a desk number, a desk x and y coordinate (as <deskx> <desky>), or left, right, up, or down (optionally followed by a number of desks to move in that direction).  All desk numbers start at 1, 0 is the current desk (usually the same as just leaving it out).  <deskno> can also be a windowspec enclosed in (parentheses) to refer to the desk containing that window.
To open Notepad on the desk containing WinAmp:
	!VWMOpen (#c WinAmp*) notepad.exe
To move right 4 desks:
	!VWMDesk right 4 /or/ !VWMDesk left -4
To gather all windows to desk 3 down a (vertical) 1x4 VWM:
	!VWMGather 3 /or/
	!VWMGather 1 3 /or/
	!VWMMoveApp 3 #ac * /or/ (these are a bit less efficient)
	!VWMMoveApp 1 3 #ac *

!VWMLeft/Right/Up/Down - for compatibility with lsdistro
!VWMDesk <deskno>

  Switch to a specific desktop.

!VWMGather
!VWMGather <deskno>

  Gathers all windows to the current or a specific desktop.

!VWMGatherLost
!VWMGatherLost <deskno>

  Gathers all "lost" windows to the current or a specific desktop.  Lost windows are windows that are currently outside of any desktop, normally they are left there until you try to switch to them (at which point that window is brought to the current desk).

!VWMOpen <deskno> <command> <parameters>

  Switches to a specific desktop and opens or executes a command.

!VWMMoveApp <deskno>
!VWMMoveApp <deskno> <windowspec>

  Move the foreground window to the specified window, or in the specified direction.  If windowspec is given, moves the first matching window instead.  See "special windows" for a description of windowspec, two more flags are accepted:
	d	find window on current desk only
	p	find top window in paint order rather than lowest hwnd
	h	find by window handle, in decimal
	a	find all matching windows
	d1.1	only windows on desk 1,1; only numbers are valid
	d4	only windows on desk 4
To gather all notepad windows to the current desk:
	!VWMMoveApp 0 #ac Notepad
To move all notepad windows on desk 3,2 to a desk containing a mozilla window:
	!VWMMoveApp (#c MozillaWindowClass) #ad3.2c Notepad

!VWMReset

  Resets the VWM to the initial state specified in step.rc, also reload all bitmaps.  This is the same as !refresh exept it only applies to the vwm.

!VWMMove <x> <y>

  Sets the screen position of the VWM window.  Same as VWMPos.

!VWMResize <width> <height>

  Sets the size of the VWM window.

!VWMFlash <windowspec>

  Flashes the miniwindow for windows that match the given windowspec.  windowspec is the same as for !VWMMoveApp.

!VWMExec <command>

  Executes a command after replacing variables, see the reference section below.
This allows you to read information out of the module.  To find the class name for a window with a specific title, try:
	!VWMExec !alert "^@wc(#t * - Notepad)^"

!VWMSetDesks <x> <y>

  Change the number of desks available.  This will not be remembered next time you start LiteStep.  Relative values are allowed, start with + or -.  0 means no change.
	!VWMSetDesks 0 +1  : add one row of desks

!VWMShow [toggle|off|no|false|hide]

  Shows or hides the VWM window.  If toggle is specified, the state is toggled, if off, no, false, or hide is specified, the window is hidden, if anything else or nothing is specified, the window is shown.

!VWMHide

  Hides the VWM window.

!VWMToggleOnTop [toggle|on|yes|true]

  This toggles between on top and on bottom.  You can specify true, yes, on, or toggle (or anything else).  true, yes, or on will set it to on top, toggle or nothing will toggle the state, and anything else will set it to on bottom.

!VWMToggle <setting> <state>

  Toggle a setting on the fly, changes are NOT saved to the config file.  state is the same as for !VWMToggleOnTop, setting can be any of:
	Bevel, DetectTitleChange, FocusTop, FocusLast, ForceIconBorderTop, NoBorder,
	NoGathering, NoSwitchOnFocus, NoWindows, NoWrap, ReturnToFirstScreen,
	ScaleIconToFit, ShowIcons, SnapWindowOnDrag, Titlebars, TitleForTitle,
	UseTransBlt, NoShellFlash, FlashOnTitleChange, ConstantUpdate

!VWMToggleHideTask [toggle|on|yes|true]

  Changes the state of VWMHideTaskOnSwitch on the fly.  Any parameters are treated the same as for !VWMToggleOnTop.

!VWMSetAction <action> <command>

  Set an event triggerred action on the fly, changes are NOT saved to the config file.  action can be any of the VWMOnXXX commands, without the leading "VWM".  command is the same as for those, or nothing to clear it.

----- Special Windows

Any of these can have the window spec preceded by flags, starting with #, that will tell the vwm what to match against:
	t	match window title
	c	match window class
If you don't specify any flags, it will check both, but you can specify the flags to save a little processor time and prevent accidentally misidentified windows.

Wildcards are allowed in all window specs.

*VWMIgnoreTitleChange <windowspec>

  List windows that change their window titles often and it doesn't matter.  No effect without VWMDetectTitleChange.  One recommendation:
	*VWMIgnoreTitleChange #c WinAmp*

*VWMFix <windowspec>

  Windows that should be hidden rather than moved to different desktops.  Not needed for Photoshop.  I have to decide what to do on exit for these guys, probably show them and gather their parents to the current desktop.  Note that the window spec identifies the PARENT of the window to be fixed.

*VWMSticky <windowspec>

  Windows that should appear on all desktops and should not be drawn in the vwm.

*VWMStartWindowsOnDesktop <windowspec> <deskno>

  Windows that should start on a specific desktop.  Idea stolen from ckVWM, of course.  All desk numbers start at 1.  My favorite is:
	*VWMStartWindowsOnDesktop #c AIM_IMessage (#c _Oscar_BuddyListWin)
  (this starts all AIM message windows on whatever desk the buddy list is on)

----- Triggerred Actions

These can all use ^@variable^ as listed in the reference section below.

VWMOnInit <command>
VWMOnQuit <command>

  Command is run after the VWM has initialized or before it quits.  If the VWM is in lsbox mode, each of these will be called only once, and the VWM window may not be set up.

VWMOnMouseOver <command>
VWMOnMouseOut <command>

  Runs command when mouse enters/leaves VWM window.  Use VWMOnMouseOut !VWMHide for autohide.  VWMOnMouseOut will be delayed by the hover time.

VWMOnHover <command>
VWMOnUnhover <command>

  Runs commands when the mouse stops moving for a while over the VWM or starts moving again.  VWMOnHover !VWMDesk ^@md^ will switch desks on hover.

VWMOnSwitchFrom <command>
VWMOnSwitchTo <command>

  Runs commands before or after switching desktops.  Combined with a background switcher, you can use something like VWMOnSwitchTo !SwitchBackground bitmap^@dc^.bmp to have a different background for each desk.

VWMOnNewWindow <command>
VWMOnRemoveWindow <command>

  Runs when windows are added/removed.  This may include windows that are not drawn in the VWM.  I recommend against openning a new window in response to these, LiteStep windows should be ok.

VWMOnTitleChange <command>

  Runs a command when a window title changes.  VWMDetectTitleChange must be set for this to work.

VWMOnClickLeft <command>
VWMOnClickRight <command>
VWMOnClickMiddle <command>

  Runs a command when the VWM is clicked.  These actions happens before the VWMMouse... ones.

VWMOnMoveWindow <command>
VWMOnSizeWindow <command>

  Runs a command when a window is moved or resized.

----- lsBox

RabidVWM can be loaded with lsbox, version 2.72 or newer, using *ModuleHook !VWMLoadBoxHook.  User data strings are currently ignored.

RabidVWM will load rc commands from the box file, but they may not have any effect if they're also specified in step.rc.  If the box comes up empty try !VWMMove 0 0 or something, to see if it's been given a position outside of the box.

VWMLoadInBox

  Tells the vwm to wait for lsbox to load rather than creating its main window.

!VWMLoadBoxHook

  Hook bang for lsbox.  Do not call this manually.


----- Reference

System colors (:###) are the same as for GetSysColor(), or:
	:0		Scrollbar color
	:1		Background color
	:2		Active titlebar color
	:3		Inactive titlebar color
	:4		Menu color
	:5		Window color
	:6		Window "frame" color?
	:7		Menu text color
	:8		Window text color
	:9		Active titlebar text color
	:10		Active window border color
	:11		Inactive window border color
	:12		Background color of MDI window
	:13		Selected item color
	:14		Selected item text color
	:15		Button/3D item color
	:16		Button/3d item shadow color
	:17		Disabled item text color
	:18		Button/3d item text color
	:19		Inactive titlebar text color
	:20		Button/3d item highlight color
   -- Windows 95 and newer --
	:21		Button/3d item dark shadow color
	:22		Button/3d item bright highlight color
	:23		Tooltip text color
	:24		Tooltip background color
	:25		undefined
   -- Windows 2000 and newer (not 98/ME?) --
	:26		"hotlight"?
	:27		Active titlebar gradient color
	:28		Inactive titlebar gradient color
   -- Windows XP and newer --
	:29		"menuhilight"?
	:30		"menubar"?

^@Variables^:
	^@wd^ desk no of the active window (usually the current desk)
	^@wh^ handle of active window
	^@wt^ title of active window
	^@wc^ class of active window
	^@wx^ x position of active window in the vwm
	^@wy^ y position of active window in the vwm
	^@wxs^ x position of active window relative on screen
	^@wys^ y position of active window relative on screen
	^@wxv^ x position of active window on virtual screen
	^@wyv^ y position of active window on virtual screen
	^@wsx^ x size of active window in the vwm
	^@wsy^ y size of active window in the vwm
	^@wsxs^ x size of active window relative on screen
	^@wsys^ y size of active window relative on screen
	^@wsxv^ x size of active window on virtual screen (same as wsxs)
	^@wsyv^ y size of active window on virtual screen (same as wsys)

Any of the ^@w...^ may also be specified as ^@w...(<windowspec>)^ to use the first window matching the given windowspec rather than the active window.  For example, ^@wsxs(#c notepad)^ is the width of the first notepad window found in screen coordinates.

	^@dx^ total number of desks across
	^@dy^ total number of desks down
	^@dc^ current desktop number
	^@de^ number of first empty desk

	^@md^ desk no that the mouse is over
	^@mx^ cursor x coordinate relative to VWM window
	^@my^ cursor y coordinate relative to VWM window
	^@mxs^ cursor x coordinate relative to screen
	^@mys^ cursor y coordinate relative to screen
	^@mxv^ virtual screen x coordinate corresponding to the mouse position
	^@myv^ virtual screen y coordinate corresponding to the mouse position

	^@cc^ class of window relevant to command
	^@ct^ title of window relevant to command
	^@ch^ handle of window relevant to command
	^@cd^ desk of window relevant to command

	^@ka^ status of "ALT" key, either true or false
	^@kc^ status of control key
	^@ks^ status of shift key
	^@kw^ status of window key
	^@km^ status of context menu key
	^@kal^ status of left alt key, c, s, or w can replace a
	^@kar^ status of right alt key, c, s, or w can replace a


windowspec #flags
	t	match window title
	c	match window class
	d	find window on current desk only
	d1.1	only windows on desk 1,1; only numbers are valid
	d4	only windows on desk 4
	p	find top window in paint order rather than lowest hwnd #
	h	find by window handle, in decimal
	a	find all matching windows, or LAST if used in a ^@var^


----- Tricks

 - To allow dragging the VWM, use lsbox.

 - Switch on hover with VWMOnHover !VWMDesk ^@md^

 - Miniwindow bitmaps can be very small when used with a border, I usually use 9x9 pixels.

 - You can get the window class of the active window with !VWMExec !alert "^@wc^"

 - Use VWMOnMouseOut !VWMHide for autohide.  Make sure you have a way to show it again!

 - To test a flash bitmap, try VWMOnHover !vwmflash #h ^@ch^

 - Use ^@ch^ to tell whether the mouse is over a window.  It will be 0 if it's not.  Alternatively, test ^@ct^ against an empty string.

 - tooltips, using label.dll:
	labels vwmtiplabel
	vwmtiplabelstarthidden
	vwmtiplabelheight 16
	; may want to dynamically size it with a script or something
	vwmtiplabelwidth 128
	vwmtiplabelonleftclick !execute [!vwmtiplabelhide][!vwmtiplabelpintodesktop]
	vwmtiplabelonrightclick !execute [!vwmtiplabelhide][!vwmtiplabelpintodesktop]
	vwmtiplabelonmouseleave !execute [!vwmtiplabelhide][!vwmtiplabelpintodesktop]
	; set the label's appearance however you want

	; set the title, move to cursor, pop it up over the vwm
	VWMOnHover !execute [!vwmtiplabelsettext "^@ct^"][!vwmtiplabelmove ^@mxs^ ^@mys^][!vwmtiplabelshow][!vwmtipLabelAlwaysOnTop]
	; hide it and reset z-order (need to keep changing z order to pop up over always-on-top vwm)
	VWMOnUnhover !execute [!vwmtiplabelhide][!vwmtiplabelpintodesktop]

   This does pop up the tooltip if you hover over empty space, you should be able to fix that with a script module.  A better version might use mzscript, like so:
	VWMOnHover !execute [!varset vwmtipx ^@mxs^][!varset vwmtipy ^@mys^][!varset vwmtiptitle "^@ct^"][!dovwmtip]
	VWMOnUnhover !execute [!vwmtiplabelhide][!vwmtiplabelpintodesktop]
	*script var vwmtiptitle ""
	*script var vwmtipx 0
	*script var vwmtipy 0
	*script bang !dovwmtip
	*script gotoif ("%[vwmtiptitle]" = "") nope
	; split window titles that are "doc - app" to "doc "
	*script exec !setlistsep -
	*script exec !vwmtiplabelsettext "%[vwmtiptitle:]"
	; don't pop up directly under cursor, that's unfriendly
	*script exec !varadd vwmtipx 1
	*script exec !vwmtiplabelmove %[vwmtipx] %[vwmtipy]
	*script exec !vwmtiplabelshow
	*script exec !vwmtiplabelalwaysontop
	*script exec !setlistsep :
	*script label nope
	*script ~bang


----- Known bugs and notes

If a window somehow gets "lost":  First try switching to that window, it should come back, then try !VWMGatherLost.  If that doesn't work, use Alt-Tab to switch to that window, then press Alt-Space.  If the window was maximized, select "Restore" and it will reappear, otherwise select "Move", press any arrow key on the keyboard, then move the mouse.  Click to drop the window.  (This trick should work with ANY vwm.)

If a *Fix window or toolbar gets lost...  well you're screwed for now, deal.  There's no easy way for me to distinguish between that and a window that shouldn't be shown at all.  (depending on conditions...)

*VWMIgnoreTitleChange windows still trigger VWMOnTitleChange.

In beta 1 snapshot mode for windows is a little off.  Using ConstantUpdate will make it look better at the cost of processor time for now.



----- Changes

** beta 1 **

122701:

 - added VWMBackBevel and VWMSelBevel
 - added .snapshot mode for background, also thanks to that code from label

121801:

 - added new color settings
 - added alpha settings, should work in win98 and newer

121501:

 - tried to add multimonitor support, but I can't test it
 - fake transparency is now flickerless thanks to code borrowed from Maduin's label

121201:

 - tried to be a little more forceful at switching focus when changing desks
   (this fixes problems I was having, esp with msvc)
 - fixed wrong window gaining focus on window close (caused by changes on 11-16)

120701:

 - removed OnScrollUp and OnScrollDown since they're pretty useless
   The focus had to be on the VWM, and that changes when you switch desks.
 - added VWMNoShellFlash and VWMFlashOnTitleChange
 - added VWMConstantUpdate
 - fixed problems with desks shifting around with FocusXXX & SwitchOnAnyFocus
 - added window size and position ^@vars^

120601:

 - hopefully fixed problems with refresh & lsbox
 - fixed windows jumping across the screen while dragging off the edge
 - added OnMoveWindow and OnSizeWindow
 - added OnScrollUp and OnScrollDown

120501:

 - put !left/right/up/down back in to work with lsdistro (grr)
 - added !VWMToggleHideTask
 - fixed gathering on quit with VWMHideTaskOnSwitch

120401:

 - added proper window flashing, just like in the movies
   (thanks Chaku, even if you're unaware that you've helped me:)

112801:

 - fixed .snapshot with tiny windows

112101:

 - improved state change detection

** alpha 6.1 **

 - fixed black selection bug (thanks Aero)
 - fixed minimized tasks restoring to the wrong place (thanks Aero)
 - fixed windows disappearing when shown (thanks a bunch of people)
 - fixed windows moving with !VWMDesk from hotkeys (thanks uGGi)
 - fixed gathering of minimized windows (thanks Aero)
 - fixed sticky windows only working if loaded after RabidVWM
 
** alpha 6 **

111801:

 - added VWMUseFakeTrans

111701:

 - added !VWMResize
 - fixed problem with grdMagick/Transparent (works! yay!)
 - added "fake" transparency

111601:

 - improved responsiveness to new/removed windows
 - added VWMSwitchOnAnyFocus
 - removed FocusCenter
 - added FocusTop
 - added VWMHoverTime
 - fixed a number of 1-byte buffer overrun bugs (lstrlen+1!)
 
111501:

 - added ^@k..^ key state vars
 - added !VWMSetAction (dynamically set event-based actions)

111401:

 - stole icon grabbing code from tasks, since it works better

111201:

 - finally got VWMHideTaskOnSwitch to work (grr)
 - added VWMSnapWindowOnDrag

111101:

 - made relative size/pos relative to box if in box
 - fixed % based size/pos values
 - added wharf support

111001:

 - added onswitchfrom/to call in init/quit
 - fixed changing desks with no windows (bug from fix yesterday)
 - added VWMInitialDesk
 - added ability to use a windowspec in *VWMStartWindowsOnDesktop
 - added ability to specify a number after left/right/up/down in deskno
 - removed !VWMleft/right/up/down; use !vwmdesk left/right/up/down instead
   email me if this really bothers you & maybe i'll put it back in
 - added autodetection of current desk after a litestep crash/quit
   (should help prevent massive numbers of lost windows)
 - added !VWMSetDesks (dynamically set # of desks)
 - added !VWMToggle (dynamically change bool options)
 - removed !VWMToggleWrapScreen

110901:

 - fixed window move detection & !VWMGather
   (thanks "u_u zZzZz")

** alpha 5 **

110801:

 - added OnClicks
 - added hung app detection, so ls won't freeze when something else does.
   Doesn't seem to always work :(
   (thanks blkhawk for bringing this to my attention, and help with testing)

110701:

 - added VWMOnNewWindow, VWMOnRemoveWindow, VWMOnTitleChange
 - added ^@de^
 - added ^@c^ vars

110601:

 - fixed OnHover & OnMouseOut
 - added a bunch of ^@m...^ vars
 - fixed state change detection.  This means that cpu usage is greatly reduced
   (not that it was all that high unless you're using snapshots), but snapshots
   don't get updated as often. (only when window order or something changes)
 - added flash to .snapshot mode
 - fixed some bad memory accesses in drag window code
 - fixed a resource leak with snapshot mode

110501:

 - added lsbox support (for real!  needs v 2.72) thanx blkhawk!
 - added alternate config file option
 - added triggered actions

110401:

 - Fixed *Fix.  Still can't drag *Fixed windows :6
 - Fixed restore of minimized windows in LM_BRINGTOFRONT.
   (thanks "u_u zZzZz" for finding this)

** alpha 4 **

110101:

 - Added .snapshot mode.
 - Made non-transparent default and added VWMUseTransBlt
 - negative percents for position and size work (as 100-%)
 - added !VWMMove
 - fixed !VWMGatherLost for windows in negative space
 - fixed !cmd desk references
 - fixed lcd "theme"
 - added !VWMFlash
 - added #h flag to use hwnd in hex for window spec (! only)
 - allow 0 as a valid desk number (current desk),
   didn't work with !VWMMoveApp before
 - added #a flag to repeat for all windows with window spec (! only)
 - added (windowspec) syntax for desknos
 - added #dx.y syntax for desk only flag in window spec
 - tried to add lsbox compatibility, not tested (load as regular module)
 - added !vwmexec and ^@commands^
 - added VWMDeskSpacing

** alpha 3 **

Stuff.

-----

Have fun!

-josh





  .--------.-----.-----.
  |        |  _  |  _  |__
  |__|__|__|_____|_____|__|


