Created
August 31, 2017 19:35
-
-
Save 0x4C4A/8c09fdfc8e946cbff0f3026b513607da to your computer and use it in GitHub Desktop.
Simple script to switch display configs with xrandr and restore multiscreen wallpaper with nitrogen
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 | |
if [ "$1" = "projector" ]; then | |
xrandr --output DP-1 --off | |
xrandr --output DP-3 --off | |
xrandr --output DP-5 --off | |
xrandr --output HDMI-0 --auto | |
elif [ "$1" = "screens" ]; then | |
xrandr --output HDMI-0 --off | |
xrandr --output DP-3 --auto --primary | |
xrandr --output DP-5 --auto --left-of DP-3 | |
xrandr --output DP-1 --auto --right-of DP-3 | |
else | |
xrandr --output DP-3 --auto --primary | |
xrandr --output DP-5 --auto --left-of DP-3 | |
xrandr --output DP-1 --auto --right-of DP-3 | |
xrandr --output HDMI-0 --auto --left-of DP-5 | |
fi | |
sleep 1 | |
nitrogen --restore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment