Add Item question

Ralph Alvy ralvy at warpmail.net
Thu Oct 30 23:06:21 CET 2003


Ah yes. I thought it might be something like the on/off icons in KDE, where 
one shows you the device is mounted and other unmounted. Thanks.

On Thursday 30 October 2003 01:56 pm, Amarpreet Rattan wrote:
> two state launchers are kind of neat.  I use them for mounting and
> unmounting stuff.  I don't know who it was some posts ago, but the posted
> some code that essentially tells you if something is mounted (on) or
> unmounted (off).  if it is not mounted and there is media in the drive, it
> will mount it, and if it is already mounted it will unmount and eject it.
> here is the code that was posted.  I use it for both my cdrom and digital
> camera (with appropriate adjustments).
>
> --------------------------
>
> #!/bin/sh
> # script to mount/umount cdrom
> # for use with xfce4-trigger-launcher
> if [ "$1" = "1" ]; then
>     mount /mnt/cdrom &> /dev/null
> elif [ "$1" = "0" ]; then
>     eject /mnt/cdrom &> /dev/null
> else
>     STATUS=`grep cdrom /proc/mounts`
>     if [ "x$STATUS" = "x" ]; then
>         echo 0
>     else
>         echo 1
>     fi
> fi
> -----------------------------
>
> I like it because one click mounts/umounts stuff.
>
> amps.
>
> On Thu, 30 Oct 2003, Ralph Alvy wrote:
> >
> > I also don't know exactly what a Two-state launcher is.
> >




More information about the Xfce mailing list