Include 2: vwm.rc Thread last updated on 2004-06-28 08:10:54

Posted by member 7223 on 2004-06-03 16:23:38

Store these files in "$configdir$".
Then, add this line to your theme.rc:
include "$configdir$vwm.rc"

and !recycle.

------------------------------------------------------------------------------
vwm.txt (v1.1)
------------------------------------------------------------------------------

1. Introduction:
---------------

This trick will enhance your vwm.
You need to add the following lines somewhere in your theme.rc to make it works:

; an $evars$ defining the popup module to load
PopupID popup2-2.1.7

; these modules
*netloadmodule $PopupID$
*netloadmodule wndman-0.15
*netloadmodule rabidvwm-1.1.1
*netloadmodule one-0.7
*netloadmodule xlabel-3.0.5
*netloadmodule mzscript-0.9-beta_12

; and some settings:
xlabelusetextedit
mzautosavevars immediately

include "$configdir$vwm.rc"



2. The tricks:
-------------

2.1. VWM's tooltip:
------------------

Hovering VWM's mini-windows shows a tooltip displaying these informations:
- the class of the window you're over
- the window title
- the window handle
- its specific alpha-transparency level



2.2 VWM mouse clicks:
----------------------

The way VWM manage clicks should be slightly different from the standard:
- the "desktop switching" on right-click have been disabled
- an "AllWithLeftClick" mode have been introduced allowing: desktop switching, window
draging and giving focus to the window you're clicking on.
- Right-clicking pops up the VWM's popup menu (see below)



2.3 Alpha transparency management:
-----------------------------------

This trick offers you three "alpha management" modes. All modes allow you to modify the
alpha transparency level of any windows by middle-clicking on its VWM mini-window and,
then, using the mouse wheel.
Depending on the "Alpha mode" you're in, you might store the alpha level of any window
class in a "specific list".
Note that some windows might have strange reactions while playing with their alpha level.
In that case, adding the class of these windows to the "exclusion list" should be a good
idea (see below) You won't be able to change the alpha level of windows stored in the
"exclusion list", whatever mode you're in.

2.3.1 "Disabled" mode:
In that mode (even if it's called "disabled") changing the alpha level can be done like
describe above. But the changes won't be save except if that window is already on the
"specific list". Opening new windows, even those in the "specific list", won't change their
alpha level. You have to middle-click on it to enable the alpha stuff for that window.

2.3.2 "On new window" mode:
Opening windows that are in the specific list will automatically change the alpha level for
that window according to its specific value. In that mode, you can change the alpha
level of other windows and, by doing this, that window class is automatically save to the
"specific list" with the corresponding alpha value.
To remove a given window from the "specific list", just middle-click on it and scroll the
mouse wheel up until you see "Alpha: undefined" in the tooltip.

2.3.3 "Alpha toggle" mode:
In that mode, all windows will have the "inactive windows" alpha level except those
stored in the "specific list". The active window will have the "active window" alpha level.
You can define on the fly "inactive" and active" alpha levels simply by setting the alpha
level of any window and choosing the corresponding option in the menu (see below)
Note that you can add / remove windows to / from the "specific list" like in "On new
window" mode.



2.4 The VWM's popup menu:
---------------------------

2.4.1 "Alpha mode" allow you to:

- switch between "Disabled", "On new window" and "Alpha toggle" modes.
- add "window class" to the "exclusion list" (only when clicking on a mini-window) if that
class isn't already stored in that list.
- remove "window class" to the "exclusion list" (only when clicking on a mini-window) if
that class is already stored in that list.
- if you're in "Alpha toggle" mode and the window you've right-clicked on have a specific
alpha level, you'll be able to define that alpha level as the "inactive" or "active" windows
default alpha level. Note that this window will be remove from the "specific list".
- open "specific list" in "$txteditor$"
- open "exclusion list" in "$txteditor$"

2.4.2 "Send to clipboard":

- the window's class
- the window's title
- the window's handle

2.4.3 "Behavior" lets you toggle:

- hide tasks on switch
- switch on focus
- no wrap
- snap windows on drag

Note: changes of these parameters are stored in "$configdir$vwm.var$" but you have to
be sure you don't have the following settings defined in your theme.rc:
- VwmHideTaskOnSwitch
- VwmSwitchOnAnyFocus
- VwmNoWrap
- VwmSnapWindowOnDrag

2.4.4 Gather windows brings all windows to the current desktop



2.5 Important notes:
--------------------



- If some windows doesn't seem to remember their specific alpha level, make sure they
don't have dynamic classes. In that case, there's nothing more I can do.

- The VWM must always be visible for the "Alpha toggle" mode to work. If you need to
hide it, just move it to $resolutionx*9$ $resolutiony*9$.

- Popup module is reloaded each time you right-click on the VWM but no !reload is done.

- In "Aplha toggle" mode, it's a good idea to have VWMFocusTop set



have fun,
Smurth


bug report and suggestions:
smurth at free dot fr



;------------------------------------------------------------------------------
; vwm.rc (v1.1)
;------------------------------------------------------------------------------

*mzvarfile "$configdir$vwm.var"
*mzvarfile "$configdir$vwm_alpha.var"
*mzvarfile "$configdir$vwm_alphaex.var"
*mzscriptfile "$configdir$vwm.mz"

include "$configdir$vwm.var"



vwmmouseright 0

vwmonleftbuttondown !execute [!vwmdesk ^@md^][!one [hwnd:^@ch^]]

; enables tooltip support
;vwmonmouseover !vwmaction hover !vwm_ext_tooltip ^@#c^@ch^@#c^ "^@#c^@cc^@#c^" "^@#c^@ct^@#c^"
vwmonhover !vwm_ext_tooltip ^@ch^ "^@cc^" "^@ct^"
vwmonunhover !labelhide ext_tooltip

; enables alpha modes
vwmonrepaint !ifeq vwm_alphamode "2" !vwm_winalpharepaint ^@wh^
vwmonnewwindow !ifeq vwm_alphamode "1" !vwm_winalphanew ^@cc^
vwmonmiddlebuttondown !execute [!vwmdesk ^@md^][!labelrefresh ext_tooltip ext_tooltiponwheelup !vwm_winalpha ^@ch^ 8][!labelrefresh ext_tooltip ext_tooltiponwheeldown !vwm_winalpha ^@ch^ -8][!one [hwnd:^@ch^]][!vwm_winalpha ^@ch^ 0][!one xLabel ext_tooltip]

; enables popup on right-click
vwmonrightbuttondown !vwm_popupbuild ^@ch^ "^@cc^" "^@ct^"

vwm_win_ch
vwm_win_cc
vwm_win_ct
vwm_popupa0
vwm_popupa1
vwm_popupa2
vwm_popupb1
vwm_popupb2
vwm_popupb3
vwm_popupb4
vwm_popupc1
vwm_popupc2
vwm_popupd1
vwm_popupd2
vwm_popupd3

*popup "VWM" !new !popupvwm
*popup .icon=.none "Alpha mode" folder
*popup $vwm_popupa0$
*popup $vwm_popupa1$
*popup $vwm_popupa2$
*popup !separator
*popup $vwm_popupc1$
*popup $vwm_popupc2$
*popup $vwm_popupd1$
*popup $vwm_popupd2$
*popup $vwm_popupd3$
*popup .icon=.none "Open specific list" "$txteditor$" "$configdir$vwm_alpha.var$"
*popup .icon=.none "Open exclusion list" "$txteditor$" "$configdir$vwm_alphaex.var$"
*popup ~folder
*popup .icon=.none "Send to clipboard" folder
*popup "Class: $vwm_win_cc$" !labelinfoexport clipboard "$vwm_win_cc$"
*popup "Title: $vwm_win_ct$" !labelinfoexport clipboard "$vwm_win_ct$"
*popup "Handle: $vwm_win_ch$" !labelinfoexport clipboard "$vwm_win_ch$"
*popup ~folder
*popup .icon=.none "Behavior" folder
*popup $vwm_popupb1$
*popup $vwm_popupb2$
*popup $vwm_popupb3$
*popup $vwm_popupb4$
*popup ~folder
*popup !separator
*popup "Gather windows" !vwmgather
*popup ~new



*label ext_tooltip

ext_tooltipstarthidden
ext_tooltipalwaysontop
ext_tooltipnoescapesequence
ext_tooltiptransparencymode .none
ext_tooltipwidth 32
ext_tooltipheight 10
ext_tooltipcurrentwidth $ext_tooltipwidth$
ext_tooltipcurrentheight $ext_tooltipheight$
ext_tooltipautowidthmode left
ext_tooltipautoheightmode top
ext_tooltipfontalign left
ext_tooltipfontvertalign top
ext_tooltipnewlinespace 2
ext_tooltiptopborder 4
ext_tooltipleftborder 4
ext_tooltiponenter !labelhide ext_tooltip



;------------------------------------------------------------------------------
; wwm.mz (v1.1)
;------------------------------------------------------------------------------

*script start !varset P %
*script start !varset vwm_hl 0


; !vwm_winalpha
; - handle
; - alpha offset
;
; modified vars:
; - %{vwm_cc} : current window class
; - %{vwm_cq} : current window class (quoted)
; - %{vwm_ac} : current window's alpha level

*script bang !vwm_winalpha
*script gotoif ("%{\1}" = "0") vwm_winalphaend
*script exec !vwmexec !varset vwm_cq "^@wc(#h %{\1})^"
*script exec !varset vwm_cc %{vwm_cq}
*script gotoif ("%{vwm_cq}" &lt&gt "%{vwm_cc}") vwm_winalphaend
*script gotoif ("%{vwm_alphamode}" = "0") vwm_winalpha_sc
*script exec !ifnexist %{vwm_cc} !textappend @$configdir$vwm_alpha.var@ @%{vwm_cc} 254@
*script label vwm_winalpha_sc
*script exec !ifnexist %{vwm_cc} !varset %{vwm_cc} 254
*script exec !varset vwm_ac %{P}{%{vwm_cc}}
*script gotoif ("%{vwm_ac}" = ".none") vwm_winalphaend
*script exec !varadd vwm_ac %{\2}
*script exec !ifeval ("%{vwm_ac}" < "31") !varset vwm_ac 31
*script gotoif ("%{vwm_ac}" >= "255") vwm_winalpharemvar
*script exec !varset %{vwm_cc} %{vwm_ac}
*script exec !wndsetopacity "%{vwm_cc}" %{vwm_ac}
*script exec !vwmexec !vwm_ext_tooltip %{\1} "^@wc(#h %{\1})^" "^@wt(#h %{\1})^"
*script exit
*script label vwm_winalpharemvar
*script exec !wndsetopacity "%{vwm_cc}" 255
*script exec !varremove %{vwm_cc}
*script exec !textdel @$configdir$vwm_alpha.var@ @^%{vwm_cc}@
*script exec !vwmexec !vwm_ext_tooltip %{\1} "^@wc(#h %{\1})^" "^@wt(#h %{\1})^"
*script label vwm_winalphaend
*script ~bang


; !vwm_winalpharepaint
; - handle
;
; modified vars:
; - %{vwm_hl} : last window handle
; - %{vwm_cl} : last window class
; - %{vwm_ac} : current window's alpha level

*script bang !vwm_winalpharepaint
*script gotoif ("%{\1}" = "0") vwm_winalpharepaintend
*script gotoif ("%{\1}" = "%{vwm_hl}") vwm_winalpharepaintend
*script exec !vwmexec !varset vwm_ac ^@wc(#h %{\1})^
*script exec !vwmexec !varset vwm_cl "^@wc(#h %{vwm_hl})^"
*script exec !ifexist %{vwm_ac} '!varset vwm_ac %{P}{%{vwm_ac}}' else '!varset vwm_ac %{vwm_activalpha}'
*script gotoif ("%{vwm_ac}" = ".none") vwm_winalpharepaintend
*script exec !wndsetopacity "%{vwm_cl}" %{vwm_inactivalpha}
*script exec !wndsetopacity %active% %{vwm_ac}
*script exec !varset vwm_hl %{\1}
*script label vwm_winalpharepaintend
*script ~bang



; !vwm_winalphanew
; - class

*script bang !vwm_winalphanew
*script exec !ifexist %{\1} !wndsetopacity %{\1} %{P}{%{\1}}
*script ~bang



; !vwm_ext_tooltip
; - handle
;
; modified vars:
; - %{ext_tooltipx}
; - %{ext_tooltipy}

*script bang !vwm_ext_tooltip
*script gotoif ("%{\1}" = "0") vwm_ext_tooltipend
*script exec !ifexist %{\2} '!varset ext_tooltipx %{P}{%{\2}}' else '!varset ext_tooltipx undefined'
*script exec !ifeq ext_tooltipx ".none" !varset ext_tooltipx disabled
*script exec !varset ext_tooltipy %{ext_tooltipx}
*script exec !varint ext_tooltipy
*script exec !ifneq ext_tooltipy "0" !varset ext_tooltipx %#resolutionx-resolutionx+%{ext_tooltipy}*100/255%#%
*script exec !varset ext_tooltipy %{\2}
*script exec !ifneq \2 "%{ext_tooltipy}" !varremove ext_tooltipx
*script exec !ifexist ext_tooltipx !varset ext_tooltipx "\nalpha: &lt i&gt %{ext_tooltipx} &lt/i&gt"
*script exec !labelsettext ext_tooltip "class: %{\2}\ntitle: %{\3}\nhandle: %{\1}%{ext_tooltipx}"
*script exec !varset ext_tooltipx %{mousex}
*script exec !varset ext_tooltipy %{mousey}
*script exec !ifeval ("%{ext_tooltipx}" > "%#resolutionx/2%#") !varadd ext_tooltipx -%#ext_tooltipcurrentwidth%#
*script exec !ifeval ("%{ext_tooltipy}" > "%#resolutiony/2%#") '!varadd ext_tooltipy -%#ext_tooltipcurrentheight%#' else '!varadd ext_tooltipy 18'
*script exec !labelmove ext_tooltip %{ext_tooltipx} %{ext_tooltipy}
*script exec !labelshow ext_tooltip
*script label vwm_ext_tooltipend
*script ~bang



; !vwm_popupbuild
; - handle
; - class
; - title
;
; modified vars:
; - %{vwm_popupbuild} (removed)

*script bang !vwm_popupbuild
*script exec !vwmaction hover !none
*script exec !setevar vwm_win_ch ""
*script exec !setevar vwm_win_cc "%{\2}"
*script exec !setevar vwm_win_ct "%{\3}"
*script exec !ifneq \1 "0" !setevar vwm_win_ch %{\1}
*script exec !labelhide ext_tooltip
*script gotoif ("%{vwm_alphamode}" = "0") vwm_popupa0
*script gotoif ("%{vwm_alphamode}" = "1") vwm_popupa1
*script exec !setevar vwm_popupa0 '" Disabled" !varset vwm_alphamode 0'
*script exec !setevar vwm_popupa1 '" On new window" !varset vwm_alphamode 1'
*script exec !setevar vwm_popupa2 '"> Alpha toggle (%#resolutionx-resolutionx+%{vwm_inactivalpha}*100/255%#% - %#resolutionx-resolutionx+%{vwm_activalpha}*100/255%#%)" !none'
*script goto vwm_popupaend
*script label vwm_popupa0
*script exec !setevar vwm_popupa0 '"> Disabled" !none'
*script exec !setevar vwm_popupa1 '" On new window" !varset vwm_alphamode 1'
*script exec !setevar vwm_popupa2 '" Alpha toggle (%#resolutionx-resolutionx+%{vwm_inactivalpha}*100/255%#% - %#resolutionx-resolutionx+%{vwm_activalpha}*100/255%#%)" !varset vwm_alphamode 2'
*script goto vwm_popupaend
*script label vwm_popupa1
*script exec !setevar vwm_popupa0 '" Disabled" !varset vwm_alphamode 0'
*script exec !setevar vwm_popupa1 '"> On new window" !none'
*script exec !setevar vwm_popupa2 '" Alpha toggle (%#resolutionx-resolutionx+%{vwm_inactivalpha}*100/255%#% - %#resolutionx-resolutionx+%{vwm_activalpha}*100/255%#%)" !varset vwm_alphamode 2'
*script label vwm_popupaend
*script exec !ifexist vwmhidetaskonswitch '!execute [!setevar vwm_popupb1 "!execute [!varremove vwmhidetaskonswitch][!textdel @$configdir$vwm.var@ @^vwmhidetaskonswitch@][!vwmtogglehidetask off]"][!varset vwm_popupbuild >]' else '!execute [!setevar vwm_popupb1 "!execute [!varset vwmhidetaskonswitch true][!textappend @$configdir$vwm.var@ @vwmhidetaskonswitch@][!vwmtogglehidetask on]"][!varset vwm_popupbuild " "]'
*script exec !setevar vwm_popupb1 '"%{vwm_popupbuild} Hide tasks on switch" %#vwm_popupb1%#'
*script exec !ifexist vwmswitchonanyfocus '!execute [!setevar vwm_popupb2 "!execute [!varremove vwmswitchonanyfocus][!textdel @$configdir$vwm.var@ @^vwmswitchonanyfocus@][!vwmtoggle switchonanyfocus off]"][!varset vwm_popupbuild >]' else '!execute [!setevar vwm_popupb2 "!execute [!varset vwmswitchonanyfocus true][!textappend @$configdir$vwm.var@ @vwmswitchonanyfocus@][!vwmtoggle switchonanyfocus on]"][!varset vwm_popupbuild " "]'
*script exec !setevar vwm_popupb2 '"%{vwm_popupbuild} Switch on focus" %#vwm_popupb2%#'
*script exec !ifexist vwmnowrap '!execute [!setevar vwm_popupb3 "!execute [!varremove vwmnowrap][!textdel @$configdir$vwm.var@ @^vwmnowrap@][!vwmtoggle nowrap off]"][!varset vwm_popupbuild >]' else '!execute [!setevar vwm_popupb3 "!execute [!varset vwmnowrap true][!textappend @$configdir$vwm.var@ @vwmnowrap@][!vwmtoggle nowrap on]"][!varset vwm_popupbuild " "]'
*script exec !setevar vwm_popupb3 '"%{vwm_popupbuild} No wrap" %#vwm_popupb3%#'
*script exec !ifexist vwmsnapwindowondrag '!execute [!setevar vwm_popupb4 "!execute [!varremove vwmsnapwindowondrag][!textdel @$configdir$vwm.var@ @^vwmsnapwindowondrag@][!vwmtoggle snapwindowondrag off]"][!varset vwm_popupbuild >]' else '!execute [!setevar vwm_popupb4 "!execute [!varset vwmsnapwindowondrag true][!textappend @$configdir$vwm.var@ @vwmsnapwindowondrag@][!vwmtoggle snapwindowondrag on]"][!varset vwm_popupbuild " "]'
*script exec !setevar vwm_popupb4 '"%{vwm_popupbuild} Snap windows on drag" %#vwm_popupb4%#'
*script exec !setevar vwm_popupc1 ""
*script exec !setevar vwm_popupc2 ""
*script exec !setevar vwm_popupd1 ""
*script exec !setevar vwm_popupd2 ""
*script exec !setevar vwm_popupd3 ""
*script gotoif ("%{\1}" = "0") vwm_popupdend
*script exec !setevar vwm_popupc2 !separator
*script exec !ifexist %{\2} !varset vwm_popupbuild %{P}{%{\2}}
*script gotoif ("%{vwm_popupbuild}" ".none") vwm_popupc1
*script exec !setevar vwm_popupc1 '"Remove %{\2} from exclusion list" !execute [!textdel @$configdir$vwm_alphaex.var@ @^%{\2} .none@][!varremove %{\2}]'
*script goto vwm_popupdend
*script label vwm_popupc1
*script exec !setevar vwm_popupc1 '"Add %{\2} to exclusion list" !execute [!textdel @$configdir$vwm_alpha.var@ @^%{\2} @][!textappend @$configdir$vwm_alphaex.var@ @%{\2} .none@][!varset %{\2} .none]
*script label vwm_popupcend
*script exec !varint vwm_popupbuild
*script gotoif ("%{vwm_popupbuild}" = "0") vwm_popupdend
*script gotoif ("%{vwm_alphamode}" &lt&gt "2") vwm_popupdend
*script exec !setevar vwm_popupd1 '"Set active alpha level to %#resolutionx-resolutionx+%{vwm_popupbuild}*100/255%#%" !execute [!varset vwm_activalpha %{vwm_popupbuild}][!textdel @$configdir$vwm_alpha.var@ @^%{\2} @][!varremove %{\2}]'
*script exec !setevar vwm_popupd2 '"Set inactive alpha level to %#resolutionx-resolutionx+%{vwm_popupbuild}*100/255%#%" !execute [!varset vwm_inactivalpha %{vwm_popupbuild}][!textdel @$configdir$vwm_alpha.var@ @^%{\2} @][!varremove %{\2}]'
*script exec !setevar vwm_popupd3 !separator
*script label vwm_popupdend
*script exec !varremove vwm_popupbuild
*script exec !netreloadmodule $PopupID$
*script exec !popupvwm
*script exec !vwmaction hover !vwm_ext_tooltip ^@ch^ "^@cc^" "^@ct^"
*script ~bang



;------------------------------------------------------------------------------
; vwm.var
;------------------------------------------------------------------------------

vwm_activalpha 230
vwm_inactivalpha 55
vwm_alphamode 0



;------------------------------------------------------------------------------
; vwm_alpha.var
;------------------------------------------------------------------------------

; This file contain the classes of windows
; which have a specific alpha level



;------------------------------------------------------------------------------
; vwm_alphaex.var
;------------------------------------------------------------------------------

; This file contain the classes of windows that
; should not be affected by alpha managing

#32770 .none
WinRarWindow .none
SciTEWindow .none
MediaPlayerClassicW .none



Posted by member 12025 on 2004-06-03 21:47:08 link

Haven't tried it yet, but that looks pretty cool. I'll definitely give it a try in a little bit!

Posted by member 7223 on 2004-06-04 12:10:36 link

...

Posted by member 7223 on 2004-06-05 06:33:49 link

Version 1.0 is out :)

Posted by member 12798 on 2004-06-11 13:58:50 link

Smurth, you should be awarded somehow :)

Posted by member 12025 on 2004-06-11 17:02:09 link

1. Foreground window automatically gets made transparent. No way to undo this that I can find w/o a third-party app. The popup from said third-party app also likes to disappear, taking 2-3 tries. Odd. Adding it to the exclusion list only works for restarting it. Also, it'd be a nice idea to be able to set the alpha from the popup.
2. the popup will not stay up. it immediately disappears. Starting it pinned is the only solution.
(fixed--removed the mousex mousey part...now it shows up at mousex, mousey without going away)
3. Litestep now likes to lock up. Any ideas?
(fixed--I already had a !popupVWM, renamed the new one and it works fine, and less CPU usage)
4. I have a variable in my theme called trans_i. The line in the themevars.rc for it keeps becoming a single-digit number, so it's lost. This stuff makes no mention of a variable of a similar name. ???
In addition, all the labels' onEnter and onLeave actions no longer function. Not including the vwm.rc fixes it, yet the stuff here shouldn't have changed it. (fixed--Removing variables that were not necessary in the theme.rc, but were purely for diagnosing certain scripts, fixed it--wierd)
5. Why change the button behavior for the VWM?

Lastly, I'm amazed it works at all, and love the tooltip.

Posted by member 7223 on 2004-06-12 02:08:39 link

1. hum... I didn't take care that, by default, you're in mode 2. Changed the code to start in mode 0. The real problem with apps that don't support this, is that even by setting alpha level to 255 (fully opaque) it's the same as if it were translucent. The only way I know, is to destroy that window (close) and open it again.

2. I have to make this a little better. Sometime, the tooltip appears after the popup shows up. But I t shouldn't take the focus.

3. nop

4. I too have some problems with labels with "mode 2" enabled (some $labelcurrentheight$ disappears). I have to see if it appears in others mode. I guess using wndman is not a real good solution. I could try using lsdynamic (I used it before) but there's issues with desktoparea and maximized windows.

5. Becaue I think it's easier; and I need the right-click for popup.

Posted by member 7223 on 2004-06-12 12:26:16 link

Any module's exported $evars$ and $evars$ defined with the xLabel !setevar... are destroyed when performing a !reload (without reloading xLabel) That's weird

I have to change the way I manage popupvwm to avoid using !reload

Posted by member 99 on 2004-06-12 21:10:21 link

!reload resets all $vars$ to what they're set to in step.rc. Otherwise it wouldn't work. They're not really $vars$, they're $constants$.

Posted by member 7223 on 2004-06-12 23:37:34 link

...

Posted by member 12025 on 2004-06-13 15:03:07 link

Yup, just use mzscript vars for them all, only using them as evars on start. Works great, and, of course, save mzscript vars before a !reload.

Posted by member 12025 on 2004-06-13 15:04:44 link

OK, you mention [alpha?] mode 2 and 0. I see whre this is set, but what exactly is it?

Posted by member 7223 on 2004-06-14 00:13:10 link

Sorry Cerbie, the spaces in comments have been truncated so it's quite difficult to read. So:

- Mode 0: Alpha level is entirely manual. You can still change alpha level of windows that are not in the exclude list, but the change won't be save except if that window is already on the specific list. Opening new windows, even those in the specific list won't change the alpha level. You have to middle click to enable the alpha stuff for that window (until you close it)

- Mode 1: is "on new window" mode. It means, opening windows that are in the specific list will automatically change the alpha level for that window according to the "specific" value. In that mode, you can change the alpha level of other windows and, by doing this, that window is save to the specific list with the corresponding alpha value.

- Mode 2: In that mode, all windows will have the "inactive windows alpha level" except those which are store in the specific list and the active window which will have the "active window alpha level". Of course, you can add / remove windows from the specific list by setting its alpha level to the maximum (like in other modes) It will become an undefined alpha and then will follow the general rules (inactive - active)

Of course, you won't be able to change the alpha level of windows stored in the "exclude" list...



Before going to sleep a while, I want to add that I've rewrote all the popup stuff and I will post it this afternoon .
Check it out, since there's no more !reload issue

Posted by member 7223 on 2004-06-14 10:14:21 link

Update: vwm.rc is now 1.1

Changes:

- Put the "how-to" in "vwm.txt" instead of comments in "vwm.rc". Should be more understandable, now.

- Improve vwm's tooltip and popup interaction. Should be less conflicts.

- Removed the "vwm_alpha.pop" and "vwm_alphaex.pop" files.

- Rewrote the popup and add a !vwm_popupbuild to rebuild the popup instead of performing f**g !reload.

- add dynamic information to the popup.

Posted by member 103440 on 2004-06-27 18:24:08 link

Hi @Smurth. Hi think i found a bug!

In the file wwm.mz (v1.1) should be this:

*script gotoif ("%{vwm_popupbuild}" = ".none") vwm_popupc1
*script exec !setevar vwm_popupc1 '"Add %{\2} to exclusion list" !execute [!textdel @$configdir$vwm_alpha.var@ @^%{\2} @][!textappend @$configdir$vwm_alphaex.var@ @%{\2} .none@][!varset %{\2} .none]
*script goto vwm_popupdend
*script label vwm_popupc1
*script exec !setevar vwm_popupc1 '"Remove %{\2} from exclusion list" !execute [!textdel @$configdir$vwm_alphaex.var@ @^%{\2} .none@][!varremove %{\2}]'
*script label vwm_popupcend


,instead of this:

*script gotoif ("%{vwm_popupbuild}" ".none") vwm_popupc1
*script exec !setevar vwm_popupc1 '"Remove %{\2} from exclusion list" !execute [!textdel @$configdir$vwm_alphaex.var@ @^%{\2} .none@][!varremove %{\2}]'
*script goto vwm_popupdend
*script label vwm_popupc1
*script exec !setevar vwm_popupc1 '"Add %{\2} to exclusion list" !execute [!textdel @$configdir$vwm_alpha.var@ @^%{\2} @][!textappend @$configdir$vwm_alphaex.var@ @%{\2} .none@][!varset %{\2} .none]
*script label vwm_popupcend


Correct me if i'm wrong ;)
Your work are amazing! May i include it on my theme (for releasing of course)?
I love the dynamic popup, maybe i will implement it in some of my theme functions.

Best regards!

Posted by member 7223 on 2004-06-27 23:53:00 link

1. This is not a bug. You can add window class to exclusion list if it is not already; and you can remove it, if it is. Logical; isn't it ?

2. Of course, you can include it. Everything I put in the code section may be include in other's themes with or without modification.

3. You can ask questions about the code, too.

Posted by member 103440 on 2004-06-28 04:05:14 link

Hi @Smurth. With the old code, appear the option to remove a window class from the exlusion list without it being there,and the option to add it to the exclusion list with it already there, very strange, no?
I just changed the order...

Posted by member 7223 on 2004-06-28 08:02:14 link

Some &lt and &gt had been removed from the code while posting. Then,
*script gotoif ("%{vwm_popupbuild}" ".none") vwm_popupc1

should be replace by:
*script gotoif ("%{vwm_popupbuild}" &lt&gt ".none") vwm_popupc1


So, you were right as well as I was :)

Of course, the above code have been fixed.
Thank you for pointing this out.

One last word: in the line
*script exec !ifexist ext_tooltipx !varset ext_tooltipx "\nalpha: &lt i&gt %{ext_tooltipx} &lt/i&gt"

there's a " " between the first "&lt" and "i" that should be remove. I can't edit this here...