VWM Shortcuts Thread last updated on 2003-07-04 00:18:48

Posted by member 2112 on 2003-06-30 01:43:43

I want to create shortcuts for switching VWM's much like simplicity does it. But what I've created doesn't work as the shortcuts do not show and hide as they should. Here's my code....

Base.rc
VWMOnSwitchTo !execute [!ShortcutGroupHide 5 6 7 8][!ShortcutGroupShow 1 2 3 4][!ShortcutGroupHide ^@dc^][!ShortcutGroupShow ^@#d^4+^@dc^^@#d^]

tbar.box

...

*shortcut "" $vwm_start$ 3 desk.png deska.png .none #1h !VWMDesk 1
*shortcut "" $vwm_start+13$ 3 desk.png deska.png .none #2 !VWMDesk 2
*shortcut "" $vwm_start+13*2$ 3 desk.png deska.png .none #3 !VWMDesk 3
*shortcut "" $vwm_start+13*3$ 3 desk.png deska.png .none #4 !VWMDesk 4
*shortcut "" $vwm_start$ 3 deska.png .none .none #5 !none
*shortcut "" $vwm_start+13$ 3 deska.png .none .none #6h !none
*shortcut "" $vwm_start+13*2$ 3 deska.png .none .none #7h !none
*shortcut "" $vwm_start+13*3$ 3 deska.png .none .none #8h !none

...


These shortcuts are in an LSBox. Would this make a difference? I should also mention I'm using RabidVWM.

Posted by member 1783 on 2003-06-30 02:00:56 link

can you put many shortcutgroups into one bang? shouldn't it be:
...[!ShortcutGroupHide 5][!ShortcutGroupHide 6]...

Posted by member 7223 on 2003-06-30 07:36:17 link

I think [!ShortcutGroupShow ^@#d^4+^@dc^^@#d^] can't work !
$4+x$ can't work if x is a number. There must be an evar inside $...$

Better use something like this:
VWMActiveShortcut 4
VWMOnSwitchFrom !ShortcutGroupHide ^@dc^
VWMOnSwitchTo !ShortcutGroupShow ^@#d^VWMActiveShortcut+^@dc^^@#d^

Note: If your shortcuts are into a lsbox (using the lsbox built-in shortcus) you should use !LSBoxGroupHide/Show instead of !ShortcutGroupHide/Show... guess you already knew it :)

Posted by member 37809 on 2003-06-30 07:58:57 link

With shortcut2 you can hide, show or toggle multiple shortcutgroups with one bang call as you have up there, but you say you're using LsBox's own shortcuts as Smurth pointed out.

You should be able to do plain arithmetic inside of $$, since evars can evaluate to numbers; try !alert $((5*5)-3)*4$

Maybe try using VWMOnSwitchFrom (with ^@dc^) to hide the previous desk shortcut and VWMOnSwitchTo to show shortcut for current desk. Not sure if you can handle the condition for when you load/recycle ls though.

Posted by member 2112 on 2003-06-30 18:48:40 link

!LSBoxGroupHide/Show

That would be my problem. I assumed shortcut bangs would control shortcuts in the LSBox. And I though !LSBoxGroupHide/Show only controlled whole boxes not elements within a box.

Posted by member 2112 on 2003-07-04 00:18:48 link

And for reference you can't list more than one group with the lsbaxgrouphide bang. I'm pretty sure you can with shortcut though.