diff --git a/hosts/profiles/desktop/default.nix b/hosts/profiles/desktop/default.nix index e8120310..7f2a0011 100644 --- a/hosts/profiles/desktop/default.nix +++ b/hosts/profiles/desktop/default.nix @@ -169,6 +169,19 @@ in *.color239: #565761 *.color240: #6272a4 *.color241: #b6b6b2 + + # hotplug + connect() { + # Turn it on if it was off + xrandr --output HDMI-2 --auto + xrandr --output HDMI-2 --same-as eDP-1 + } + + disconnect() { + xrandr --output HDMI-2 --off + } + + xrandr | grep "HDMI-2 connected" &>>/dev/null && connect || disconnect EOF ''; lightdm = {