i3-autodisplay
i3-autodisplay copied to clipboard
Different actions for different displays (on the same connector)
Hello, I would like to request a feature.
USE CASE: In my office, I work on a big monitor connected to my laptop through HDMI (my machine and i3-autodisplay see it as HDMI-1). I use it as my main monitor, and the laptop's screen as just extra real state. However, when giving a presentation, it is common to be given "an HDMI to connect to". If I connect it, i3-autodisplay will think it is my office's monitor, which is a problem. When I present, I want to have all my workspaces and windows in my laptop's screen, rather than project them to the audience.
HOW TO IDENTIFY EACH DISPLAY: In order to identify different displays, one could use the EDID of a display, rather than just the connector name. This info can be obtained from xrandr too:
xrandr --verbose | awk '{if(p==1){if($1 ~ /[0-9a-f]{32}/){printf("%s",$1)}else{output=""; p=0; printf "\n"}}} /^HDMI-1 connected .*/{output=$1} /\tEDID:/{if(output != ""){printf("%s=",output); p=1};}'