#!/bin/bash xrandr --output VIRTUAL1 --off xrandr --output HDMI2 --off xset r rate 250 50 if xrandr | grep -q '^HDMI2 connected'; then xrandr --output HDMI2 --right-of eDP1 --auto fi xkbcomp .xkbmap "$DISPLAY"