Re: FVWM: Get the current content of root window

2021-02-18 Thread Dr Rainer Woitok
Klaus,

On Thursday, 2021-02-18 10:44:03 +0100, you wrote:

> ...
> Both just get the current visible desktop; with all windows ans other
> stuff that is ontop of the root window.

That's something you can do with "xwd":

   $ xwd -root | convert xwd:- file.png

> I want to get the content of the root window itself; the one that was
> set by display/xsetbg or others.

Hmmm,  must be burried somewhere  in your personal X11 configuration ...
sorry, no idea.

Sincerely,
  Rainer



Re: FVWM: Get the current content of root window

2021-02-18 Thread Dr Rainer Woitok
Klaus,

On Wednesday, 2021-02-17 18:48:45 +0100, you wrote:

> ...
> seting the background (root window) to some image is easy. But is there
> any way to get the image content on fvwm root window back to an image?

A screenshot?  Something like "xwd"?   Or am I misunderstanding what you
want to achieve?

Sincerely,
  Rainer



FVWM: Identify window by PID?

2020-09-09 Thread Dr Rainer Woitok
Greetings,

is there a way to identify a window by the PID of the process running in
it?  So I could do something along the lines of

   All (...  ...) WarpToWindow 50 50

I didn't yet find a solution at

   https://www.fvwm.org/Archive/Manpages/fvwm.html

I know there is the "wmctrl", but I would prefer a solution within Fvwm.

Sincerely,
  Rainer



FVWM: No module "FvwmTaskBar" in Fvwm 2.6.9?

2020-08-11 Thread Dr Rainer Woitok
Greetings,

after a routine upgrade of my Gentoo system which also updated Fvwm from
version 2.6.5-r3  to 2.6.9  suddenly module  "FvwmTaskBar"  was missing.
Since this module is very important for the way I'm using Fvwm, I had to
immediately downgrade again to version 2.6.5-r3.

Question: What has become of "FvwmTaskBar"?

Sincerely,
  Rainer



Re: FVWM: React to event "KeyPress Control_L, KeyRelease Control_L"

2020-05-20 Thread Dr Rainer Woitok
Chris,

On Monday, 2020-04-27 11:23:25 -0400, you wrote:

> > ...
> > Holding down Ctrl any pressing A should NOT trigger this command.
> 
>  On Linux, you can use the 'xcape' program to put together something to
> do this.

Thanks for  pointing me to "xcape".   Though I currently  have plenty of
more pressing jobs and projects at may hands,  I will eventually give it
a try.

Sincerely,
  Rainer



Re: FVWM: React to event "KeyPress Control_L, KeyRelease Control_L"

2020-04-13 Thread Dr Rainer Woitok
Dominik,

On Sunday, 2020-04-12 20:53:47 +0100, you wrote:

> ...
> No, binding things to modifier key does not work.

Thank you for this ultimate answer.   At least now I know  I can give up
trying.

Sincerely,
  Rainer



FVWM: React to event "KeyPress Control_L, KeyRelease Control_L"

2020-04-11 Thread Dr Rainer Woitok
Greetings,

is there a way in Fvwm to bind some command to just pressing and immedi-
ately releasing the Ctrl-key without pressing any other key?

Holding down Ctrl any pressing A should NOT trigger this command.

Sincerely,
  Rainer



Re: FVWM: Style ... SkipMapping

2019-11-25 Thread Dr Rainer Woitok
Thomas,

On Wednesday, 2019-11-20 14:59:22 +, you wrote:

> ...
> 1.  Launch firefox.  When it's running, use FvwmIdent or xwininfo to ascertain
> the *class* of the window.  It's either going to be Firefox or something else.
> If it's not 'Firefox' then you'll understand why the Style isn't matching.

The class IS "Firefox".

> 2.  Try adding:  EWMHIgnoreStateHints

Doesn't help:

$ grep Firefox ~/.fvwm/config
Style Firefox  EWMHIgnoreStateHints, FixedPPosition, SkipMapping
Style Firefox  PositionPlacement 0p $[_WINDOW_TOP_]p, StartsOnPage 0 0 1
$ FvwmCommand 'Read config'
$ nohup firefox > /dev/null 2>&1 &
$

This still immediately leaves  the current page  and displays page "0 1"
instead, where I can watch Firefox unfolding, and never goes back to the
original page.

Regarding EMWH I found the following in "man fvwm":

   -V | --version
   Prints the version of fvwm to stderr.  Also prints an information
   about the compiled in support for readline, rplay, stroke, xpm,
   png, svg, GNOME hints, EWMH hints, session management,
   bidirectional text, multibyte characters, xinerama and Xft aa font
   rendering.

So I did

$ fvwm -V
fvwm 2.6.5 compiled on Sep 28 2019 at 11:15:46
with support for: ReadLine, XPM, PNG, SVG, Shape, XShm, SM, XRender, XCursor, 
XFT, NLS

fvwm comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of fvwm under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
$

but without finding any hint regarding EWMH.   So maybe it's not config-
ured in my version  of "fvwm".   But then,  Gentoo doesn't offer any USE
flags for "fvwm" which suggest having to do with EWMH support.

What next?

Sincerely,
  Rainer



Re: FVWM: Style ... SkipMapping

2019-11-20 Thread Dr Rainer Woitok
Lucio,

On Wednesday, 2019-11-20 14:23:04 +0100, you wrote:

> ...
> No, sorry, I was not clear. It is the browser which goes straight to the 
> desktop designated, but I remain in the primary desktop ! Which I guess 
> is what you'd like. And what I get.

Well,  in my case it's just another page  in the same desktop.   I'm not
sure whether or not that matters.   But above of that  it's perhaps time
to compare Fvwm  and perhaps  also Firefox versions.   On my Gentoo dis-
tribution they are:

   Fvwm:2.6.5-r3
   Firefox: 70.0.1

What versions do you use on what distribution?

Sincerely,
  Rainer



Re: FVWM: Style ... SkipMapping

2019-11-20 Thread Dr Rainer Woitok
Greetings,

On Tuesday, 2019-11-19 00:43:08 +, Hegel3DReloaded wrote:

> ...
> Your problem appeared trivial to me, but I have tried this in a test
> environment and found VERY interesting behaviour:

FINALLY!  It started to feel like fighting windmills ... thankyou :-)

>   Firefox is desparately
> trying to get in focus and under the mouse when started. It goes to the
> desk and page we told it, SkipMapping works, but window program is jumping
> back to you like a stray dog for a peace of meat. It is fast, so you cannot
> see it without serious throttling of the CPU and GPU. I have tried couple 
> other
> applications, but none of them exercises this behaviour. Tried even with
> InitialMapCommand style - with that, we have more freedom for experimenting.
> ...
> This works as a workaround:
> Style Firefox InitialMapCommand Schedule 500 MoveToPage 1 1

Not here,  assuming the phrase "work" refers to Fvwm at least eventually
moving back to the desktop page  where my terminal window is waiting for
input.

> This:
> Style Firefox StartsOnPage 0 1 1, SkipMapping, InitialMapCommand Schedule 500 
> MoveToPage 1 1
> 
> will produce the following funny scenario:
> 
> - Firefox appears on X server
> - Immediately mapped by FVWM on page 1 1
> - It gets back to you like a dog
> - ~ 0.5 seconds later, FVWM will kick it back where it belongs. :)

Again, not here.   Whatever I do  I always end up perpetually staring at
Firefox sitting in the desktop page I have assigned to it.

Since this apparently  being a  Firefox rather than  an Fvwm problem,  I
solved it now by removing the useless  "FvwmCommand 'Style Firefox Skip-
Mapping'" before the "nohup firefox" command and adding

   sleep 3
   FvwmCommand 'GotoDeskAndPage prev'

after the "nohup firefox" command.  This may well be regarded as an ugly
hack, bu at least it works, even though it takes 3 seconds.

Sincerely,
  Rainer



Re: FVWM: Style ... SkipMapping

2019-11-20 Thread Dr Rainer Woitok
Lucio,

On Monday, 2019-11-18 19:00:56 +0100, you wrote:

> On Mon, 18 Nov 2019, Dr Rainer Woitok wrote:
> 
> >> Style Firefox   StartsOnDesk 1, SkipMapping, NoPPosition
> >>   + "I"   Test (Init) Exec exec /usr/bin/palemoon myhomepage
> >
> > And it works?

With "works" I meant it does respect "SkipMapping" and does NOT move to
desktop 1!  Does it do that?

Sincerely,
  Rainer



Re: FVWM: Style ... SkipMapping

2019-11-20 Thread Dr Rainer Woitok
Lucio,

On Monday, 2019-11-18 18:52:48 +0100, Lucio Chiappetti wrote:

> ...
> No idea why you start an application you always want NOT from InitFunction

Simply because I do NOT always want it :-)

> ...
> I even tried now starting firefox (not my palemoon browser which I left 
> running) with /usr/bin/firefox & and it went straight to the desktop 
> designates for browsers (due to the vestigial style).

That's exactly  what I'm  observing here,  too,  and what I simply don't
want.   I want Fvwm NOT to change desktops  when I start  Firefox during
login.  Maybe, I just didn't yet get my point accross ...

> ...
> If you are concerned of the runtime messages the browser may issue while 
> running (is that why you redirect stderr ?)

If you start a program using "nohup",  this command will create the file
"nohup.out" in the current directory, if both, standard output and error
are not taken care off.

Sincerely,
  Rainer



Re: FVWM: Style ... SkipMapping

2019-11-18 Thread Dr Rainer Woitok
Lucio,

On Monday, 2019-11-18 12:03:58 +0100, you wrote:

> ...
> The only point is do you really mean "page" or "desktop" ?

As can be seen from the "Style Firefox StartsOnPage 0 0 1" line I mean a
particular page on a particular desktop.

> ...
> I have this (actually also a vestigial FF line)
> 
> Style "Pale Moon"   StartsOnDesk 1, SkipMapping, NoPPosition
> Style Firefox   StartsOnDesk 1, SkipMapping, NoPPosition
> 
> and in my StartFunction
> 
>   + "I"   Test (Init) Exec exec /usr/bin/palemoon myhomepage

And it works?   Well, I have "FixedPPosition" rather than "NoPPosition".
Could that matter?   Or is the  relevent difference  that you  start the
browser from  within "fvwm"  while I'm  starting it  from within a shell
script?

Sincerely,
  Rainer



Re: FVWM: Style ... SkipMapping

2019-11-18 Thread Dr Rainer Woitok
Greetings,

On Saturday, 2019-11-16 16:42:01 +, Hegel3DReloaded wrote:

> ...
> You need to leave this page.

Well, when I'm there, I'll have to leave this page.  But I don't want to
get there in the first place.  That's why I used the "SkipMapping" style
which I THOUGHT would prevent exactly this.

>  Since this is probably in the InitFunction, then 
> simply:

No, as could be clearly seen,  it's not in the "InitFunction" but rather
in a shell script named "firefox-start-up.sh" which contains the command
"nohup firefox > /dev/null 2>&1 &".

But perhaps that's the cause?   Does "SkipMapping" only work for applic-
ations started from within the "fvwm" configuration file?   Could anyone
shed some light on this?

> ...
> Why not something like this in InitFunction or SessionInitFunction?
> 
> + I Exec exec firefox
> + I Wait Firefox
> + I Next (Firefox) MoveToPage 0 1

>From the "fvwm" manpage I gather that "Wait ..."  "causes execution of a
function to pause until a new window matching ... appears".

That's exactly what I  want NOT to do!   I do NOT want  to watch Firefox
waiting for the WiFi to become ready and then to reload all its tabs!  I
want to enter commands into my terminal window in another page instead!

By the way: could you please explain the purpose of the "Next (Firefox)"
clause after using  "Wait Firefox"  to wait until the window has mapped?
Why not just use a plain "MoveToPage 0 1" here?

Sincerely,
  Rainer



FVWM: Style ... SkipMapping

2019-11-16 Thread Dr Rainer Woitok
Greetings,

maybe I totally misinterpret the "fvwm" manpage ...

1. What I want:
   During the login process on my laptop I want to fire up Firefox using
   a page different  from the  default page  where my terminal window is
   opened.   This way  I can start  entering commands  without having to
   wait for Firefox loading all its tabs.

2. What I do:

   $ grep -C2 Firefox ~/.fvwm/config
   # Always position a "firefox" window on page "0 0 1":

   Style Firefox  FixedPPosition
   Style Firefox  PositionPlacement 0p $[_WINDOW_TOP_]p
   Style Firefox  StartsOnPage 0 0 1

   #
   $ grep -iC2 firefox firefox-start-up.sh
   # Finally start "firefox" in its own page without going there:

   FvwmCommand 'Style Firefox SkipMapping'
   nohup firefox > /dev/null 2>&1 &

3. What happens:
   Firefox is starting  in its own page,  but this page  is also the one
   shown on the screen rather than the page containing my terminal wind-
   ow.

4. Technical information:

   Gentoo, package x11-wm/fvwm, version 2.6.5-r3.

Cann anybody tell me what I have to do differently?

Sincerely,
  Rainer



Re: FVWM:

2018-02-28 Thread Dr Rainer Woitok
Michelle,

On Tuesday, 2018-02-27 21:44:13 +0200, you wrote:

> ...
> It does not even work, because the old FvwmTaskbar was AutoHiding  after
> it lost the focus,

I'm not quite sure  what exactly you want to achieve,  but "FvwmTaskBar"
DOES support auto-hiding, if you ask it to do so.


Sincerely,
  Rainer



[SOLVED] Re: FVWM: Causing "firefox" to start in particular desktop page

2018-02-28 Thread Dr Rainer Woitok
Dominik,

On Tuesday, 2018-02-27 14:36:45 +0100, you wrote:

> ...
> P.S.:  I have this in my config:
> 
>   Style Firefox* StartsOnPage 0 1, SkipMapping, MaxWindowSize 99 97
>   Style Firefox* fixedpposition

The "FixedPPosition" did the trick!  Thank you for the quick help :-)

>   Style Firefox* NoTransientPPosition, NoFuncHint

These two were not necessary  (at least not in my environment)  but they
didn't hurt either.

Sincerely,
  Rainer



FVWM: Causing "firefox" to start in particular desktop page

2018-02-27 Thread Dr Rainer Woitok
Greetings,

since a few days I'm trying to set up "fvwm" in such a way that a "fire-
fox" window is always opened in page "0 0 1" rather than in page "0 0 0"
from where I'm issuing the "firefox" command.   From the manual page and
the FAQ I took the suggestion to use

   Style Firefox* StartsOnPage 0 0 1, SkipMapping
   Style * RecaptureHonorsStartsOnPage, CaptureHonorsStartsOnPage

and added  this to my  configuration file  using all four  variations of
"Firefox*", "*Firefox", "*Firefox*", and "Firefox", but it simply didn't
work here.

What am I doing wrong?  Any pointers appreciated.

Technical information:

I'm running on Xubuntu 16.04 and basically use "/usr/bin/fvwm --replace"
to autostart "fvwm" upon login.  Both, "fvwm" and "firefox" come direct-
ly from the Ubuntu distribution.  Apart from that:

$ lsb_release -a 2> /dev/null | grep Ubuntu
Distributor ID: Ubuntu
Description:Ubuntu 16.04.3 LTS
$ uname -r
4.13.0-21-generic
$ fvwm --version | head -2
fvwm 2.6.5 compiled on Jan 26 2016 at 23:13:57
with support for: ReadLine, RPlay, Stroke, XPM, PNG, SVG, Shape, XShm, SM, Bidi 
text, Xinerama, XRender, XCursor, XFT, NLS
$ firefox --version
Mozilla Firefox 58.0.2

Sincerely,
  Rainer