Re: Fwd: Re: FVWM: Conditional Functions

From: Mark <mark_at_sexy.demon.nl>
Date: Mon, 7 Feb 2005 16:01:59 +0100

Unfortunately no more replies on the subject .. does this mean it is
impossible ??
On Thursday 03 February 2005 14:03, Mark wrote:
> Forgot to include the list ..
>
> ---------- Forwarded Message ----------
>
> Subject: Re: FVWM: Conditional Functions
> Date: Thursday 03 February 2005 14:02
> From: Mark <mark_at_sexy.demon.nl>
> To: Marc Schlienger <marcschlienger_at_t-online.de>
>
> Hi Thank you very much for your reply!
>
> How would I bind this to a key binding ??
>
> My main problem was making a conditional function binding that would Toggle
> the status..
>
> I find it very difficult (well impossible for now:-) to make a function
> that would bind to one keybinding like I have now (Alt + S), store a window
> id (if any) and restore the mouse after i toggle.
>
> The preprocessor stuff is new to me though although i have read somewhere
> that m4 and cpp are possible.. would this be usefull to reduce startup
> time ??
>
> Thnx
> Mark
>
> On Thursday 03 February 2005 09:33, you wrote:
> > On 02:16 Thu 03 Feb?, Mark wrote:
> > > Hi I was trying to improve the useability of my config, until now I had
> > > a simple All (XMMS_Player) Iconify Toggle
> > > to show/hide my xmms.
> > >
> > > What I don't like on this setup is the fact that when I am working in a
> > > window and I've "Toggled" my Xmms, changed a song and I'm ready to
> > > continue work I have to manually regain focus on my "work" window..
> > >
> > > So I've tried to come up with a way to capture the pointer position
> > > before I DeIconify Xmms and restore it when I Iconify again...
> > >
> > > I've made 2 functions:
> > > # Show XMMS
> > > DestroyFunc ShowXmms
> > > AddToFunc ShowXmms
> > > + I Exec echo $[w.id] > $[FVWM_CONFIGDIR]/.XmmsWinId
> > > + I All (XMMS_Player) Iconify Toggle
> > > + I All (XMMS_Playlist) WarpToWindow 50 50
> > >
> > > # Hide XMMS
> > > DestroyFunc HideXmms
> > > AddToFunc HideXmms
> > > + I All (XMMS_Player, !Iconic) Iconify
> > > + I PipeRead 'echo WindowId `cat $[FVWM_CONFIGDIR]/.XmmsWinId`
> > > WarpToWindow 50 50'
> > > + I Exec rm $[FVWM_CONFIGDIR]/.XmmsWinId
> > >
> > > The above kinda works although it is not very reliable (also the
> > > PipeRead works on the Console but not in the function?) but offcourse
> > > this is not enough, as it needs to be bound on one keybinding so I was
> > > trying to make a ToggleXmms binding to make it al work but failed many
> > > times :-(
> > >
> > > If someone already has a similar function or a tip/solution please let
> > > me know.
> > >
> > > Mark
> > > --
> > > Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
> > > To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
> > > message to majordomo_at_fvwm.org.
> > > To report problems, send mail to fvwm-owner_at_fvwm.org.
> >
> > Hi,
> >
> > try adding the function
> >
> > DestroyFunc .
> > AddToFunc .
> > + I SendToModule FvwmPerl preprocess -c -- $*
> >
> > to your config and change the two functions above to the following:
> >
> > DestroyFunc ShowXmms
> > AddToFunc ShowXmms
> > + I Pick SetEnv WID $[w.id]
> > + I All (XMMS*) Iconify Toggle
> > + I All (XMMS_Playlist) WarpToWindow 50 50
> >
> > DestroyFunc HideXmms
> > AddToFunc HideXmms
> > + I All (XMMS*, !Iconic) Iconify
> > + I . WindowId $[WID] WarpToWindow 50 50
> >
> > Now you may assign a keybinding to this two functions and it should work.
> > If not please let me know!
> >
> > Regards
> > Marc
>
> -------------------------------------------------------
> --
> Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
> To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
> message to majordomo_at_fvwm.org.
> To report problems, send mail to fvwm-owner_at_fvwm.org.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Mon Feb 07 2005 - 09:01:30 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:57 BST