Changing styles without restart

Hi,

I’m have a question:
Can I change style of runnings app without restart it or restart fvwm?
I’m going to do one thing:
If I click [alt]+[z], FvwmPager will be on top, if I click [alt]+[x], It will be on bottom of the screen.

Thanks:)

Use FvwmCommand or FvwmConsole. Both are documented in the man.

FvwmCommand allows you to type instructions directly from the command line. For example
FvwmCommand ‘All (!shaded) WindowShade’
will shade all the windows.
FvwmCommand ‘All (FvwmPager) Move -0p -0p’
will put the pager at the bottom right of the screen.
To enable the use of FvwmCommand,
you must put the following line in your .fvwm2rc :

AddToFunc StartFunction “I” Module FvwmCommandS

FvwmConsole gives you a console which will execute
any Fvwm code written in the console. Add to your
.fvwm2rc file something like :

AddToMenu RootMenu “Console” Module FvwmConsole -terminal xterm -geometry 80x8 -sb -sl 1000

to get a menu launching the console. Note that the use of the console
is more user friendly if you have compiled fvwm with readline support.

That’s what the ChangeDecor command is for.

Why not just use the one key-binding, using the RaiseLower command.

– Thomas Adam

It is works, but it:

FvwmCommand 'Style FvwmPager StaysOnBottom'

No, if i want to use this, i will have to restart FvwmPager.

@thomasadam - Yes, one bind witch only do raise or lower is good idea, but how to do this:

First click [alt]+[x]:
FvwmPager will be move, (AnimatedMove from bottom of the screen (will be not visible) to +14+539) stay on top.

Second click:
FvwmPager will be moved from +14+539 to bottom of the screen, style will change to StaysOnBottom and Fvwm Pager will be moved to +14+539

Third click:
FvwmPager will be moved to bottom of the screen.

That is all:)

In the past i had small script which made it:

#!/bin/sh
pager=`cat /tmp/togglepager.txt`

if [ $pager = "1" ]
	then
		FvwmCommand 'Killmodule FvwmPager';
		FvwmCommand 'Style FvwmPager StaysOnBottom';
		FvwmCommand 'FvwmPager' &&
		sleep 0.1s
		FvwmCommand "Test All (FvwmPager) AnimatedMove keep 569p";
		echo 0 > /tmp/togglepager.txt;
		exit 0
fi;

if [ $pager = "0" ]
	then	
		FvwmCommand 'Killmodule FvwmPager';
		FvwmCommand 'Style FvwmPager StaysOnTop';
		FvwmCommand 'FvwmPager' &&
		sleep 0.1s
		FvwmCommand "Test All (FvwmPager) AnimatedMove keep 569p";
		echo 2 > /tmp/togglepager.txt;
		exit 0
fi;

if [ $pager = "2" ]
	then	
		FvwmCommand 'Killmodule FvwmPager';
		echo 1 > /tmp/togglepager.txt;
		exit 0
fi;

But it was very CPU hog and amateur like my English now;)

I don’t know why FvwmCommand has been suggested to you. It’s completely irrelevant here. Note that as an aside, the reason why the Style command above is no good to you is because they’re only applied pre-mapping of a client. If you want to change the Style of a running application, this is what the WindowStyle command is used for, and uses the window’s ID instead as a tracker. Hence it only ever lasts as long as the lifetime of the client does, given that a window is assigned a unique ID again as it is mapped.

Use a function, of course.

DestroyFunc SomeFunc
AddToFunc   SomeFunc
+ I Next (FvwmPager) AnimatedMove 14 34
+ I TestRc (Match) Next (FvwmPager, Layer 0) Layer 0 10
+ I TestRc (Match) Break
+ I Next (FvwmPager, Layer 10) Layer 0 0
+ I TestRc (Match) Next (FvwmPager) AnimatedMove -0 -0
+ I TestRc (NoMatch) Next (FvwmPager, Layer 4) Layer 0 10

– Thomas Adam

Certainly it is; read the faq 7.1: http://www.fvwm.org/documentation/faq/#7.1
But maybe I am confused by the question.
I didn’t understand if you want your pager to move from an hidden
place at the bottom of the screen or if you want the pager
to stay in front of the other windows (this is what the styles options
StaysOnTop/StaysOnBottom are made for).

If you want your pager to hide at the bottom of the screen,
and then to appear when you hit a key, or if you hit the
bottom of the screen, then you may have a look to the
faq 7.17 http://www.fvwm.org/documentation/faq/#7.17

Cheers

I think he want’s the pager visible at the bottom of the desktop, and then raised to the top at the desktop on some binding.

I myself have the pager on layer 1 (bottom most) during normal operation, and have it raised to lyer 7 (top most) when I move my mouse to an edge, and lowerd again when I leave the edge, if I don’t enter the pager window, or when I leave the pager window. For this I use the Layer command.

i used layer command, but i need to spend some time with fvwm, because im new at it… Tommorow i will go skiing for week, and i won’t take my PC with me. Thanks all, my config coming soon:)