You are not logged in.
Stole this script to display my current windows using dzen2, On an eee I have not got much screenspace, hence the cut commands I added in myself, for some reason though it does not work on my current window. The one that does not work is commented at the moment.
#!/bin/bash
WINDOWS=`ratpoison -c "windows"`
echo "$WINDOWS" |
while read name; do
if [[ "$name" =~ "*" ]]
then
#name=`echo $name | cut -c 1-20`
echo -n "^fg(#00FF00)^bg(#000000)$name^fg()^bg() | "
else
if [[ "$name" =~ "+" ]]
then
name=`echo $name | cut -c 1-20`
echo -n "^fg(#FF0000)^bg(#000000)$name^fg()^bg() | "
else
if [[ "$name" =~ "-" ]]
then
name=`echo $name | cut -c 1-20`
echo -n "^fg(#FF0000)^bg(#000000)$name^fg()^bg() | "
else
if [ "$name" = "No managed windows" ]
then
echo -n "^fg(#FFFFFF)^bg(#000000)$name^fg()^bg() | "
fi
fi
fi
fi
done
Offline