#!/bin/bash

VOL=`dcop kmix Mixer0 masterVolume`
FILE=$HOME/.oldvol

if [ $VOL == '0' ] ; then
	if [ -f $FILE ] ; then
		dcop kmix Mixer0 setMasterVolume `cat $FILE`
	else
		dcop kmix Mixer0 setMasterVolume 60
	fi
else
	echo $VOL > $FILE
	dcop kmix Mixer0 setMasterVolume 0
fi
	
