You are not logged in.
Pages: 1
What I am trying to do is to automatically change the binded sink in pactl when listening to audio with bluetooth headphones. I am able to change the volume being outputted to my earphones by using pavucontrol, but when I try to change the volume with my keyboard it shows that I am changing the volume of my speakers. When I run
pactl list sinks it shows that I have two sinks: 0 and 1. I can manually change the sink used by pactl in i3 to my headphones, but it will become a pain having to do that manually every time I want to use my keyboard to change volume, so I was wondering if there was an easier way that would allow pactl to switch to the sink being used.
This is my ~/.config/i3/config file section:
# Multimedia Keys
# increase volume
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 0 +5%
# decrease volume
bindsym XF86AudioLowerVolume exec pactl set-sink-volume 0 -5%
# mute volume
bindsym XF86AudioMute exec pactl set-sink-mute 0 toggleAny help is appreciated.
Offline
I manipulated the fact that pactl lists the sinks in order they are connected. So, I wrote a script that basically greps the output of `pactl list sinks` and does `pactl set-sink-volume N +5%` only that N is replaced with the interface that is listed last. That does what I want.
Maybe there's a better way to do it. But, I really liked it when I was able to put together a bash script to solve something that I needed to do.
Offline
Pages: 1