Newbie Window Decor Scripting Problems


i am trying to write my own window decor but i cant get it working.

screenshot: cant make a screenshot with windows in it. i always just get a screenshot with only the wallpaper.


  • i have no borders although i have defined a pixmap for borders
  • my titlebar has text in it, i dont want that and it doesnt have the pixmap, that i defined
  • buttons are working fine

i would really appreciate any help. after days of search in forum and google i havent found an answer. because every window decoration code look is written otherwise. and i need the code written to be understood from metisse. i dont know if theres a difference between fvwm and metisse


my code:

[code]# ImagePath +:$[HOME]/.fvwm-metisse/window/prelude4/
SetEnv XPMPath $[HOME]/.fvwm-metisse/window/prelude4/

Style * MwmButtons

Style * BorderWidth 0, HandleWidth 0
Style * FvwmBorder
Style * TitleBordersUseTitleDecor

Style * StickyStippledTitle, StickyStippledIconTitle

Style * Button 1, NoButton 3, NoButton 5, NoButton 7, NoButton 9,
Button 2, Button 4, Button 6, NoButton 8

Style * NoTitle

Style * BorderColorset, HilightBorderColorset

BorderStyle ActiveUp (TiledPixmap $[XPMPath]/border-active.xpm)
ActiveDown (TiledPixmap $[XPMPath]/border-active.xpm)
BorderStyle Inactive Pixmap $[XPMPath]/border-inactive.xpm

TitleStyle Height 3
TitleStyle ActiveUp Pixmap $[XPMPath]/border-active.xpm
TitleStyle ActiveDown Pixmap $[XPMPath]/border-active.xpm
TitleStyle Inactive Pixmap $[XPMPath]/border-inactive.xpm

ButtonStyle 1 ActiveUp Pixmap $[XPMPath]/menu-active.xpm – Flat
ButtonStyle 1 ActiveDown Pixmap $[XPMPath]/menu-pressed.xpm – Flat
ButtonStyle 1 Inactive Pixmap $[XPMPath]/menu-inactive.xpm – Flat

ButtonStyle 2 ActiveUp Pixmap $[XPMPath]/close-active.xpm – Flat
ButtonStyle 2 ActiveDown Pixmap $[XPMPath]/close-pressed.xpm – Flat
ButtonStyle 2 Inactive Pixmap $[XPMPath]/close-inactive.xpm – Flat

ButtonStyle 4 ActiveUp Pixmap $[XPMPath]/maximize-active.xpm – Flat
ButtonStyle 4 ActiveDown Pixmap $[XPMPath]/maximize-pressed.xpm – Flat
ButtonStyle 4 Inactive Pixmap $[XPMPath]/maximize-inactive.xpm – Flat

ButtonStyle 4 ToggledActiveUp Pixmap $[XPMPath]/maximize-toggled-active.xpm – Flat
ButtonStyle 4 ToggledActiveDown Pixmap $[XPMPath]/maximize-toggled-pressed.xpm – Flat
ButtonStyle 4 ToggledInactive Pixmap $[XPMPath]/maximize-toggled-inactive.xpm – Flat

ButtonStyle 6 ActiveUp Pixmap $[XPMPath]/hide-active.xpm – Flat
ButtonStyle 6 ActiveDown Pixmap $[XPMPath]/hide-pressed.xpm – Flat
ButtonStyle 6 Inactive Pixmap $[XPMPath]/hide-inactive.xpm – Flat

#ButtonStyle All – Flat UseTitleStyle

#ButtonStyle All - Clear
#ButtonStyle 1 - MwmDecorMenu
#ButtonStyle 4 - MwmDecorMax

Mouse 1 2 A AFuncButtonClose
Mouse 2 2 A AFuncButtonClose2
Mouse 3 2 A AFuncButtonClose3

Mouse 1 4 A AFuncButtonMaximize
Mouse 2 4 A AFuncButtonMaximize2
Mouse 3 4 A AFuncButtonMaximize3
Mouse 4 4 A AFuncButtonMaximize4
Mouse 5 4 A AFuncButtonMaximize5

Mouse 1 4 S AFuncButtonMaximizeShift


Mouse 1 6 A AFuncButtonMinimize
Mouse 2 6 A AFuncButtonMinimize2
Mouse 3 6 A AFuncButtonMinimize3
Mouse 4 6 A AFuncButtonMinimize4
Mouse 5 6 A AFuncButtonMinimize5


Mouse 1 1 A AFuncButtonMenu Close
Mouse 2 1 A AFuncButtonMenu2
Mouse 3 1 A AFuncButtonMenu3

remove button 3

Mouse 1 3 A -
Mouse 2 3 A -
Mouse 3 3 A -

remove button 5

Mouse 1 5 A -
Mouse 2 5 A -
Mouse 3 5 A -

remove button 7

Mouse 1 7 A -
Mouse 2 7 A -
Mouse 3 7 A -[/code]

But you have this:

Style * BorderWidth 0, HandleWidth 0

Which turns off borders and handles so you’ll probably want to remove this.

– Thomas Adam

yes youre right. uncommented it and i had a border. but the border is 3times as large as needed.
i think i see my pixmap between to blue borders in the middle of the border.
like this:

border i do not know | pixmap | border i do not know

changing the 0 in other pixelsizes like 3 (thats what i want) or even 20 doesnt change the boldness or the look of the border

edit: perhaps i havent to take a pixmap. i want a border around the window with 3pixel bold. on all 4 sides. no text, no miniicon and i have pixmaps for buttons which are 3 pixel bold. and the should appear in the upper right corner in the title. the buttons appear but the title has a height of approximately 25 pixel…

See ShrunkPixmap and/or AdjustedPixmap

– Thomas Adam

if i use this command in the borderstyle or titlestyle section it doesnt have an effect.
if i use it in the buttonstyle section it resizes my buttons bigger as i want it.

i will search in the commands section, perhaps i find something useful.

the first command i would like is how to remove the titletext. but that i didnt found until now in the commands…

Correct. I forget you were referring to the borders.

I certainly can’t reproduce what you’re seeing – so I suspect you’ve some oddity interferring with it which you’re not mentioning, as is typical of people asking such questions. Is what you’ve posted your entire FVWM configuration, or have you "“helpfully” elided most of it?

You will not find anything useful to help you here.

That’s because none exist. You can’t just remove title names, not even using magic trickery of xprop -set WM_NAME “” – not all client support that. Instead you can fake it by sett the same bg/fg in your colorset for the window.

Colorset n fg white, bg white
WindowStyle Colorset n

– Thomas Adam

ah ok. and i can make the titlename into a size so my title can be 3 pixel high?!

i have no single fvmrc file. i use metisse and its split up in many config files.
the file i have posted is only my configuration file for window decoration.
i have many other files until now i dont know if they interact with the decor-config file in any way.

i tested some other fvwm configs for window decoration and none works 100%. so as you mentioned it has to be something out of this single config file…

i have found this snippet in a config file

[code][# NO manual placement!
Style * MinOverlapPercentPlacement

this the default but for sticky (1) and strut (50)

normal ontop icon sticky below strut

Style * MinOverlapPlacementPenalties 1 5 10 0.05 0.05 50000

The default

cover_100 cover_95 cover_85 cover_75

Style * MinOverlapPercentPlacementPenalties 12 6 4 1

Style * IndexedWindowName, IndexedIconName
Style * DecorateTransient

respect MWM, OL and GNOME hints

Style * OLDecor, NoOverride, MwmFunctions, GNOMEUseHints, MwmDecor

but not the Mwm Decor?

#Style * NoDecorHint
Style * MwmDecor[/code]

and i have a file with the whole colorset definitions but as i used no colorset in the decor config i dont think that the file is guilty for making my decors so ugly :slight_smile: