You are not logged in.
Hey everyone,
I'm kinda new to archlinux and I just love it!
So I'm using 'mons' to manage 2 external display.
@ home I have a 1080p screen and a 1440p screen.
At the moment I set on my ~/.xinitrc:
xrandr --newmode "2560x1440R" ... // making it simple
xrandr --addmode ...
xrandr -- output ...
It works perfectly!
Now there's a catch... (Obviously)
I'm using my PC on a dock @ work, there I got two 1080p screen (They're the same)
I'm affraid that the cmd above will brake the setup, is there a way to activate only if it detects my 1440p screen?
like
if { ${DISPLAY} == <screen name>}
xrandr ....
else
xrandr ....
fi
Hope I was clear enough!
Cheers,
Offline
DISPLAY is an X11 server variable and will be sth. like ":0"
add_output() {
xrandr --newmode "2560x1440R" ... // making it simple
xrandr --addmode ...
xrandr -- output ...
exit
}
for edid in /sys/class/drm/card0-*/edid; do
edid-decode $edid | grep "Display Product Name" && add_output # replace "Display Product Name" w/ a unique identifier for your monitor
done
Offline
Thank your for your reply.
Just to be sure, to replace "Display Product Name" with a unique identifier is a name I choose or it's a specific name from the display?
Offline
it's a specific name from the display
Inspect the EDID decode, the monitor vendor/model will likely show up there.
Offline
So did a xrandr --props and got a tone of info and for my monitor on output DP2-2 got this EDID:
00ffffffffffff0010ace6a0554a3330
2d1a010380351e780eee91a3544c9926
0f505421080001010101010101010101
010101010101565e00a0a0a029503020
35000f282100001a000000ff00564747
593436423230334a550a000000fd0018
3c1e8c1e010a202020202020000000fc
0044656c6c20533234313744470a014f
02031ac147901f041303120123090701
8301000065030c001000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
000000000000000000000000000000c1
Is this the display name? Just installed edid-decode and still trying to find how to use it properly
Offline
No, it's the EDID.
It says
Display Product Name: 'Dell S2417DG'
so grep for "Dell S2417DG"
Offline
Oh ok I see.
add_output() {
xrandr --newmode "2560x1440R" ... // making it simple
xrandr --addmode ...
xrandr -- output ...
exit
}
for edid in /sys/class/drm/card0-*/edid; do
edid-decode $edid | grep "Dell S2417DG" && add_output
done
This should work inside my .xinitrc, will try it. Thx for the help
Offline