FVWM: Conditional Functions

From: Mark <mark_at_sexy.demon.nl>
Date: Thu, 3 Feb 2005 02:16:49 +0100

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.
Received on Wed Feb 02 2005 - 19:17:24 GMT

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