#!/bin/sh # # PreLaunch -- make kopete show the game and server you are currently playing on # when starting a game from XQF # # usage : # copy this file to ~/.qf/PreLaunch, chmod+x and make sure that XQF creates the launchinfo file and # executes this file as prelaunch script (XQF -> preferences -> gereneral -> ...when launching a game ) ##### settings ##### YOURNAME="spirit" YOURNICK="dichtfux" ##### get info ##### XQFHOME="$HOME/.qf" INFOFILE="$XQFHOME/LaunchInfo.txt" if [ ! -r $INFOFILE ]; then echo "infofile not found at $INFOFILE. using default message." STATUS="$YOURNAME is playing online games. his nick is $YOURNICK." else GAME=$(grep ^GameType $INFOFILE | sed s/GameType//) MOD=$(grep ^ServerMod $INFOFILE | sed s/ServerMod//) SRVADR=$(grep ^ServerAddr $INFOFILE | sed s/ServerAddr//) SRVNAME=$(grep ^ServerName $INFOFILE | sed s/ServerName//) STATUS="$YOURNAME is playing $GAME $MOD on a server named $SRVNAME ($SRVADR ). \ his nickname is currently $YOURNICK." fi ##### show info ##### dcop kopete KopeteIface setAway "$STATUS" echo "set kopete away message to : \"$STATUS\""