Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jan Hensel
dotfiles
Commits
a29767b6
Commit
a29767b6
authored
Jul 05, 2022
by
Jan Hensel
🐧
Browse files
scripts: Update loopback toggle
parent
e7df3690
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/loopbacktoggle.sh
View file @
a29767b6
#!/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
}
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment