Skip to content

Instantly share code, notes, and snippets.

@nv1t
Created April 9, 2021 08:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nv1t/3632daa85ece50fe3a0e701db2e680fc to your computer and use it in GitHub Desktop.
Save nv1t/3632daa85ece50fe3a0e701db2e680fc to your computer and use it in GitHub Desktop.
it uses xdotool to activate the Teams window and mute/toggle the microphone. It puts the mouse back to the position.
function mute() {
eval $(xdotool getmouselocation --shell)
pids=$(xdotool search --name "Microsoft Teams" | sort | uniq | head -n 1)
xdotool windowactivate $pids
xdotool key "ctrl+shift+m"
xdotool mousemove --sync $(( 0.1+$X )) $(( 0.1 + $Y ));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment