All:
I want to be able to remember a previous desk I was at, and then programmatically, return to that desk.
I have the following:
AddToFunc setLastDeskFunc
+ I SetEnv Last_Desk $[desk.n]
AddToFunc goToLastDeskFunc
+ I GoToDesk 0 $Last_Desk
It doesn’t seem to work however… am I referencing my Last_Desk variable incorrectly? Can this type of thing even be done?
Any thoughts would be appreciated…
– Skender
OK. I assume that you invoke ‘setLastDeskFunc’ on FvwmEvent via the new_desk event? That way at least your env var will be updated properly.
As to why the ‘gotoLastDeskFunc’ doesn’t work – you’re not referencing the env var correctly. It should be:
+ I GoToDesk 0 $[Last_Desk]
– Thomas Adam
Yes. I am assigning the desk value in the new_desk event… but it did take me a few minutes to realize I needed to do that there.
And thanks for the syntax help… to much Java the past few weeks… and my brain isn’t keeping up so well on lack of sleep
As always, Thomas, thanks for all of your help.
Cheers,
Jared
Is there some reason that using an environment variable is better than
simply using
GotoDesk prev
to go to the previous desk?
Yes. “Previous” in this case might not always mean the last desk visited – which is what ‘Prev’ does in this context.
It’s also not available in the 2.4.X series of FVWM, for which the above provides a generic solution for.
– Thomas Adam