24 lines
554 B
Bash
Executable file
24 lines
554 B
Bash
Executable file
#!/bin/bash
|
|
|
|
|
|
currentport=$(pactl list sinks | grep -Po "Active Port: analog.*")
|
|
|
|
if [[ -n "$button" ]]
|
|
then
|
|
if [[ "$currentport" == "Active Port: analog-output-lineout" ]]
|
|
then
|
|
pactl set-sink-port "alsa_output.pci-0000:0b:00.3.analog-stereo" "analog-output-headphones"
|
|
echo "casque"
|
|
else
|
|
pactl set-sink-port "alsa_output.pci-0000:0b:00.3.analog-stereo" "analog-output-lineout"
|
|
echo "front "
|
|
fi
|
|
pkill -RTMIN+10 i3blocks
|
|
else
|
|
if [[ "$currentport" == "Active Port: analog-output-lineout" ]]
|
|
then
|
|
echo "front "
|
|
else
|
|
echo "casque"
|
|
fi
|
|
fi
|