So sometimes when I connect my laptop to a monitor I like to use both screens at the same time but sometimes I just want to use the monitor. However when I close my laptop screen, my cursor can still go off my monitor screen and to the laptop. I tried messing around with the power management settings such as turning the screen off when lid is closed and connected to an external monitor, but that turns both screens off. Currently, whenever I close my laptop screen I have to go to settings and manually disable it. Is there a way to automate this process? I am currently using Lubuntu 21.04. The other answers I’ve found say to do nothing when the lid closes but I need to disable the screen when the lid’s closed.