Wednesday, April 28, 2021

Switching audio and adding a notification

 Once you get the audio switching working, it's nice to have a little bit of feedback, so add a little message with notify-send.


so CTRL+ALT+9 does

sh -c "pactl set-card-profile 0 output:hdmi-stereo;notify-send 'switch to hdmi'"

 

and CTRL+ALT+0 does:

 sh -c "pactl set-card-profile 0 output:analog-stereo; notify-send 'switch to headphone'"


Thanks to this page:

https://askubuntu.com/questions/60379/how-to-combine-two-commands-as-a-launcher

No comments:

Post a Comment