dotfiles/.local/bin/toggle-beep
2020-02-05 19:30:25 +01:00

13 lines
262 B
Bash
Executable file

#!/bin/bash
dunstid=$(sum <<<beep | cut -d' ' -f1)
result=$(sudo modprobe -vr pcspkr)
if [[ -z "$result" ]]
then
sudo modprobe -v pcspkr &>/dev/null
sleep .5
dunstify -u low -r "$dunstid" Beep Activé
else
dunstify -u low -r "$dunstid" Beep Désactivé
fi