You are not logged in.

#1 2006-02-21 09:48:32

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

fvwm pipe menu

Hey,

I thought this was a dumb  question and I tried looking at how fvwm-menu-directory worked but I couldn't get mine to work the same so I was wondering if there is another way. I've written a Python script that is in $PATH and outputs this:

DestroyMenu MenuMounts
AddToMenu MenuMounts
  + "Mount /media/iPod"% Exec exec mount /media/iPod
  + "Mount /media/Phone"% Exec exec mount /media/Phone
  + " " Nop
  + "Unmount /media"% Exec exec umount /media

How would I go about plugging that into my menu and have the script run each time I view the menu so the content is updated? I googled for fvwm pipe menu but didn't get much helpful, is there something better I should have searched for?

Ta smile

Offline

#2 2006-02-21 17:01:00

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: fvwm pipe menu

You might be able to use FvwmEvent to do this. I'm not sure what events it can respond to though.

Another option is to do this inside of a FvwmScript that calls the script every X seconds. That's obviously less ideal..


I am a gated community.

Offline

#3 2006-02-21 20:53:05

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: fvwm pipe menu

Wait, I'm an idiot. Just call a function that runs your script and then opens the menu. i.e.
Key 1  A  MC  RunScriptAndOpenMenu

DestroyFunc RunScriptAndOpenMenu
AddToFund RunScriptAndOpenMenu
+ I MenuMounts
+ I Menu Blah

(the code is probably wrong, I'm not on my Arch box.)


I am a gated community.

Offline

#4 2006-02-22 06:39:15

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

Re: fvwm pipe menu

Thanks, that looks like it'll do nicely big_smile

Offline

Board footer

Powered by FluxBB