config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

mute (231B)


      1 #!/bin/sh
      2 # Copyright 2023 Jacob R. Edwards <jacob@jacobedwards.org>
      3 # Mute and unmute audio
      4 
      5 if vol | awk '$2 == 0 { exit 1 }'
      6 then
      7 	vol 0 > /tmp/unmute
      8 elif test -f /tmp/unmute
      9 then
     10 	sh /tmp/unmute > /dev/null
     11 	rm /tmp/unmute
     12 fi