You are not logged in.
Hi,
Is it possible to change the window name of an running urxvt-terminal via external script (as in: not running in the urxvt-terminal itself)?
I have no idea how i could do that ... is it even possible at all?
EDIT:
Why?
To change the name/title of a urxvt-terminal running mcabber when a new incoming message is detected ...
Thanks, atcq
Last edited by atcq (2009-04-24 12:53:41)
Offline
just found this on google:
add:
function shdr {
if [ "$TERM" = "xterm" -o "$TERM" = "rxvt" -o "$TERM" = "rxvt-unicode"] ; then
printf '\033]2;'$*'\07'
fi
}
to bashrc
(thanks for posting this thread, i've been wondering how to do that, too)
Last edited by robmaloy (2009-04-24 10:26:42)
☃ Snowman ☃
Offline
sure.. this is true for the first start of the terminal ... and you can also do that by using the -name NAME option of urxvt!
i wanted to change a specific terminals (say started with the -name mcabber option) window_name!
found a solution which doesn't work with openbox , had it tested by someone running debian and xfce ... maybe it works with arch and xfce, too!
no idea why it won't work in openbox though!
you need community/wmctrl
pacman -S wmctrl
to use it in mcabber:
~/.mcabber/mcabberrc
set events_command = ~/.mcabber/eventcmd
set events_ignore_active_window = 1 # not necessarily needed!
needs to be set
~/.mcabber/eventcmd
#!/bin/bash
# testing if message is an incoming message from JID
if [ "$2" == IN ]; then
wmctrl -r mcabber -T "new msg from $3 - mcabber"
fi
# resetting window_name to default if all messages are read
if [ "$1" == UNREAD -a "$2" == 0 ]; then
wmctrl -r mcabber -T "mcabber"
fi
exit 0
instead of changing the name of urxvt, i now use notify-send with xfce4-notifyd to notify me about new messages in mcabber ...
maybe it helps someone else ... i'm fine with notify-send!
Last edited by atcq (2009-04-24 12:52:06)
Offline