dotfiles

*nix config files
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

ptt (409B)


      1 #!/bin/sh
      2 
      3 ptt_cmd=$(amixer set Capture toggle >/dev/null)
      4 
      5 set_nocap() {
      6 	/usr/bin/dunstctl close
      7 	/usr/bin/notify-send -u 'normal' 'muted'
      8 	/usr/bin/amixer set Capture nocap >/dev/null
      9 }
     10 
     11 set_cap() {
     12 	/usr/bin/notify-send -u 'critical' 'unmuted'
     13 	/usr/bin/amixer set Capture cap >/dev/null
     14 }
     15 
     16 case $(amixer get Capture | tail -n1 | awk '{print $NF}' | tr -d '[]') in
     17 	off) set_nocap ;;
     18 	on) set_cap ;;
     19 esac