#! /usr/bin/zsh # This small script renames the konsole tab to the commands' last argument typeset -a args cmd=`basename $0` args=$@ lastarg="${args[(w)-1]}" if [ -n "$KONSOLE_DCOP_SESSION" ] then dcop ${KONSOLE_DCOP_SESSION} renameSession "$lastarg" elif [ -n "$KONSOLE_DBUS_SESSION" ] then qdbus ${KONSOLE_DBUS_SERVICE} ${KONSOLE_DBUS_SESSION} setTitle 0 "$lastarg" > /dev/null qdbus ${KONSOLE_DBUS_SERVICE} ${KONSOLE_DBUS_SESSION} setTitle 1 "$lastarg" > /dev/null fi exec $cmd "$@"