# .bashrc

#if [ "$PS1" -a ! -z "$DISPLAY" -a -S /tmp/ns.$USER.$DISPLAY/wmii ] ; then

if [ "$PS1" -a ! -z "$DISPLAY" -a ! -z "$WMII_ADDRESS" ] ; then

        echo "setting up wmii shortcuts" >&2

        # http://www.dmo.ca/blog/20070111010218
        function on () 
        {
                TAG=$1
                shift
                echo "NextWindowTags $TAG" | wmiir write /event

                $*
        }

        function cd () 
        { 
                builtin cd $@ \
                && \
                ( echo "ShellChangeDir $PWD" | wmiir write /event )
        }

fi



