tgru...@gmail.com (Todd Gruhn) writes: >This can write text to the top of the xterm: > xterm*Title: >Is it possible to get todays date , and pass it in to xterm*Title ? >Can this be done from inside of .Xresources ?
.Xresources is a file that is usually read once when you log in. Your session script (or the system-wide one) calls the xrdb program for this. You could add a call like: date +"xterm*Title: xterm-%Y%m%d" | xrdb to set the resource value. The result of course will be that the date whenever you logged in is used statically as the title of all xterms. It doesn't become a live calendar or clock nor does it refer to the start of the xterm. Programs may change the title of xterm at runtime by printing a special escape sequence. For example in tcsh, if you define alias xtitle printf "'\e]0;%s\a'" then xtitle `date +"xterm-%Y%m%d"` will change the title to include the current date. Some people will even put that sequence into their prompt string, so the title is changed on every command. You can set "XTerm.vt100.allowTitleOps: false" to prevent this kind of dynamic title change.