Re: Re: Starting from scratch...

Weeble <[email protected]>
Newsgroups gmane.comp.windows.shells.litestep
Message-ID <[email protected]>
On 2/11/07, cerbie <ernie-P8xLOxVu+KW1Z/[email protected]> wrote:
> The part where xLabel is concerned, and it moving to where you want, is
> easy (provided each desktop has the same size). I think the rest is
> possible, and know that it would not involve infinite anythings; but
> your details aren't making too much sense (like exactly which thing
> that's moving is a label, and which is a window).

The only thing moving in my example is a label. I've gotten a very
basic (and ugly) version working:

;-------- EXAMPLE BEGINS

*Label                  vwmCursor
vwmCursorX "578"
vwmCursorY "32"
vwmCursorWidth 32
vwmCursorHeight 32
vwmCursorPaintingMode .singlecolor
vwmCursorColors #ff0000
vwmCursorMoveable  horizontal
vwmCursorMoveModifierKey .none
vwmCursorSnapTo 20 vwmSnapTargets
vwmCursorMoveArea "$vwmCursorX$" "$vwmCursorY$" "160" "32"

*Label                  vwmSnap1
vwmSnap1X "$vwmCursorX$"
vwmSnap1Y "$vwmCursorY$"
vwmSnap1Width 0
vwmSnap1Height 32
vwmSnap1AddToGroup       vwmSnapTargets
*Label                  vwmSnap2
vwmSnap2X "$vwmCursorX+32$"
vwmSnap2Y "$vwmCursorY$"
vwmSnap2Width 0
vwmSnap2Height 32
vwmSnap2AddToGroup       vwmSnapTargets
*Label                  vwmSnap3
vwmSnap3X "$vwmCursorX+64$"
vwmSnap3Y "$vwmCursorY$"
vwmSnap3Width 0
vwmSnap3Height 32
vwmSnap3AddToGroup       vwmSnapTargets
;vwmSnap3StartHidden "true"
*Label                  vwmSnap4
vwmSnap4X "$vwmCursorX+96$"
vwmSnap4Y "$vwmCursorY$"
vwmSnap4Width 0
vwmSnap4Height 32
vwmSnap4AddToGroup       vwmSnapTargets
*Label                  vwmSnap5
vwmSnap5X "$vwmCursorX+128$"
vwmSnap5Y "$vwmCursorY$"
vwmSnap5Width 0
vwmSnap5Height 32
vwmSnap5AddToGroup       vwmSnapTargets

vwmCursorOnMove !ParseEvars !vwmdesk %#(vwmCursorCurrentX-vwmCursorX+32)/32%#

;-------- EXAMPLE ENDS

The red box represents your currently active desktop. You drag it left
and right to select a desktop, and it switches to that desktop when
you do. Ideally the red box would be lined up above/below your VWM and
not be so huge, nor so red or boxy. ;) The only thing that's missing
right now is updating the position of the red box when you switch
desktop any other way (e.g. right-clicking on the VWM, hotkeys, etc.).
I could put in a VWMOnSwitchTo event and use !labelmove, but then I'd
create a horrible circle - the !labelmove would trigger
vwmCursorOnMove, which would call !vwmdesk and trigger VWMOnSwitchTo,
which would call !labelmove...

---------------------------------------------------------------------
    Can't Unsubscribe? Check http://desktopian.org/listunsub.html
        LS List Homepage: http://wuzzle.org/list/litestep.php
            Get the LS FAQ: http://lsfaq.shellfront.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.