Hi. A linux dc-client named 'linuxdcpp' when somebody write something in
chat can highlight tag where he running, he renamed tag from 'linuxdcpp' to
'*linuxdcpp'.
I thought it a good idea if my icq or irc clients may highlights tags too
and i've written a little and ugly bash script:

#!/bin/bash
> # Highlight script for wmii; author hshhhhh; e-mail: spam...@hshhhhh.name
> # Usage: wmii_highlight tagname
>
> HIGHLIGHT_PREFIX='* '
> HIGHLIGHT_POSTFIX=''
>
> if [ $# -ne 1 ]; then
>    exit
> fi



IS_TAG_EXISTS=0
> for i in $( wmiir ls /lbar/ ); do
>    if [ "$1" = "$i" ]; then
>       IS_TAG_EXISTS=1
>    fi
> done
>
> if [ $IS_TAG_EXISTS -ne 1 ]; then
>    exit
> fi
>
> if [ "$1" = "$(wmiir read /tag/sel/ctl | head -n 1)" ]; then
>    exit
> else
>    `wmiir xwrite /lbar/$1 "$HIGHLIGHT_PREFIX""$1""$HIGHLIGHT_POSTFIX"`
> fi
> exit
>

Reply via email to