You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.6 KiB
Bash
58 lines
1.6 KiB
Bash
#!/bin/sh
|
|
|
|
if [ "$1" = '-a' ]; then
|
|
switch_audio='yes'
|
|
video_mode="$2"
|
|
else
|
|
video_mode="$1"
|
|
fi
|
|
|
|
case $video_mode in
|
|
'lvds-hdmi2')
|
|
xrandr \
|
|
--output HDMI1 --mode 1280x720 --pos 0x0 --rotate normal \
|
|
--output LVDS1 --primary --mode 1366x768 --pos 1368x0 --rotate normal \
|
|
--output VIRTUAL1 --off \
|
|
--output DP3 --off \
|
|
--output DP2 --off \
|
|
--output DP1 --off \
|
|
--output HDMI3 --off \
|
|
--output HDMI2 --off \
|
|
--output VGA1 --off \
|
|
|
|
if [ "$switch_audio" = 'yes' ]; then
|
|
ponymix -c 0 set-profile output:hdmi-stereo
|
|
fi
|
|
;;
|
|
'hdmi2')
|
|
xrandr \
|
|
--output HDMI1 --primary --mode 1280x720 --pos 0x0 --rotate normal \
|
|
--output LVDS1 --off \
|
|
--output VIRTUAL1 --off \
|
|
--output DP3 --off \
|
|
--output DP2 --off \
|
|
--output DP1 --off \
|
|
--output HDMI3 --off \
|
|
--output HDMI2 --off \
|
|
--output VGA1 --off \
|
|
|
|
if [ "$switch_audio" = 'yes' ]; then
|
|
ponymix -c 0 set-profile output:hdmi-stereo
|
|
fi
|
|
;;
|
|
*)
|
|
xrandr \
|
|
--output LVDS1 --primary --mode 1366x768 --pos 1368x0 --rotate normal \
|
|
--output HDMI1 --off \
|
|
--output VIRTUAL1 --off \
|
|
--output DP3 --off \
|
|
--output DP2 --off \
|
|
--output DP1 --off \
|
|
--output HDMI3 --off \
|
|
--output HDMI2 --off \
|
|
--output VGA1 --off \
|
|
|
|
ponymix -c 0 set-profile output:analog-stereo
|
|
;;
|
|
esac
|