Re: FVWM: toggle decor with key-shortcut (focused window)

From: George \ <nephrite_at_inbox.ru>
Date: Fri, 13 Feb 2004 12:09:20 +0300

On Fri, Feb 13, 2004 at 09:28:06AM +0100, calmar wrote:

> actually I'm new to fvwm, so I would be happy when someone could
> tell me where and how to find solutions to such questions too :)
>
> How can I setup a key to toggle the decor of a window?
>
> What I found out so far:
>
> with
>
> Style windowname !Borders
> Styel windowname NoTitle
>
> I get a window without any `decoration.
>
> I would set up a key like this:
>
> Key D A 1 Style windowname !Borders, NoTitle
>
> here are my problems:
> I don't want a specific windowname, but the focused window,
> I would like to toggle the state maybe, not just removing.

I don't know about 2.4.* versions but in 2.5.8 you can use

Key D A 1 Current WindowStyle !Borders, NoTitle

to switch off decor for only one window (note the WindowStyle command which
appeared only in 2.5.8)

To toggle decor you should use more sophisticated approach... Setting states
maybe? They are present in stable version as well. Like this

DestroyFunc DecorOn
AddToFunc DecorOn
+ I State 1 off
+ I Style Borders, Title

DestroyFunc DecorOff
AddToFunc DecorOff
+ I State 1 on
+ I Style !Borders, NoTitle

DestroyFunc ToggleDecor
AddToFunc ToggleDecor
+ I Current (State 1) DecorOff
+ I TestRc (NoMatch) DecorOn

Here we use state 1 to remember the fact that we have previously removed
decor from window.

Also, read the fvwm documentation - it's very well written and contains
everything you'd need.

-- 
George 'Nephrite' Potapov
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Fri Feb 13 2004 - 03:11:38 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:56 BST