Files
dotfiles/.local/bin/wifi-mute
Julian Prein 00927c8921 *: Use tabs for indentation where appropriate
I am a big supporter of the approach to indent with tabs and align with
spaces. (Read [here][1] f.e.) Thus at some places a simple `s/ {4}/\t/g`
(replace 4 with whatever fits) is not enough and a bit more thought is
needed. Because of that there are still places where I plan to
substitute the whitespace in the future.

This patch contains exclusively whitespace changes. Check for yourself
with `git diff --ignore-all-space`.

[1]: https://dmitryfrank.com/articles/indent_with_tabs_align_with_spaces
2022-06-23 23:59:01 +02:00

11 lines
258 B
Bash
Executable File

#!/usr/bin/env bash
# This runs as a crontab every 5minutes
# ('*/5 * * * * /usr/local/bin/wifi-mute')
if [[ "$(nmcli -t -f name con show --active)" =~ eduroam* ]]; then # iwgetid -r
# TODO: mute only speaker, not headphones
amixer set Master mute
fi