Hi all
I use a function from taviso’s config for masking a dock in the bottom of my desk.
i use too a key binding for a fakeClik on the dock.
so when i press the key for masking, all work well , the dock hide and let appear a 4 pixels part of himself in the desk.when i press again “WarpToWindow” send the mouse cursor in the 4 pixels part of the dock but
the cursor is beetween 2 pages too so the dock raise but i switch to page 2.
Is there a way to not allow page swiching ?
thx by advance.
found a little workaround but (not nice)
AddToFunc Press2
+ I SetEnv currentpagex $[page.nx]
+ I SetEnv currentpagey $[page.ny]
+ I SetEnv pointer_x $[pointer.x]
+ I SetEnv pointer_y $[pointer.y]
+ I Next (MyDock, CirculateHit) WarpToWindow $1 $2
+ I FakeClick depth 7 press $0 release $0
+ I GoToPage $[currentpagex] $[currentpagey]
+ I WindowId root WarpToWindow $[pointer_x]p $[pointer_y]p
+ I FakeClick depth 2 press 3 release 3
Isn’t it better to bind the keypress to the same thing that clickingon the dock does. FakeClick is realy only for debugging.
I don’t know — if it works, so be it. I do agree that the use of FakeClick in this instance is OTT, but it has a lot more uses besides debugging.
– Thomas Adam
hi
it work , it work with a little flashing effect but i haven’t found any other solutions .
If you post all parts of the config related to the functionality I might be able to help you. I’m not aware of the config you referres to.
so here it is :
for the fakeClik:
AddToFunc Press2
+ I SetEnv currentpagex $[page.nx]
+ I SetEnv currentpagey $[page.ny]
+ I SetEnv pointer_x $[pointer.x]
+ I SetEnv pointer_y $[pointer.y]
+ I Next (MyDock, CirculateHit) WarpToWindow $1 $2
+ I FakeClick depth 7 press $0 release $0
+ I GoToPage $[currentpagex] $[currentpagey]
+ I WindowId root WarpToWindow $[pointer_x]p $[pointer_y]p
+ I FakeClick depth 2 press 3 release 3
and that’s my dock when it is hiding. i use fakeClick to hide/show but when it is hiding, warptowindow goes beetween 2 pages and when the dock grow up i switch to page 2.tha’s why i wrote
- I SetEnv currentpagex $[page.nx]
- I SetEnv currentpagey $[page.ny]
this function work but i can see a little glitch.
i’m not really ok with all these functions and that’ s my first theme.
my brain is upside down so i think i will stop a little.
fvwm seems very dangerous … (for brain and social life )
Does the dock have any configuration for allowing it to hide/unhide on click?
yes of course :
DestroyFunc HideFuncVert
AddToFunc HideFuncVert
+ I Next (CirculateHit,MyDock) PipeRead 'echo AnimatedMove $$(test $$(($[w.y]+$[w.height])) -le $[vp.height] && echo keep w$$(($[w.height]-$0))p || echo keep w-$$(($[w.height]-$0))p)'
+ I Next (CirculateHit,MyDock) PipeRead 'test $$(($[w.y]+$[w.height])) -le $[vp.height] && echo SetEnv strut.bottom $[w.height] || echo SetEnv strut.bottom $0'
+ I EwmhBaseStruts $[strut.left] $[strut.right] 25 $[strut.bottom]
+ I All (Maximized, !FvwmInfos, !MyDock) Maximize True
this is for hiding the dock and set dynamically the EwmhBaseSTrut.
Have you tried to bind that function directly to your keybinding for hiding/unhiding the dock. I see no reason why it shouldn’t work.
The only thing which comes to my mind is if you are on a BSD box, then the basic, stripped-down /bin/sh doesn’t do all the fancy in-line arithmetics, so you could try ExecUseShell /usr/local/bin/bash or similar.
By the way, could we see your whole dock? It looks very neat!
hi
you can see my config here
i’m trying to bind it directly to my keyboard …
and it return me an error …hum i will dig it a bit…
thx for the idea, i have never think about bind it directly to my keyboard