A console that goes up/down when we press ALT F12 (yakuake)

with sthg like that ?

No.

AddToFunc StartFunction I pterm

And even then, having “pterm” as a function is questionable.

– Thomas Adam

i had it in the StartFunction but every time i restarted fvwm I would get a new instance of pterm and end up with multiple pterm which messes things up.

So, you either mean for it to happen at init time (initial statup) as in:

+ I Test (Init) pterm

Or you’d mean something like:

+ I None (pterm) pterm

Either way, there’s no excuse.

– Thomas Adam

Oh, note that as you’re also using “All” as the conditional, it’s entirely feasible based on not seeing anything further in your config that there’s more than one instance of this pterm running. If that’s never the case, you really mean to use “Next” instead.

But I suppose it’s a moot distinction.

– Thomas Adam

the

are nicer but what is so bad about just putting the pterm in InitFunction

viewtopic.php?f=40&t=1505

– Thomas Adam

Since you have experience with that, could you explain me what he meant above, I mean what’s missing in the above code ?
thanks

My code just finished. Thanks to thomasadam for the last line of the code…
You may need to change the term and the geometry :laughing:

Style quake NoTitle, Sticky, WindowListSkip, CirculateSkipIcon, \
            CirculateSkip, StaysOnTop, NoHandles, BorderWidth 1

SetAnimation 20 0 .01 .03 .08 .18 .3 .45 .65 1

DestroyFunc QuakeTerminal
AddToFunc QuakeTerminal
+ I All (quake) ToggleQuakeTerminal
+ I TestRc (NoMatch) StartQuakeTerminal

Key F1  A   N   QuakeTerminal

DestroyFunc ToggleQuakeTerminal
AddToFunc ToggleQuakeTerminal
+ I ThisWindow (Visible) AnimatedMove +0p -1100p
+ I TestRc (Match) KeepRc Next (HasPointer) Focus
+ I TestRc (NoMatch) KeepRc ThisWindow Move +0p +0p
+ I TestRc (NoMatch) ThisWindow Focus

DestroyFunc StartQuakeTerminal
AddToFunc StartQuakeTerminal
+ I Exec exec rxvt -title quake -geometry 209x40+0+0 -e screen -S Quake -R
+ I Wait quake

AddToFunc RestartFunction
+ I All (quake) Move +0p -1100p


Module FvwmAuto 40 -mleave "Silent ThisWindow (quake) AnimatedMove +0p -1100p"

Hey, when the rxvt is replaced my mrxvt, that is not workign anymore:
50 is for testing purposes. The F1 press at 2nd time roll it not up anymore back.

I modified the code for that but still got some troubles:

###################
Style quake Sticky, CirculateSkipIcon, \
            CirculateSkip, StaysOnTop, NoHandles, BorderWidth 1

SetAnimation 20 0 .01 .03 .08 .18 .3 .45 .65 1

DestroyFunc QuakeTerminal
AddToFunc QuakeTerminal
+ I All (quake) ToggleQuakeTerminal
+ I TestRc (NoMatch) StartQuakeTerminal

Key F1  A   N   QuakeTerminal

DestroyFunc ToggleQuakeTerminal
AddToFunc ToggleQuakeTerminal
+ I ThisWindow (quake) AnimatedMove +0p -50p
+ I TestRc (Match) KeepRc Next (HasPointer) Focus
+ I TestRc (NoMatch) KeepRc ThisWindow (quake) AnimatedMove +0p +50p
+ I TestRc (NoMatch) ThisWindow Focus

DestroyFunc StartQuakeTerminal
AddToFunc StartQuakeTerminal
+ I Exec exec mrxvt -g 120x21+0+0 -name quake -fg green -bg black
+ I ThisWindow Raise
+ I ThisWindow Focus
#+ I Wait quake

AddToFunc RestartFunction
+ I All (quake) Move +0p -50p


Module FvwmAuto 40 -mleave "Silent ThisWindow (quake) AnimatedMove +0p -50p"

Well, check that mrxvt accepts options such as “-g” for geometry, and “-name” as opposed to something like “-T”. Since you fail to tell us exactly what’s wrong with it, it’s hard to help you. I sure as hell refuse to guess anymore, it’s not worth my time.

Let’s analyse that StartQuakeTerminal though since I don’t like it.

DestroyFunc StartQuakeTerminal
AddToFunc StartQuakeTerminal
+ I Exec exec mrxvt -g 120x21+0+0 -name quake -fg green -bg black

That bit’s good.

+ I ThisWindow Raise
+ I ThisWindow Focus
#+ I Wait quake

Ah. This isn’t so good. ThisWindow refers to which window? Could be any. You really meant to do this:

DestroyFunc StartQuakeTerminal
AddToFunc StartQuakeTerminal
+ I Exec exec mrxvt -g 120x21+0+0 -name quake -fg green -bg black
+ I Wait quake
+ I Next (quake) RaiseAndFocus

DestroyFunc RaiseAndFocus
AddTofunc    RaiseAndFocus
+ I Raise
+ I Focus

– Thomas Adam

Hence the code looks like as follows, but something is wrong.
F1: The window mrxvt create at +0+0 and gets focus
the next F1: place it to position -50
the next F1 press: remains unchanged, nothing occurs
the next F1 press: remains unchanged, nothing occurs
the next F1 press: remains unchanged, nothing occurs

Still a tiny problem somehow …

###################
Style quake Sticky, CirculateSkipIcon, \
            CirculateSkip, StaysOnTop, NoHandles, BorderWidth 1

SetAnimation 20 0 .01 .03 .08 .18 .3 .45 .65 1

DestroyFunc QuakeTerminal
AddToFunc QuakeTerminal
+ I All (quake) ToggleQuakeTerminal     
+ I TestRc (NoMatch) StartQuakeTerminal    

Key F1  A   N   QuakeTerminal

DestroyFunc ToggleQuakeTerminal
AddToFunc ToggleQuakeTerminal
+ I ThisWindow (quake) AnimatedMove +0p -50p
+ I TestRc (Match) KeepRc Next (HasPointer) Focus
+ I TestRc (NoMatch) KeepRc all (quake) AnimatedMove +0p +50p
+ I TestRc (NoMatch) ThisWindow Focus

DestroyFunc StartQuakeTerminal
AddToFunc StartQuakeTerminal
+ I Exec exec mrxvt -g 120x21+0+0 -name quake -fg green -bg black
+ I Wait quake
+ I Next (quake) RaiseAndFocus

DestroyFunc RaiseAndFocus
AddTofunc    RaiseAndFocus
+ I Raise
+ I Focus

AddToFunc RestartFunction
+ I All (quake) Move +0p -50p

Module FvwmAuto 40 -mleave "Silent ThisWindow (quake) AnimatedMove +0p -50p"

Most likely due to all that KeepRc nonsense.

– Thomas Adam

Almost working… :slight_smile:
I still do not get the right focus when it goes from console quake focused to unfocused and previous window :slight_smile:

###################
Style quake Sticky, CirculateSkipIcon, \
            CirculateSkip, StaysOnTop, NoHandles, BorderWidth 1

SetAnimation 20 0 .01 .03 .08 .18 .3 .45 .65 1

DestroyFunc QuakeTerminal
AddToFunc QuakeTerminal
+ I All (quake) ToggleQuakeTerminal     
+ I TestRc (NoMatch) StartQuakeTerminal    


Key F12  A   N   QuakeTerminal
 
DestroyFunc ToggleQuakeTerminal
AddToFunc ToggleQuakeTerminal
#+ I None (quake) StartQuakeTerminal
+ I All (quake, CurrentPage, Overlapped, !State 0) Nop
+ I TestRc (Match) All (quake) Focus
+ I TestRc (Match) All (quake) Raise
+ I TestRc (Match) Break
+ I All (quake, State 0) Move screen 0 +0p +0p
#+ I TestRc (NoMatch) ThisWindow Focus
+ I TestRc (Match) All (quake) Focus
+ I TestRc (Match) All (quake) Raise
+ I TestRc (Match) All (quake) State 0 False
+ I TestRc (Match) Break
+ I All (quake) Move +0p -50p
+ I TestRc (Match) KeepRc Next (HasPointer) Focus
+ I All (quake) State 0 True
+ I UnSetEnv i

DestroyFunc StartQuakeTerminal
AddToFunc StartQuakeTerminal
+ I Exec exec mrxvt -g 120x21+0+0 -name quake -fg green -bg black
+ I Wait quake
+ I All (quake) State 0 True

AddToFunc RestartFunction
+ I All (quake) Move +0p -50p


Module FvwmAuto 40 -mleave "Silent ThisWindow (quake) AnimatedMove +0p -50p"

Whaoo !! Almost ! It rolls up and down like it should, but time to time, one need to press twice the F12 key :question:
Here is the almost working code (why should I press twice to get it rolled up / down the quake-console-like ?)

Here please find the code:

###################
Style quake NoTitle, Sticky, WindowListSkip, CirculateSkipIcon, \
            CirculateSkip, StaysOnTop, NoHandles, BorderWidth 1

SetAnimation 20 0 .01 .03 .08 .18 .3 .45 .65 1

DestroyFunc QuakeTerminal
AddToFunc QuakeTerminal
+ I All (quake) ToggleQuakeTerminal     
+ I TestRc (NoMatch) StartQuakeTerminal   

Key F12  A   N   QuakeTerminal
Key Escape  A   M   QuakeTerminal

DestroyFunc ToggleQuakeTerminal
AddToFunc ToggleQuakeTerminal
#+ I None (quake) StartQuakeTerminal
+ I All (quake, CurrentPage, Overlapped, !State 0) Nop
+ I TestRc (Match) All (quake) Focus
+ I TestRc (Match) All (quake) Raise
+ I TestRc (Match) Break
+ I All (quake, State 0) Move screen 0 +0p +0p
#+ I TestRc (NoMatch) ThisWindow Focus
+ I TestRc (Match) All (quake) Focus
+ I TestRc (Match) All (quake) Raise
+ I TestRc (Match) All (quake) State 0 False
+ I TestRc (Match) Break
+ I All (quake) Move +0p -1000p
+ I TestRc (Match) KeepRc Next (HasPointer) Focus
+ I All (quake) State 0 True
+ I UnSetEnv i

DestroyFunc StartQuakeTerminal
AddToFunc StartQuakeTerminal
+ I Exec exec mrxvt -g 170x14+0+0 -name quake -fg green -bg black
+ I Wait quake
+ I All (quake) State 0 True

AddToFunc RestartFunction
+ I All (quake) Move +0p -1000p

Module FvwmAuto 40 -mleave "Silent ThisWindow (quake) AnimatedMove +0p -1000p"

There are some possible problems in the code.

First, the first line in ToggleQuakeTerminal should use condition Visible not quake. And you need make sure to move the quake window to somewhere completely invisible as the state is determined by the Visible property.

Second, the added line “+ I Next (quake) RaiseAndFocus” will have no effect as quake is styled CirculateSkip. I have encounter the same problem in writing the code. If you really need it, try All instead of Next. But I think this line is not necessary as newly launched quake can get focus automatically.

Hope that you can solve the focus problem soon. If you have rxvt installed, it should work simply by coping the code to your fvwm2rc. If you use mrxvt, you need only to modify the constants related to window placement and make sure to hide the quake window completely.

There is still a weird problem of my code that I don’t understand. When I issue a “killall rxvt” command, and then a F1 to bring back the quake window . It will sometimes result in a term window that has no prompt and does not accept input! If I kill and press F1 again, the problem disappear. I don’t know whether it’s problem of the code or the problem of my Xorg. Does anyone have the same problem?

It would be much easier to use !Overlapped here, I’d have thought, rather than moving it away each time.

Ah, so you have. A bollocks thing to do really. I’d remove that entirely from the style line. Why did you add it?

(Using “All” to mean the next window, as a get-out clause because All implies CirculateHit is really not the right solution when the correct thing to do is to just remove the CirculateSkip style option.)

– Thomas Adam

@kittie:
we should maybe write an universal code that work for all sort configs & could be updated easily for all users :wink: :wink:

Can you elaborate?

– Thomas Adam

My consideration is if CirculateSkip is removed, it may occur that the hidden quake window may get focused when its previous window executes “Next Focus”. I am not sure though. Can non-visible window get focus in this case?