You are not logged in.
Hi!
Most of the time I am using my laptop on the desk with an external monitor plugged in. I would like the laptop screen to switch off when it sees that the monitor is plugged in, but also stay on when I venture the world without the monitor.
I wrote this myself some time ago and have been using it as part of my .xprofile:
if [[ "$(xrandr --query | grep "HDMI-1 connected")" ]]; then
autorandr monitor
else
autorandr laptop
fiI know this looks ugly and I am sure there exists something better. What would you recommend using? I would like to have a system which automatically recognizes what type of device gets plugged in (monitor, TV, projector), switches off the laptop display and directs the output to the device with the appropriate settings. And when unplugged, then the other way around of course.
Thanks!
Last edited by goldmund (2021-07-08 17:42:06)
Offline
Offline
Apart from not being maintained any more, this looks great. I will go with that, unless anyone else has another idea...
Offline
What do you mean by "not being maintained any more"?
Also Keith is the Chuck Norris of X11 - his code doesn't need maintainance.
Offline
What do you mean by "not being maintained any more"?
Also Keith is the Chuck Norris of X11 - his code doesn't need maintainance.
Haha, all right then. I tend not to touch things which were last updated 9 years ago, but I'll go with that, it's actually just what I was looking for. Thank you!
Offline