#!/bin/bash
# Wrapper hack to make xrandr work correctly on Debian 12 Linux running external "27 inch display 2560x1440 Display Port (KVM)
# $ xrandr |grep -i "connected"
# LVDS1 connected 1600x900+2560+0 (normal left inverted right x axis y axis) 310mm x 170mm
# DP1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
# DP2 disconnected (normal left inverted right x axis y axis)
# DP3 disconnected (normal left inverted right x axis y axis)
# HDMI1 disconnected (normal left inverted right x axis y axis)
# HDMI2 disconnected (normal left inverted right x axis y axis)
# HDMI3 disconnected (normal left inverted right x axis y axis)
# VGA1 disconnected (normal left inverted right x axis y axis)
# VIRTUAL1 disconnected (normal left inverted right x axis y axis)
# hipo@jeremiah:~$ 

#
#
# Turn off laptop screen
xrandr --output LVDS1 --off

# Set DP1 to 2560x1440 (just in case)
xrandr --output DP1 --mode 2560x1440 --primary

# Run your program
tuxtype

# Restore laptop screen when done
xrandr --output LVDS1 --auto --right-of DP1
