1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/sh if command -v xrandr >/dev/null 2>&1; then if xrandr | grep "VGA.* connected [0-9]*x[0-9]*+[0-9]*+[0-9]*" >/dev/null 2>&1; then xrandr \ --output VGA1 --off else xrandr \ --output LVDS1 --auto \ --output VGA1 --auto --right-of LVDS1 --rotate left fi fi
Consider giving Nix/NixOS a try! <3