FvwmEvent seems not work on my computer

Hi,
I have started to learn FVWM since this weekend, got a weird issue, FvwmEvent seems not work on my computer, my OS is Xubuntu 18.04 64bit, FVWM version is 2.6.7

I tried something like:

KillModule FvwmEvent
DestroyModuleConfig FvwmEvent: *
*FvwmEvent: iconify ploop.au 
Module FvwmEvent

restart fvwm, iconify a window, nothing happened, no audio be played

then tried this one:

KillModule FvwmEvent
DestroyModuleConfig FvwmEvent: *
*FvwmEvent: Cmd Echo
*FvwmEvent: iconify "iconify test"
Module FvwmEvent

restart fvwm, iconify a window, nothing happened, no idea where could see “iconify test”

then tried this:

KillModule FvwmEvent
DestroyModuleConfig FvwmEvent: *

*FvwmEvent: Cmd Function
*FvwmEvent: iconify FuncFE_test

DestroyFunc FuncFE_test
AddToFunc FuncFE_test
+ I Pick Exec exec xmessage $[desk.n]

Module FvwmEvent

restart fvwm, iconify a window, no messsage window popup,

what is wrong with my configs? I even think maybe FvwmEvent Module has not installed on my OS or FVWM…

Hi @glom,

First of all, you should check that fvwm has been compiled with rplay support and that rplay is installed. For that, run:

fvwm-config --supports-rplay && echo $?

If that prints out 0, then that means you should get rplay sound support with FvwmEvent. That said, I should warn you that I will be removing rplay support in FVWM3 as this library is no longer maintained.

In your second example, you have:

 *FvwmEvent: iconify "iconify test"

That would print “iconify test” to STDERR, which on some systems in ~/.xsession-errors, but also sometimes this is now logged via systemd, so you should check. It will depend on which (if any) display manager you mighth be using.

In your third example…

+ I Pick Exec exec xmessage $[desk.n]

Pick forces a window context by getting you to choose, which isn’t what you want. Arguably, you can use:

+ I Exec exec xmessage $[whatever]

as the window context is already assured.

There’s nothing fundamentally wrong with your examples, so I am sure they’re working, but perhaps if you told me what you’re trying to do, I can be more specific?

Thanks,
Thomas

Hi Thomas,
I deleted all config lines for FVWMEVENT, only add one line at bottom :
read ConfigFvwmEvent
then created a new file “ConfigFvwmEvent” in .fvwm folder,

*FvwmEvent: Cmd Function
*FvwmEvent: Cmd exec

work now, but still can not play audio, as you mentioned, I tested:
fvwm-config --supports-rplay && echo $?
It prints out 0,

I read old post in this forums, found a good idea:
“set up a dynamic title bar for current window”, when cursor move to left edge of current window, title bar change to left side of the win, when cursor move to right edge of current win, title change to right side of the win and so on, please check this gif:

my current configs as follows: (WIP)

################## ConfigFvwmEvent 
KillModule FvwmEvent
DestroyModuleConfig FvwmEvent: *

*FvwmEvent: Cmd Function
*FvwmEvent: enter_window FuncFE_test5

DestroyFunc FuncFE_test5
AddToFunc FuncFE_test5
 + I Current (Calculator) PipeRead ` [ $[pointer.wx] < 8 ]; then echo Style $[w.visiblename] TitleAtLeft; echo Break; else echo nop; echo Break;`
 + I Current (Calculator) PipeRead ` [ $[pointer.wy] < 8 ]; then echo Style $[w.visiblename] TitleAtTop;  echo Break; else echo nop; echo Break;`
 #+ I Current (Calculator) PipeRead ` [ $(($[pointer.wx]-$[w.width])) < 8 && $(($[pointer.wx]-$[w.width])) > -8 ]; then echo Style $[w.visiblename] TitleAtRight;  echo Break; else echo nop; echo Break;`
 #+ I Current (Calculator) PipeRead ` [ $(($[w.height]-$[pointer.wy])) < 8 && $(($[w.height]-$[pointer.wy])) > -8  ]; then echo Style $[w.visiblename] TitleAtBottom;  echo Break; else echo nop; echo Break;`
Module FvwmEvent
########################### 

this is a test version only for “Calculator” window( it does not work…),the finnal version should like this:
+ I PipeRead ` [ $[pointer.wx] < 8 ]; then echo Style $[w.visiblename] TitleAtLeft; echo Break; else echo nop; echo Break;

Hi @glom,

Assuming you’re using bash or sh (or whatever you may have set in ExecUseShell), then arithmetic comparisons for < and > don’t work like that. You need to use -lt or -gt, or -le or -ge. At this point, this isn’t a Fvwm problem at all.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.