View previous topic :: View next topic |
Author |
Message |
nivw Apprentice
Joined: 09 Nov 2005 Posts: 261
|
Posted: Sun Sep 04, 2011 10:01 am Post subject: tip: mute speakers when at work |
|
|
here is a small hack that makes the laptop notice its at work and so mute the speakers.
so when it starts playing music , i hear it only in my bluetooth headset:
pre requirements:
1. I am using network manager
2. I am using pulse audio
3. I know my WORK_DOMAIN (ask the sys admin or see for yourself)
create this file:
/etc/NetworkManager/dispatcher.d/10mute_at_work
Code: |
[ "$DHCP4_DOMAIN_NAME" != "WORK_DOMAIN" ] && exit 0
case "$2" in
up)
pactl set-card-profile 0 "input:analog-stereo"
;;
esac |
now chmod +x /etc/NetworkManager/dispatcher.d/10mute_at_work
when you connect it will run the pactl command that will cause the onboard audio to act as a microphone only |
|
Back to top |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Sun Sep 04, 2011 11:34 am Post subject: |
|
|
Moved from Portage & Programming to Documentation, Tips & Tricks as it fits better here. _________________ Search | Read | Answer | Report | Strip |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|