This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Execute manualy the command: | |
# $pactl list short sinks | |
# find your 2 device names | |
# and replace the names of the variables $output_device1 and $output_device2 | |
# then run the script to switch between these 2 audio devices | |
# or even better use a keyboard shortcut. | |
output_device1="alsa_output.pci-0000_0a_00.1.hdmi-stereo-extra2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
monitors=`xrandr --listactivemonitors | head -n1 | cut -d " " -f 2` | |
if [ "$monitors" == 1 ] | |
then | |
`xrandr --output DVI-I-1 --right-of DP-2 --auto` #change DVI-I-1 to your monitor connection running `xrandr` | |
else | |
`xrandr --output DVI-I-1 --off` #change DVI-I-1 to your monitor connection running `xrandr` | |
fi |