External Monitor Configuration on Startup

Hi Guys,
I have a laptop that has a 32inch external monitor plugged into it. I run i3 Window manager with qubes 4.0. currently when my laptop starts up only the laptop screen is on, I have to use a key binding I have setup in i3 to enable xrandr and turn on the external monitor. the problem with this is I have to restart i3 everytime after.

How do I configure my start up so when my external monitor is plugged in (connected) my desktop only launches on my external monitor and not my laptop screen. However if I am travelling it adjusts to just launching on my laptop?

The key binding i use in i3 is as follows:
xrandr --output DP1 --mode 3440x1440 --rate 59.97 --output eDP1 --off

DP1 = external monitor
eDP1= laptop monitor

Sorry I have tried various suggestions from other forums but haven’t had any luck.

Any help would be appreciated

Thanks
Hayden