Re: FVWM: (Icon)TitleFormat doesnt quite work like IndexedWindowName for one window
2011/10/29 Thomas Adam tho...@fvwm.org: On Sat, Oct 29, 2011 at 10:38:36PM +0200, Michael Großer wrote: Thomas Adam wrote: On Sat, Oct 29, 2011 at 12:37:04PM +0100, Harry portobello wrote: hullo, On 19 October 2011 18:51, elliot s elliot...@gmail.com wrote: Version 2.6.3: Previous versions only added the (%t) when there was a repeated name. The new code always adds it. I worked around the %t in add_window.c by checking if count was non-zero, tho that wouldnt kill the parens, which i changed to a space in my fvwmrc. the patch with this email i have written stops the number of window if it is 1 - but what must i do to delete the brackets? [...] I'm still not going to fix this; there is nothing broken. Maybe, Harry should politely ask for a new feature? If there are people who need such kind of behaviour, then the specification could be extended with a new option, maybe a switch? It's a count -- the number of windows matching a condition. It was a bug in the original that it never put the number 1 there for a single instance. Adding in a flag is confusing and rather amusing to document why. If you *really* can't live without this, script it with FvwmEvent. How do i do this with FvwmEvent? Thanks.. Harry
Re: FVWM: (Icon)TitleFormat doesnt quite work like IndexedWindowName for one window
hullo, 2011/10/30 Thomas Adam tho...@fvwm.org: On Sun, Oct 30, 2011 at 08:09:52PM +, Harry portobello wrote: How do i do this with FvwmEvent? Thanks.. Something like: DestroyFunc CountWindow AddToFunc CountWindow + I SetEnv WindowCount 0 + I All ($[w.class], !Transient) PipeRead \ `echo SetEnv WindowCount ((WindowCount + 1))` + I PipeRead `[ $WindowCount = 1 ] echo \ WindowStyle TitleFormat %n || echo Nop` + I UnsetEnv WindowCount DestroyModuleConfig FE-tweakttformat *FE-tweakttformat: add_window CountWindow AddToFunc StartFunction I Module FvwmEvent FE-tweakttformat Change to suit your needs. I have not tested this myself. this works but is complex. can you tell me how it works? would be nice still for such things to be part of %t for titleformat Harry
Re: FVWM: (Icon)TitleFormat doesnt quite work like IndexedWindowName for one window
2011/10/30 Thomas Adam tho...@fvwm.org: `echo SetEnv WindowCount ((WindowCount + 1))` Nice to see that there is an alternative way to perform calculations without the use of bc. This idea could eliminate a dependency of my FVWM scripts ;-)