[lastbash-cvs] lastbash lastbash,1.114,1.115
Status: Beta
Brought to you by:
cstroie
|
From: Costin S. <cs...@us...> - 2007-01-24 15:22:18
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv15992 Modified Files: lastbash Log Message: Set the screen window title. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.114 retrieving revision 1.115 diff -u -d -r1.114 -r1.115 --- lastbash 24 Jan 2007 13:17:55 -0000 1.114 +++ lastbash 24 Jan 2007 15:22:14 -0000 1.115 @@ -129,17 +129,22 @@ debug "--------------------------------------------------------" } -# Function: Set the xterm title {{{1 +# Function: Set the terminal title {{{1 #----------------------------------------------------------------------------- function set_term_title() { - # Set the title for xterm and rxvt + # $1 - new terminal title + if [ "${TERM:0:5}" == "xterm" ] || [ "${TERM:0:4}" == "rxvt" ] then + # Set the title for xterm and rxvt echo -ne "\e]0;$1\a" elif [ "${TERM:0:6}" == "screen" ] then - echo -ne "\e^$1\e\\" + # Set the window title + echo -ne "\ek$1\e\\" + # Set the window hardstatus + echo -ne "\e]0;$1\a" fi } @@ -147,6 +152,8 @@ #----------------------------------------------------------------------------- function save_nowplaying() { + # $1 - string to save in the now_playing file + [ "${SAVE_NOWPLAYING}" == "y" ] && echo -n "$1" > "${NOWPLAYING_FILE}" } |