Subject: FVWM: SetTitleFormat

From: Tavis Ormandy <[email-masked]>
Date: Tue, 22 Feb 2005 23:59:27 +0000

I've been interested in changing the titles of some windows that don't
set a useful name, I thought some other users might find it
interesting...

It probably won't work on all windows, but it at least the fixed the
ones I needed to change :)

AddToFunc StartFunction I FvwmEvent FvwmEvent-Title

*FvwmEvent-Title: add_window SetTitleFunc
*FvwmEvent-Title: property_change SetTitleFunc

DestroyFunc SetTitleFormat
AddToFunc SetTitleFormat I AddToFunc SetTitleFunc I ThisWindow ($0) PipeRead \
    'echo "Exec xprop -id $[w.id] -set WM_NAME \'$1\'" | sed \
        -e "s#%t#$[w.name]#g" \
        -e "s#%i#$[w.iconname]#g" \
        -e "s#%I#$[w.id]#g" \
        -e "s#%c#$[w.class]#g" \
        -e "s#%w#$[w.width]#g" \
        -e "s#%h#$[w.height]#g"'

SetTitleFormat XTerm "This is an %c, it is %wx%h, id: %I"
SetTitleFormat XCalc "1+1=2"

Which set's the title on xterm's to something like 

	"This is an XTerm, it is 644x340, id: 0x3400003"

It could easily be adopted to set iconname on iconify or similar if 
required :)

-- 
-------------------------------------
[email-masked] | finger me for my gpg key.
-------------------------------------------------------
--
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 [email-masked].
To report problems, send mail to [email-masked].