Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Feb 2007 21:32:05 +0100
From:      Olivier Regnier <oregnier@steelbox.org>
To:        freebsd-questions@freebsd.org
Subject:   Idesk - trash icon
Message-ID:  <45D371C5.9010905@steelbox.org>

next in thread | raw e-mail | index | archive | help
Hello,

I installed Idesk to show differents icons on my desktop with Openbox 3 
and FreeBSD 6.2. I have a file called trash.lnk with the content:

table Icon
    Caption: Trash
    Icon: /home/olivier/.idesktop/icons/emptytrash.png
    Width: 48
    Height: 48
    X: 347
    Y: 660
    Command[0]: thunar trash:///
    Command[1]: /home/olivier/.scripts/./checktrash.sh
end

and here my script called checktrash.sh : (for the moment, I do not 
erase any files. I test only the presence of files and i post the good 
icon on the desktop.

#!/bin/sh
ls -A /home/olivier/.local/share/Trash/files/ | grep . >/dev/null
if [ $? -eq 0 ]; then
    perl -i.bak -pe 's/emptytrash/fulltrash/g' 
/home/olivier/.idesktop/trash.lnk
else
    perl -i.bak -pe 's/fulltrash/emptytrash/g' 
/home/olivier/.idesktop/trash.lnk
fi

When i launch Openbox, the script works fine but i have a problem  when  
i empty  the trash with the mouse, idesk doesn't put up-to-date my icon.

Can you help me please ?

Thank you :)

-- 
Cheers,
Olivier Regnier




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45D371C5.9010905>