Commit a29767b6 authored by Jan Hensel's avatar Jan Hensel 🐧
Browse files

scripts: Update loopback toggle

parent e7df3690
#!/bin/bash
varfile='/home/ztf/scripts/.vars/lbt'
varfile="${HOME}/.vars/lbt"
_exit_because_monitor() {
mpv /usr/share/sounds/freedesktop/stereo/dialog-error.oga > /dev/null &
notify-send -t 1000 -u critical "default source is a monitor?"
exit 1
}
pactl get-default-source | grep -i "monitor" && _exit_because_monitor
if [[ $(cat "${varfile}") == *on* ]]; then
echo -n 'off' > "${varfile}"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment