#!/bin/bash
K(){ kill  `pgrep -f "yad --title=vol"`;}
K
amixer set Master toggle
amixer sget Master |grep off
if (( $? == 1 )) ;then
yad --title=vol --image="/usr/share/pixmaps/sound.svg"  --undecorated \
--no-buttons --geometry=-0 --timeout 2 --skip-taskbar --wrap --text "<b>
   Звук 
  включен</b>" &
else
yad --title=vol --image="/usr/share/pixmaps/speaker_0.svg"  --undecorated \
--no-buttons --geometry=-0 --timeout 2 --skip-taskbar --wrap --text "<b>
   Звук 
выключен</b>" &
fi
sleep 2 && K
